@oslokommune/punkt-css 13.1.2 → 13.2.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.
@@ -6,7 +6,7 @@
6
6
  @forward 'spacing';
7
7
 
8
8
  // Default icon path
9
- $icon-path: 'https://punkt-cdn.oslo.kommune.no/13.1/icons' !default;
9
+ $icon-path: 'https://punkt-cdn.oslo.kommune.no/13.2/icons' !default;
10
10
 
11
11
  // Borders
12
12
  $border-width: (
@@ -126,6 +126,18 @@ pkt-accordion[compact] {
126
126
  transition: transform 0.3s;
127
127
  appearance: none;
128
128
  text-align: left;
129
+ position: relative;
130
+
131
+ @supports (interpolate-size: allow-keywords) {
132
+ &::details-content {
133
+ transition:
134
+ height 0.3s ease,
135
+ content-visibility 0.3s ease;
136
+ transition-behavior: allow-discrete;
137
+ height: 0;
138
+ overflow: clip;
139
+ }
140
+ }
129
141
 
130
142
  summary::-webkit-details-marker {
131
143
  display: none;
@@ -159,7 +171,6 @@ pkt-accordion[compact] {
159
171
  &__content {
160
172
  @include pkt-accordion-item-standard-content;
161
173
  border-top: none;
162
- display: none;
163
174
  }
164
175
 
165
176
  // Skin variations for single accordion item (standalone)
@@ -198,8 +209,16 @@ pkt-accordion[compact] {
198
209
  @include pkt-accordion-item-compact-content;
199
210
  }
200
211
  }
201
- // Accordion item when opened
202
212
  .pkt-accordion-item[open] {
213
+ @supports (interpolate-size: allow-keywords) {
214
+ &::details-content {
215
+ height: auto;
216
+ @starting-style {
217
+ height: 0;
218
+ }
219
+ }
220
+ }
221
+
203
222
  .pkt-accordion-item {
204
223
  &__title {
205
224
  border-bottom: none;
@@ -210,10 +229,6 @@ pkt-accordion[compact] {
210
229
  }
211
230
  }
212
231
 
213
- &__content {
214
- display: block;
215
- }
216
-
217
232
  &__icon {
218
233
  transform: rotate(180deg) translateY(0);
219
234
  }
@@ -17,6 +17,11 @@
17
17
  box-sizing: border-box;
18
18
  }
19
19
 
20
+ /* Support animating to `auto` */
21
+ :root {
22
+ interpolate-size: allow-keywords;
23
+ }
24
+
20
25
  /* Prevent adjustments of font size after orientation changes in iOS.
21
26
  * https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/
22
27
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-css",
3
- "version": "13.1.2",
3
+ "version": "13.2.0",
4
4
  "description": "CSS-rammeverket til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -55,5 +55,5 @@
55
55
  "url": "https://github.com/oslokommune/punkt/issues"
56
56
  },
57
57
  "license": "MIT",
58
- "gitHead": "cb98f3d45e891775f449eb4b78b3ae8cab40725f"
58
+ "gitHead": "36713c6c03feb884203fd9def6d137402c212eb0"
59
59
  }