Skip to content

Commit

Permalink
chore(styles): implemented PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
schaertim committed Oct 3, 2024
1 parent d35d080 commit 6096c76
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta: MetaComponent = {
},
},
args: {
labelPosition: 'before',
labelPosition: 'after',
label: 'Notifications',
hiddenLabel: false,
checked: false,
Expand Down
19 changes: 14 additions & 5 deletions packages/styles/src/components/form-check.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,15 @@ $switch-handle-icon-disabled: url("data:image/svg+xml,<svg viewBox='0 0 32 32' x
$color: tokens.get('switch', 'focus-stroke'),
$style: tokens.get('switch', 'focus-border-style')
) {
border-radius: tokens.get('switch', 'focus-border-radius');
width: fit-content;

&:not(:has(> input[aria-label])) {
border-radius: tokens.get('switch', 'focus-border-radius');
}

&:has(> input[aria-label]) {
border-radius: tokens.get('switch', 'border-radius-round');
}
}

.form-check-input {
Expand Down Expand Up @@ -288,7 +296,7 @@ $switch-handle-icon-disabled: url("data:image/svg+xml,<svg viewBox='0 0 32 32' x
border-color: tokens.get('switch', 'handle-selected-stroke');
}

& + .form-check-label {
+ .form-check-label {
color: tokens.get('switch', 'text-selected-fg');
}
}
Expand Down Expand Up @@ -335,7 +343,7 @@ $switch-handle-icon-disabled: url("data:image/svg+xml,<svg viewBox='0 0 32 32' x
GrayText;
}

& + .form-check-label {
+ .form-check-label {
color: tokens.get('switch', 'text-disabled-fg');
}

Expand Down Expand Up @@ -381,12 +389,13 @@ $switch-handle-icon-disabled: url("data:image/svg+xml,<svg viewBox='0 0 32 32' x
border-color: tokens.get('switch', 'handle-hover-stroke');
}

&::before {
background-color: transparent;
&:checked::before {
background-color: tokens.get('switch', 'element-hover-bg');
}

@include utility-mx.high-contrast-mode {
border-color: Highlight;

&::after {
background-color: CanvasText;
}
Expand Down

0 comments on commit 6096c76

Please sign in to comment.