@oslokommune/punkt-css 12.34.0 → 12.34.1

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.
@@ -9,7 +9,9 @@
9
9
  $-module-name: 'pkt-alert';
10
10
 
11
11
  // Spacing
12
- $-alert-spacing: map.get(variables.$spacing, 'size-24');
12
+ $-spacing-12: map.get(variables.$spacing, 'size-12');
13
+ $-spacing-16: map.get(variables.$spacing, 'size-16');
14
+ $-spacing-24: map.get(variables.$spacing, 'size-24');
13
15
  $-border-thickness: map.get(variables.$spacing, 'size-4');
14
16
 
15
17
  // default is "info"
@@ -46,25 +48,38 @@ pkt-alert {
46
48
  display: block;
47
49
  }
48
50
 
51
+ .pkt-alert__grid {
52
+ display: grid;
53
+ grid-template-areas:
54
+ 'icon title close'
55
+ 'content content content'
56
+ 'date date date';
57
+ grid-template-columns: min-content auto min-content;
58
+ grid-row-gap: $-spacing-16;
59
+ grid-column-gap: $-spacing-24;
60
+ justify-items: left;
61
+ align-items: center;
62
+ }
63
+
49
64
  .pkt-alert {
50
- padding: $-alert-spacing $-alert-spacing $-alert-spacing calc($-alert-spacing - $-border-thickness);
51
- display: block;
52
- position: relative;
53
65
  border-left: $-border-thickness solid var(--pkt-color-alert-bc);
54
66
  background-color: var(--pkt-color-alert-bg);
55
67
  color: var(--pkt-color-alert-txt);
68
+ padding: $-spacing-16 $-spacing-24;
69
+
70
+ display: block;
56
71
 
57
72
  &__title {
58
- margin: 0 0 $-alert-spacing 2.5rem;
73
+ grid-area: title;
59
74
  @include get-text('pkt-txt-18-medium');
60
75
  }
61
76
 
62
77
  &__close ~ &__title {
63
- margin: 0 4rem $-alert-spacing 2.5rem;
78
+ margin: 0 4rem $-spacing-24 2.5rem;
64
79
  }
65
80
 
66
81
  &__text {
67
- margin: 0 0 0 2.5rem;
82
+ grid-area: content;
68
83
  overflow-wrap: break-word;
69
84
 
70
85
  @include get-text('pkt-txt-18-light');
@@ -82,18 +97,8 @@ pkt-alert {
82
97
  }
83
98
  }
84
99
 
85
- &__close + &__text {
86
- margin: 0 4rem 0 2.5rem;
87
- }
88
-
89
- &__title + &__text {
90
- margin-left: 0;
91
- margin-right: 0;
92
- }
93
-
94
100
  &__date {
95
- margin-top: $-alert-spacing;
96
-
101
+ grid-area: date;
97
102
  @include get-text('pkt-txt-14-light');
98
103
  }
99
104
 
@@ -101,15 +106,11 @@ pkt-alert {
101
106
  --fg-color: var(--pkt-color-alert-icon-fg);
102
107
  height: 2rem;
103
108
  width: 2rem;
104
- position: absolute;
105
- top: 22px;
106
- left: 20px;
109
+ grid-area: icon;
107
110
  }
108
111
 
109
112
  &__close {
110
- position: absolute;
111
- right: 1.125rem;
112
- top: 0.625rem;
113
+ grid-area: close;
113
114
 
114
115
  & svg {
115
116
  --fg-color: var(--pkt-color-alert-close-fg);
@@ -118,21 +119,14 @@ pkt-alert {
118
119
  }
119
120
 
120
121
  .pkt-alert--compact {
121
- padding: map.get(variables.$spacing, 'size-12') map.get(variables.$spacing, 'size-16')
122
- map.get(variables.$spacing, 'size-12') map.get(variables.$spacing, 'size-4');
122
+ padding: $-spacing-12 $-spacing-16;
123
123
 
124
124
  .pkt-alert__icon {
125
125
  width: 1.375rem;
126
126
  height: 1.375rem;
127
- top: 0.81rem;
128
- left: 1.25rem;
129
127
  }
130
128
 
131
129
  .pkt-alert__text {
132
130
  @include get-text('pkt-txt-16-light');
133
- margin: 0 2.875rem;
134
- }
135
- .pkt-alert__close {
136
- top: 0.25rem;
137
131
  }
138
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-css",
3
- "version": "12.34.0",
3
+ "version": "12.34.1",
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",
@@ -54,5 +54,5 @@
54
54
  "url": "https://github.com/oslokommune/punkt/issues"
55
55
  },
56
56
  "license": "MIT",
57
- "gitHead": "4ab2b5b6508cf1749c9b1a66d92c6d214f737b26"
57
+ "gitHead": "62e323745bcb2f3d3a27ff2f05090680fbeaeef7"
58
58
  }