More flexible bleeds in tekst and subtree

This commit is contained in:
Kuba Orlik 2026-08-19 22:22:57 +02:00
parent dde87bd086
commit cffeb98914
3 changed files with 20 additions and 1 deletions

View File

@ -115,3 +115,12 @@
}
}
}
.grid-layout-main > .subtree:not(.subtree--bleed-none) {
display: grid !important;
grid-template-columns: subgrid;
& > * {
grid-column: content;
}
}

View File

@ -11,6 +11,14 @@
font-size: 20px;
}
&.tekst--bleed-none {
grid-column: content !important;
}
&.tekst--bleed-bleed {
grid-column: bleed !important;
}
p {
margin: 0;
}

View File

@ -17,6 +17,7 @@ const component_arguments = {
size: new ComponentArguments.Enum(["small", "normal", "large"]).setDefaultValue(
"normal"
),
bleed: new ComponentArguments.Enum(["none", "bleed"]).setDefaultValue("none"),
content: new ComponentArguments.Markdown(),
side_content: new ComponentArguments.NestedComponent(),
} as const;
@ -42,7 +43,7 @@ export class Tekst extends Component<typeof component_arguments> {
}
toHTML({
args: { color, content, side_content, size },
args: { color, content, side_content, size, bleed },
classes,
jdd_context,
index,
@ -55,6 +56,7 @@ export class Tekst extends Component<typeof component_arguments> {
...classes,
`tekst--color-${color}`,
`tekst--size-${size}`,
`tekst--bleed-${bleed}`,
]}
style={`--jdd-index: ${index}`}
>