Skip to content

Commit ee4fe43

Browse files
Barsnesmimarz
andauthored
chore(.ds-input): sync with figma (#3202)
Co-authored-by: Michael Marszalek <[email protected]>
1 parent dbf02e3 commit ee4fe43

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.changeset/fast-toys-explain.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@digdir/designsystemet-css": patch
3+
---
4+
5+
**Checkbox**: Reduce border-radius by one size, making them more square.

packages/css/src/input.css

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
--dsc-input-border-style: solid;
1515
--dsc-input-border-width--toggle: max(var(--ds-border-width-default), calc(var(--ds-size-1) / 2)); /* Allow border-width to grow with font-size */
1616
--dsc-input-border-width: var(--ds-border-width-default);
17-
/* Color */
18-
--dsc-input-color--readonly: var(--ds-color-neutral-text-subtle);
17+
/* Color */
18+
--dsc-input-color--readonly: var(--ds-color-neutral-text-default);
1919
--dsc-input-color: var(--ds-color-neutral-text-default);
2020
/* Stroke is used as the dot in radio, and checkmark in checkboxes */
2121
--dsc-input-stroke-color: var(--ds-color-base-contrast-default);
@@ -37,7 +37,6 @@
3737
border-width: var(--dsc-input-border-width);
3838
border-style: var(--dsc-input-border-style);
3939
border-color: var(--dsc-input-border-color);
40-
box-shadow: var(--dsc-input-box-shadow);
4140
box-sizing: border-box;
4241
color: var(--dsc-input-color);
4342
font-family: inherit;
@@ -153,7 +152,6 @@
153152
&[type='radio'] {
154153
border-width: var(--dsc-input-border-width--toggle);
155154
padding: var(--_dsc-input-spacing--toggle);
156-
157155
flex-shrink: 0; /* Never shrink a toggle input */
158156
line-height: inherit; /* Inherit line height so we can use 1lh to align with first line of label */
159157
height: var(--dsc-input-size--toggle);
@@ -186,6 +184,10 @@
186184
}
187185
}
188186

187+
&[type='checkbox'] {
188+
border-radius: var(--ds-border-radius-sm);
189+
}
190+
189191
&[type='checkbox']:checked {
190192
background-origin: content-box;
191193
background-repeat: no-repeat;

0 commit comments

Comments
 (0)