@oardi/css-utils 0.123.0 → 0.125.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.123.0",
3
+ "version": "0.125.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",
package/readme.md CHANGED
@@ -4,8 +4,8 @@ CSS Utils is a lightweight SCSS toolkit with utility classes, responsive helpers
4
4
 
5
5
  ## What it includes
6
6
 
7
- - Utilities for colors, typography, spacing, display, flex and grid
8
- - Mobile-first responsive variants for layout and spacing
7
+ - Utilities for colors, typography, spacing, sizing, positioning, display, flex and grid
8
+ - Mobile-first responsive variants for layout, sizing, positioning and spacing
9
9
  - Components for buttons, cards, forms, badges, tabs, toasts and more
10
10
  - Global and component-specific design tokens
11
11
  - A predefined cascade order: `reset`, `base`, `components`, then `utilities`
@@ -73,7 +73,29 @@
73
73
  }
74
74
 
75
75
  // align self
76
- // TODO
76
+ .align-self-#{$bp}-auto {
77
+ align-self: auto;
78
+ }
79
+
80
+ .align-self-#{$bp}-start {
81
+ align-self: start;
82
+ }
83
+
84
+ .align-self-#{$bp}-end {
85
+ align-self: end;
86
+ }
87
+
88
+ .align-self-#{$bp}-center {
89
+ align-self: center;
90
+ }
91
+
92
+ .align-self-#{$bp}-baseline {
93
+ align-self: baseline;
94
+ }
95
+
96
+ .align-self-#{$bp}-stretch {
97
+ align-self: stretch;
98
+ }
77
99
 
78
100
  // fill
79
101
  .flex-#{$bp}-fill {
@@ -106,6 +128,35 @@
106
128
  .flex-#{$bp}-nowrap {
107
129
  flex-wrap: nowrap;
108
130
  }
131
+
132
+ // align content
133
+ .align-content-#{$bp}-start {
134
+ align-content: start;
135
+ }
136
+
137
+ .align-content-#{$bp}-end {
138
+ align-content: end;
139
+ }
140
+
141
+ .align-content-#{$bp}-center {
142
+ align-content: center;
143
+ }
144
+
145
+ .align-content-#{$bp}-between {
146
+ align-content: space-between;
147
+ }
148
+
149
+ .align-content-#{$bp}-around {
150
+ align-content: space-around;
151
+ }
152
+
153
+ .align-content-#{$bp}-evenly {
154
+ align-content: space-evenly;
155
+ }
156
+
157
+ .align-content-#{$bp}-stretch {
158
+ align-content: stretch;
159
+ }
109
160
  }
110
161
  }
111
162
  }
package/scss/flex.scss CHANGED
@@ -72,7 +72,29 @@
72
72
  }
73
73
 
74
74
  // align self
75
- // TODO
75
+ .align-self-auto {
76
+ align-self: auto;
77
+ }
78
+
79
+ .align-self-start {
80
+ align-self: start;
81
+ }
82
+
83
+ .align-self-end {
84
+ align-self: end;
85
+ }
86
+
87
+ .align-self-center {
88
+ align-self: center;
89
+ }
90
+
91
+ .align-self-baseline {
92
+ align-self: baseline;
93
+ }
94
+
95
+ .align-self-stretch {
96
+ align-self: stretch;
97
+ }
76
98
 
77
99
  .flex-1 {
78
100
  flex: 1 1 0;
@@ -109,6 +131,33 @@
109
131
  .flex-nowrap {
110
132
  flex-wrap: nowrap;
111
133
  }
134
+
112
135
  // align-content
113
- // TODO
136
+ .align-content-start {
137
+ align-content: start;
138
+ }
139
+
140
+ .align-content-end {
141
+ align-content: end;
142
+ }
143
+
144
+ .align-content-center {
145
+ align-content: center;
146
+ }
147
+
148
+ .align-content-between {
149
+ align-content: space-between;
150
+ }
151
+
152
+ .align-content-around {
153
+ align-content: space-around;
154
+ }
155
+
156
+ .align-content-evenly {
157
+ align-content: space-evenly;
158
+ }
159
+
160
+ .align-content-stretch {
161
+ align-content: stretch;
162
+ }
114
163
  }
