Skip to content

Commit

Permalink
feat(core): refine form spacings
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnfeldpausch committed Apr 22, 2024
1 parent 08aa64f commit c29ed02
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/src/components/cat-checkbox/cat-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $checkbox-height: 1.25rem;
:host {
display: flex;
flex-direction: column;
gap: 0.5rem;
gap: 0.25rem;
}

:host([hidden]) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/cat-radio/cat-radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $radio-height: 1.25rem;
:host {
display: flex;
flex-direction: column;
gap: 0.5rem;
gap: 0.25rem;
}

:host([hidden]) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/cat-toggle/cat-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $toggle-height: 1.25rem;
:host {
display: flex;
flex-direction: column;
gap: 0.5rem;
gap: 0.25rem;
}

:host([hidden]) {
Expand Down
6 changes: 3 additions & 3 deletions core/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -993,9 +993,9 @@ <h2>Radio</h2>

<h3>Group</h3>
<cat-radio-group a11y-label="Radio Group 1" label-left>
<cat-radio value="one" label="Option 1 - Group 1" checked></cat-radio>
<cat-radio value="two" label="Option 2 - Group 1"></cat-radio>
<cat-radio value="three" label="Option 3 - Group 1" disabled></cat-radio>
<cat-radio value="one" label="Option 1 - Group 1" hint="This is a hint" checked></cat-radio>
<cat-radio value="two" label="Option 2 - Group 1" hint="This is a hint"></cat-radio>
<cat-radio value="three" label="Option 3 - Group 1" hint="This is a hint" disabled></cat-radio>
</cat-radio-group>

<h3>State</h3>
Expand Down
1 change: 0 additions & 1 deletion core/src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $cat-font-color-mono: rgb(var(--cat-font-color-mono));

$cat-head-margin-bottom: 1rem;
$cat-body-margin-bottom: 2rem;
$cat-form-margin-bottom: 1.5rem;
$cat-nav-padding-horizontal: 0.75rem;

// --------
Expand Down
4 changes: 2 additions & 2 deletions core/src/styles/core/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
cat-date,
cat-time
):not(:last-child) {
margin-bottom: calc($cat-form-margin-bottom * var(--cat-form-spacer, 1));
margin-bottom: calc(1rem * var(--cat-form-spacer, 1));
}

cat-radio:not(:last-child) {
margin-bottom: 0.5rem;
margin-bottom: 0.75rem;
}
}

Expand Down

0 comments on commit c29ed02

Please sign in to comment.