Let a single column sit in a section and give buttons an alignment
A column may now live directly in a section, not only in a row - the way to centre or narrow a button or a short text without a one-column row. The align design token applies to buttons; because a button is inline-flex, auto margins never centred it, so site.css turns an aligned button into a fit-content block per device. The Drews seed uses the token for its centred buttons. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
533e181590
commit
232e6fe6dc
6 files changed
+41
-7
No files matched your search
@@ -508,7 +508,7 @@ test('the top level takes everything the validator takes there, and nothing else
|
||||
// Die Struktur, die der Editor in seinem eigenen Hinweistext beschreibt, gilt jetzt auch fuer
|
||||
// die Schaltflaechen: eine Zeile nahm bisher jedes Kind, eine Spalte stand ueberall.
|
||||
|
||||
test('a row takes columns and nothing else, a column only lives in a row', () => {
|
||||
test('a row takes columns and nothing else, a column lives in a row or alone in a section', () => {
|
||||
const document = fixture();
|
||||
const rowId = insertRow(document, 3, 's2');
|
||||
const row = locate(document.blocks, rowId).block;
|
||||
@@ -518,8 +518,10 @@ test('a row takes columns and nothing else, a column only lives in a row', () =>
|
||||
assert.equal(insertBlockAt(document, 'heading', rowId, 0), null);
|
||||
assert.equal(row.children.length, 3);
|
||||
assert.ok(insertBlockAt(document, 'heading', row.children[0].id, 0));
|
||||
// Eine Spalte gehoert nicht in eine Sektion.
|
||||
assert.equal(insertBlockAt(document, 'column', 's2', 0), null);
|
||||
// Eine einzelne Spalte darf direkt in einer Sektion stehen - so wird ein Button zentriert -,
|
||||
// aber nicht in einer Spalte oder lose im Dokument.
|
||||
assert.ok(insertBlockAt(document, 'column', 's2', 0));
|
||||
assert.equal(insertBlockAt(document, 'column', row.children[0].id, 0), null);
|
||||
assert.ok(insertBlockAt(document, 'column', rowId, 3));
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user