@oardi/css-utils 0.71.0 → 0.72.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/css-utils",
3
- "version": "0.71.0",
3
+ "version": "0.72.1",
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
 
@@ -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,
@@ -118,13 +118,19 @@
118
118
  background-color: transparent;
119
119
  border-color: transparent;
120
120
 
121
- &:hover,
122
- &:active {
121
+ &:hover {
123
122
  color: var(--icon-button-color-hover);
124
123
  background-color: var(--icon-button-highlight);
125
124
  border-color: transparent;
126
125
  }
127
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
+
128
134
  &:focus-visible,
129
135
  &.is-focus-visible {
130
136
  outline: var(--icon-button-focus-outline-width) var(--icon-button-focus-outline-style)
@@ -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
@@ -128,6 +128,6 @@
128
128
  }
129
129
 
130
130
  ul {
131
- padding-left: 1rem;
131
+ padding-inline-start: 1rem;
132
132
  }
133
133
  }
@@ -1,6 +1,17 @@
1
1
  @use 'sass:map';
2
2
  @use './theme.scss' as theme;
3
3
 
4
+ $-widths: (
5
+ 100: 100%,
6
+ 75: 75%,
7
+ 60: 60%,
8
+ 50: 50%,
9
+ 40: 40%,
10
+ 30: 30%,
11
+ 25: 25%,
12
+ auto: auto,
13
+ );
14
+
4
15
  @layer utilities {
5
16
  // positions
6
17
  @each $value in map.get(theme.$theme, positions) {
@@ -195,24 +206,10 @@
195
206
  }
196
207
  }
197
208
 
198
- .w-100 {
199
- width: 100%;
200
- }
201
-
202
- .w-60 {
203
- width: 60%;
204
- }
205
-
206
- .w-50 {
207
- width: 50%;
208
- }
209
-
210
- .w-30 {
211
- width: 30%;
212
- }
213
-
214
- .w-40 {
215
- width: 40%;
209
+ @each $name, $value in $-widths {
210
+ .w-#{$name} {
211
+ width: $value;
212
+ }
216
213
  }
217
214
 
218
215
  // TODO - add several heights
@@ -255,27 +252,13 @@
255
252
  overscroll-behavior: none;
256
253
  }
257
254
 
258
- // width, height, display with breakpoints and directions
255
+ // width with breakpoints
259
256
  @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
260
257
  @media (min-width: #{$bp-value}) {
261
- .w-#{$bp}-100 {
262
- width: 100%;
263
- }
264
-
265
- .w-#{$bp}-60 {
266
- width: 60%;
267
- }
268
-
269
- .w-#{$bp}-50 {
270
- width: 50%;
271
- }
272
-
273
- .w-#{$bp}-40 {
274
- width: 40%;
275
- }
276
-
277
- .w-#{$bp}-30 {
278
- width: 30%;
258
+ @each $name, $value in $-widths {
259
+ .w-#{$bp}-#{$name} {
260
+ width: $value;
261
+ }
279
262
  }
280
263
  }
281
264
  }