@@ -4,7 +4,7 @@
4
4
  @use './display.scss';
5
5
  @use './theme.scss' as theme;
6
6
 
7
- $-widths: (
7
+ $-sizes: (
8
8
  100: 100%,
9
9
  75: 75%,
10
10
  60: 60%,
@@ -15,6 +15,29 @@ $-widths: (
15
15
  auto: auto,
16
16
  );
17
17
 
18
+ $-insets: (
19
+ 0: 0,
20
+ 25: 25%,
21
+ 50: 50%,
22
+ 75: 75%,
23
+ 100: 100%,
24
+ auto: auto,
25
+ );
26
+
27
+ $-inset-properties: (
28
+ inset: inset,
29
+ inset-inline: inset-inline,
30
+ inset-block: inset-block,
31
+ inset-inline-start: inset-inline-start,
32
+ inset-inline-end: inset-inline-end,
33
+ inset-block-start: inset-block-start,
34
+ inset-block-end: inset-block-end,
35
+ top: top,
36
+ right: right,
37
+ bottom: bottom,
38
+ left: left,
39
+ );
40
+
18
41
  $-overflow-wrap-values: normal, break-word, anywhere;
19
42
 
20
43
  // Guard the dynamic value: a var() declaration can otherwise become invalid only
@@ -277,33 +300,30 @@ $-overflow-wrap-values: normal, break-word, anywhere;
277
300
  min-width: 0;
278
301
  }
279
302
 
280
- @each $name, $value in $-widths {
303
+ @each $name, $value in $-sizes {
281
304
  .w-#{$name} {
282
305
  width: $value;
283
306
  }
284
- }
285
307
 
286
- // TODO - add several heights
287
- .h-100 {
288
- height: 100%;
289
- }
290
-
291
- // TODO - check if more classes are needed
292
- // arrange elements top, start, bottom, end
293
- .top-0 {
294
- top: 0px;
295
- }
308
+ .h-#{$name} {
309
+ height: $value;
310
+ }
296
311
 
297
- .right-0 {
298
- right: 0px;
299
- }
312
+ .inline-size-#{$name} {
313
+ inline-size: $value;
314
+ }
300
315
 
301
- .bottom-0 {
302
- bottom: 0px;
316
+ .block-size-#{$name} {
317
+ block-size: $value;
318
+ }
303
319
  }
304
320
 
305
- .left-0 {
306
- left: 0px;
321
+ @each $name, $value in $-insets {
322
+ @each $class-name, $property in $-inset-properties {
323
+ .#{$class-name}-#{$name} {
324
+ #{$property}: $value;
325
+ }
326
+ }
307
327
  }
308
328
 
309
329
  .fixed-top {
@@ -333,10 +353,30 @@ $-overflow-wrap-values: normal, break-word, anywhere;
333
353
  // width with breakpoints
334
354
  @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
335
355
  @media (min-width: #{$bp-value}) {
336
- @each $name, $value in $-widths {
356
+ @each $name, $value in $-sizes {
337
357
  .w-#{$bp}-#{$name} {
338
358
  width: $value;
339
359
  }
360
+
361
+ .h-#{$bp}-#{$name} {
362
+ height: $value;
363
+ }
364
+
365
+ .inline-size-#{$bp}-#{$name} {
366
+ inline-size: $value;
367
+ }
368
+
369
+ .block-size-#{$bp}-#{$name} {
370
+ block-size: $value;
371
+ }
372
+ }
373
+
374
+ @each $name, $value in $-insets {
375
+ @each $class-name, $property in $-inset-properties {
376
+ .#{$class-name}-#{$bp}-#{$name} {
377
+ #{$property}: $value;
378
+ }
379
+ }
340
380
  }
341
381
  }
342
382
  }