@navikt/ds-css 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +58 -20
- package/form/radio-checkbox.css +31 -8
- package/package.json +3 -3
- package/typography.css +24 -11
package/form/radio-checkbox.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--navds-radio-checkbox-color-background: var(
|
|
3
|
-
--navds-semantic-color-
|
|
3
|
+
--navds-semantic-color-component-background-light
|
|
4
4
|
);
|
|
5
5
|
--navds-radio-checkbox-color-background-hover: var(
|
|
6
6
|
--navds-semantic-color-interaction-primary-hover-subtle
|
|
@@ -107,6 +107,29 @@
|
|
|
107
107
|
var(--navds-shadow-focus);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
.navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
|
|
111
|
+
box-shadow: none;
|
|
112
|
+
background-color: var(--navds-radio-checkbox-color-background-checked);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
|
116
|
+
content: "";
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: 50%;
|
|
119
|
+
transform: translate(0.375rem, -50%);
|
|
120
|
+
background-color: var(--navds-radio-checkbox-color-background);
|
|
121
|
+
width: 0.75rem;
|
|
122
|
+
height: 0.25rem;
|
|
123
|
+
border-radius: 1px;
|
|
124
|
+
flex-shrink: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.navds-checkbox--small
|
|
128
|
+
.navds-checkbox__input:indeterminate
|
|
129
|
+
+ .navds-checkbox__label::after {
|
|
130
|
+
transform: translate(0.25rem, -50%);
|
|
131
|
+
}
|
|
132
|
+
|
|
110
133
|
.navds-checkbox__input:checked + .navds-checkbox__label::before {
|
|
111
134
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMyAxMCI+ICAgIDxnPiAgICA8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNNCwxMGMtMC40LDAtMC44LTAuMS0xLjEtMC40TDAuNCw3LjFDMC4xLDYuOCwwLDYuNCwwLDZzMC4yLTAuOCwwLjUtMS4xQzEsNC40LDIsNC40LDIuNSw0LjlMNCw2LjRsNi40LTYgICAgQzEwLjgsMC4xLDExLjEsMCwxMS41LDBjMC40LDAsMC44LDAuMiwxLDAuNWMwLjYsMC42LDAuNSwxLjYtMC4xLDIuMXYwTDUsOS42QzQuNyw5LjksNC40LDEwLDQsMTB6IE0xMS44LDEuOUwxMS44LDEuOSAgICBDMTEuOCwxLjksMTEuOCwxLjksMTEuOCwxLjl6IE0xMS4yLDEuMUMxMS4yLDEuMSwxMS4yLDEuMSwxMS4yLDEuMUwxMS4yLDEuMXoiLz4gICAgPC9nPjwvc3ZnPg==);
|
|
112
135
|
background-position: 6px center;
|
|
@@ -121,7 +144,7 @@
|
|
|
121
144
|
+ .navds-checkbox__label::before {
|
|
122
145
|
background-position: 4px center;
|
|
123
146
|
}
|
|
124
|
-
|
|
147
|
+
.navds-checkbox__input:indeterminate:focus + .navds-checkbox__label::before,
|
|
125
148
|
.navds-checkbox__input:checked:focus + .navds-checkbox__label::before {
|
|
126
149
|
box-shadow: inset 0 0 0 1px white, var(--navds-shadow-focus);
|
|
127
150
|
}
|
|
@@ -142,28 +165,28 @@
|
|
|
142
165
|
color: var(--navds-radio-checkbox-color-label-hover);
|
|
143
166
|
}
|
|
144
167
|
|
|
145
|
-
.navds-checkbox__input:hover:not(:disabled):not(:checked):not(:focus)
|
|
168
|
+
.navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus)
|
|
146
169
|
+ .navds-checkbox__label::before,
|
|
147
|
-
.navds-radio__input:hover:not(:disabled):not(:checked):not(:focus)
|
|
170
|
+
.navds-radio__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus)
|
|
148
171
|
+ .navds-radio__label::before {
|
|
149
172
|
box-shadow: inset 0 0 0 2px var(--navds-radio-checkbox-color-shadow-hover);
|
|
150
173
|
background-color: var(--navds-radio-checkbox-color-background-hover);
|
|
151
174
|
}
|
|
152
175
|
|
|
153
176
|
.navds-checkbox--error
|
|
154
|
-
> .navds-checkbox__input:not(:hover):not(:disabled):not(:checked)
|
|
177
|
+
> .navds-checkbox__input:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
|
|
155
178
|
+ .navds-checkbox__label::before,
|
|
156
179
|
.navds-radio--error
|
|
157
|
-
> .navds-radio__input:not(:hover):not(:disabled):not(:checked)
|
|
180
|
+
> .navds-radio__input:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
|
|
158
181
|
+ .navds-radio__label::before {
|
|
159
182
|
box-shadow: inset 0 0 0 2px var(--navds-radio-checkbox-color-shadow-error);
|
|
160
183
|
}
|
|
161
184
|
|
|
162
185
|
.navds-checkbox--error
|
|
163
|
-
> .navds-checkbox__input:focus:not(:hover):not(:disabled):not(:checked)
|
|
186
|
+
> .navds-checkbox__input:focus:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
|
|
164
187
|
+ .navds-checkbox__label::before,
|
|
165
188
|
.navds-radio--error
|
|
166
|
-
> .navds-radio__input:focus:not(:hover):not(:disabled):not(:checked)
|
|
189
|
+
> .navds-radio__input:focus:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
|
|
167
190
|
+ .navds-radio__label::before {
|
|
168
191
|
box-shadow: inset 0 0 0 2px var(--navds-radio-checkbox-color-shadow-error),
|
|
169
192
|
var(--navds-shadow-focus);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Css for NAV Designsystem components",
|
|
6
6
|
"author": "NAV Designsystem team",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"watch": "postcss --watch --use postcss-import -o dist/index.css index.css"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@navikt/ds-tokens": "^0.8.
|
|
24
|
+
"@navikt/ds-tokens": "^0.8.1",
|
|
25
25
|
"normalize.css": "^8.0.1",
|
|
26
26
|
"postcss": "^8.3.6",
|
|
27
27
|
"postcss-cli": "^8.3.1",
|
|
28
28
|
"postcss-import": "^14.0.2"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "1148825a993da0187585a3ad9e521bba19a2940c"
|
|
31
31
|
}
|
package/typography.css
CHANGED
|
@@ -4,34 +4,47 @@
|
|
|
4
4
|
margin: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.navds-heading--
|
|
7
|
+
.navds-heading--xlarge {
|
|
8
8
|
font-size: var(--navds-font-size-heading-2xlarge);
|
|
9
9
|
letter-spacing: -0.01em;
|
|
10
10
|
line-height: var(--navds-font-line-height-heading-2xlarge);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.navds-heading--
|
|
13
|
+
.navds-heading--xlarge.navds-typo--spacing {
|
|
14
14
|
margin-bottom: var(--navds-spacing-5);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.navds-heading--
|
|
17
|
+
.navds-heading--large {
|
|
18
18
|
font-size: var(--navds-font-size-heading-xlarge);
|
|
19
19
|
letter-spacing: -0.008em;
|
|
20
20
|
line-height: var(--navds-font-line-height-heading-xlarge);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.navds-heading--
|
|
23
|
+
.navds-heading--large.navds-typo--spacing {
|
|
24
24
|
margin-bottom: var(--navds-spacing-4);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
/* Mobile scale */
|
|
28
|
+
@media (max-width: 480px) {
|
|
29
|
+
.navds-heading--xlarge {
|
|
30
|
+
font-size: var(--navds-font-size-heading-xlarge);
|
|
31
|
+
letter-spacing: -0.008em;
|
|
32
|
+
line-height: var(--navds-font-line-height-heading-xlarge);
|
|
33
|
+
}
|
|
32
34
|
|
|
33
|
-
.navds-heading--
|
|
34
|
-
|
|
35
|
+
.navds-heading--xlarge.navds-typo--spacing {
|
|
36
|
+
margin-bottom: var(--navds-spacing-4);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.navds-heading--large {
|
|
40
|
+
font-size: var(--navds-font-size-heading-large);
|
|
41
|
+
letter-spacing: -0.004em;
|
|
42
|
+
line-height: var(--navds-font-line-height-heading-large);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.navds-heading--large.navds-typo--spacing {
|
|
46
|
+
margin-bottom: var(--navds-spacing-3);
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
|
|
37
50
|
.navds-heading--medium {
|