@oardi/css-utils 0.72.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scss/utilities.scss +20 -37
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/css-utils",
3
- "version": "0.72.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",
@@ -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
  }