Skip to content

Commit

Permalink
feat(frontend): split offset and group fieldset modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Jan 12, 2024
1 parent 28cf9a2 commit 435ea84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/endpoint-posts/views/post-form.njk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

{% macro photoFieldset(index) %}
{% call fieldset({
classes: "fieldset--group"
classes: "fieldset--group fieldset--offset"
}) %}
{{ input({
name: "photo[" + index + "][url]",
Expand Down
9 changes: 8 additions & 1 deletion packages/frontend/components/fieldset/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@
}

.fieldset--group {
--fieldset-flow-space: var(--space-m);
--label-font: var(--font-fieldset-label);

& .field {
margin-block-start: var(--space-m);
}
}

.fieldset--offset {
background-color: var(--color-offset);
border-radius: var(--border-radius-small);
color: var(--color-on-offset);
margin-block: calc(var(--space-xs) * -1);
padding: var(--space-m);

& .fieldset__legend {
Expand Down

0 comments on commit 435ea84

Please sign in to comment.