@oardi/css-utils 0.70.0 → 0.72.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/css-utils",
3
- "version": "0.70.0",
3
+ "version": "0.72.0",
4
4
  "author": "Ardian Shala",
5
5
  "homepage": "https://css-utils.oardi.com",
6
6
  "description": "Powerful set of semantic css classes with support for breakpoints, directions and spacings",
@@ -148,10 +148,14 @@
148
148
  background-color: transparent;
149
149
  border-color: transparent;
150
150
 
151
- &:hover,
151
+ &:hover {
152
+ color: var(--button-color-hover);
153
+ background-color: var(--button-highlight);
154
+ }
155
+
152
156
  &.is-active,
153
157
  &:active {
154
- color: var(--button-color-hover);
158
+ color: var(--button-color-active);
155
159
  background-color: var(--button-highlight);
156
160
  }
157
161
 
@@ -13,6 +13,7 @@
13
13
  --chip-padding-x: var(--spacer-2);
14
14
  --chip-border-radius: 9999px;
15
15
  --chip-border-width: var(--border-width);
16
+ --chip-action-size: 1.5rem;
16
17
 
17
18
  --chip-highlight: var(--bg-highlight);
18
19
 
@@ -55,7 +56,8 @@
55
56
  border-color: var(--chip-highlight);
56
57
  }
57
58
 
58
- &:has(> i.icon:last-child) {
59
+ &:has(> i.icon:last-child),
60
+ &:has(> .chip-action:last-child) {
59
61
  padding-inline-end: 0;
60
62
  }
61
63
 
@@ -69,6 +71,32 @@
69
71
  padding: 0;
70
72
  }
71
73
  }
74
+
75
+ .chip-action {
76
+ display: inline-flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ flex-shrink: 0;
80
+ width: var(--chip-action-size);
81
+ height: var(--chip-action-size);
82
+ padding: 0;
83
+ border: 0;
84
+ border-radius: var(--chip-border-radius);
85
+ background-color: transparent;
86
+ color: inherit;
87
+ fill: currentColor;
88
+ line-height: 1;
89
+
90
+ &:hover {
91
+ cursor: pointer;
92
+ }
93
+
94
+ &:focus-visible {
95
+ outline: var(--focus-outline-width) var(--focus-outline-style)
96
+ var(--focus-outline-color);
97
+ outline-offset: var(--focus-offset);
98
+ }
99
+ }
72
100
  }
73
101
 
74
102
  @each $name, $value in map.get(theme.$theme, colors) {
@@ -33,7 +33,7 @@
33
33
 
34
34
  --expansion-panel-transition-duration: var(--transition-duration);
35
35
  --expansion-panel-transition-easing: var(--transition-easing);
36
- --expansion-panel-content-transition-duration: 0.25s;
36
+ --expansion-panel-content-transition-duration: var(--transition-duration);
37
37
 
38
38
  color: var(--text-color);
39
39
  background-color: var(--expansion-panel-bg-color);
@@ -121,8 +121,9 @@
121
121
  display: block;
122
122
  width: 100%;
123
123
  max-width: 100%;
124
- padding: var(--form-select-padding-y) var(--form-select-indicator-padding)
125
- var(--form-select-padding-y) var(--form-select-padding-x);
124
+ padding-block: var(--form-select-padding-y);
125
+ padding-inline-start: var(--form-select-padding-x);
126
+ padding-inline-end: var(--form-select-indicator-padding);
126
127
  font-size: var(--form-select-font-size);
127
128
  font-weight: var(--form-select-font-weight);
128
129
  line-height: var(--line-height);
@@ -132,8 +133,8 @@
132
133
  linear-gradient(45deg, transparent 50%, currentColor 50%),
133
134
  linear-gradient(135deg, currentColor 50%, transparent 50%);
134
135
  background-position:
135
- calc(100% - 1rem) 50%,
136
- calc(100% - 0.75rem) 50%;
136
+ right 1rem center,
137
+ right 0.75rem center;
137
138
  background-size:
138
139
  0.25rem 0.25rem,
139
140
  0.25rem 0.25rem;
@@ -142,6 +143,12 @@
142
143
  border-radius: var(--form-select-border-radius);
143
144
  appearance: none;
144
145
 
146
+ &:dir(rtl) {
147
+ background-position:
148
+ left 0.75rem center,
149
+ left 1rem center;
150
+ }
151
+
145
152
  transition:
146
153
  color var(--form-select-transition-duration) var(--form-select-transition-easing),
147
154
  background-color var(--form-select-transition-duration)
@@ -251,14 +258,13 @@
251
258
  &[type='radio']:checked::after {
252
259
  content: '';
253
260
  position: absolute;
254
- inset-block-start: 50%;
255
- inset-inline-start: 50%;
261
+ inset: 0;
256
262
  width: 0.5rem;
257
263
  height: 0.5rem;
264
+ margin: auto;
258
265
  background-color: var(--form-check-input-checked-color);
259
266
  border: 0;
260
267
  border-radius: 9999px;
261
- transform: translate(-50%, -50%);
262
268
  }
263
269
 
264
270
  &:focus-visible,
@@ -285,7 +291,6 @@
285
291
  background-color: var(--form-check-disabled-bg-color);
286
292
  border-color: var(--form-check-disabled-border-color);
287
293
 
288
- & + .form-label,
289
294
  & + .form-label {
290
295
  color: var(--disabled-text-color);
291
296
  cursor: not-allowed;
@@ -453,7 +458,6 @@
453
458
  background-color: var(--form-switch-disabled-thumb-bg-color);
454
459
  }
455
460
 
456
- & + .form-label,
457
461
  & + .form-label {
458
462
  color: var(--disabled-text-color);
459
463
  cursor: not-allowed;
@@ -108,7 +108,6 @@
108
108
 
109
109
  &:focus-visible,
110
110
  &.is-focus-visible {
111
- outline-color: rgba(var(--icon-button-color-rgb), 0.5);
112
111
  outline: var(--icon-button-focus-outline-width) var(--icon-button-focus-outline-style)
113
112
  rgba(var(--icon-button-color-rgb), 0.5);
114
113
  }
@@ -119,16 +118,21 @@
119
118
  background-color: transparent;
120
119
  border-color: transparent;
121
120
 
122
- &:hover,
123
- &:active {
121
+ &:hover {
124
122
  color: var(--icon-button-color-hover);
125
123
  background-color: var(--icon-button-highlight);
126
124
  border-color: transparent;
127
125
  }
128
126
 
127
+ &:active,
128
+ &.is-active {
129
+ color: var(--icon-button-color-active);
130
+ background-color: var(--icon-button-highlight);
131
+ border-color: transparent;
132
+ }
133
+
129
134
  &:focus-visible,
130
135
  &.is-focus-visible {
131
- outline-color: rgba(var(--icon-button-color-rgb), 0.5);
132
136
  outline: var(--icon-button-focus-outline-width) var(--icon-button-focus-outline-style)
133
137
  rgba(var(--icon-button-color-rgb), 0.5);
134
138
  background-color: var(--icon-button-highlight);
@@ -155,7 +159,6 @@
155
159
 
156
160
  &:focus-visible,
157
161
  &.is-focus-visible {
158
- outline-color: rgba(var(--icon-button-color-rgb), 0.5);
159
162
  outline: var(--icon-button-focus-outline-width) var(--icon-button-focus-outline-style)
160
163
  rgba(var(--icon-button-color-rgb), 0.5);
161
164
  }
@@ -44,6 +44,10 @@
44
44
  transform: translateX(-50%);
45
45
  }
46
46
 
47
+ &:dir(rtl)::before {
48
+ transform: translateX(50%);
49
+ }
50
+
47
51
  &:first-child::before {
48
52
  inset-block-start: var(--timeline-dot-center-y);
49
53
  }
package/scss/reboot.scss CHANGED
@@ -90,6 +90,8 @@
90
90
  [type='submit'],
91
91
  button {
92
92
  -webkit-appearance: button;
93
+ // Kept for the established cross-browser button normalization.
94
+ // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated
93
95
  appearance: button;
94
96
  }
95
97
 
@@ -126,12 +128,6 @@
126
128
  }
127
129
 
128
130
  ul {
129
- padding-left: 1rem;
130
- }
131
-
132
- @media (prefers-reduced-motion: reduce) {
133
- :root {
134
- --transition-duration: 0ms;
135
- }
131
+ padding-inline-start: 1rem;
136
132
  }
137
133
  }
@@ -127,4 +127,11 @@
127
127
  --disabled-bg-color: var(--gray-750);
128
128
  --disabled-border-color: var(--gray-700);
129
129
  }
130
+
131
+ @media (prefers-reduced-motion: reduce) {
132
+ :root {
133
+ --transition-duration-fast: 0ms;
134
+ --transition-duration: 0ms;
135
+ }
136
+ }
130
137
  }