@oardi/css-utils 0.100.0 → 0.102.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.100.0",
3
+ "version": "0.102.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",
@@ -158,7 +158,7 @@
158
158
  }
159
159
  }
160
160
 
161
- @include bp.media(md) {
161
+ @include bp.media-up(md) {
162
162
  .stepper-horizontal {
163
163
  flex-direction: row;
164
164
  inline-size: 100%;
@@ -1,7 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../theme.scss' as theme;
3
3
 
4
- @mixin media($size) {
4
+ @mixin media-up($size) {
5
5
  $bps: map.get(theme.$theme, breakpoints);
6
6
 
7
7
  @if map.has-key($bps, $size) {
@@ -13,6 +13,20 @@
13
13
  }
14
14
  }
15
15
 
16
+ @mixin media-below($size) {
17
+ $bps: map.get(theme.$theme, breakpoints);
18
+
19
+ @if map.has-key($bps, $size) {
20
+ $breakpoint: map.get($bps, $size);
21
+
22
+ @media (max-width: calc(#{$breakpoint} - 0.02px)) {
23
+ @content;
24
+ }
25
+ } @else {
26
+ @error "Breakpoint `#{$size}` not found!";
27
+ }
28
+ }
29
+
16
30
  // usage
17
31
  // @use '@oardi/css-utils/scss/mixins/breakpoints' as bp;
18
32
  // @include bp.media(md) {
package/scss/theme.scss CHANGED
@@ -121,6 +121,11 @@ $default-theme: (
121
121
  1: 1,
122
122
  2: 2,
123
123
  3: 3,
124
+ header: 1000,
125
+ tooltip: 1010,
126
+ overlay: 1040,
127
+ drawer: 1050,
128
+ toast: 1060,
124
129
  ),
125
130
  breakpoints: (
126
131
  sm: 576px,
@@ -374,7 +374,7 @@ $-overflow-wrap-values: normal, break-word, anywhere;
374
374
 
375
375
  @each $name, $value in map.get(theme.$theme, zIndexLevels) {
376
376
  .z-index-#{$name} {
377
- z-index: $value;
377
+ z-index: var(--z-index-#{$name});
378
378
  }
379
379
  }
380
380
 
@@ -90,12 +90,6 @@
90
90
  --z-index-#{$name}: #{$value};
91
91
  }
92
92
 
93
- --z-index-header: 1000;
94
- --z-index-tooltip: 1010;
95
- --z-index-overlay: 1040;
96
- --z-index-drawer: 1050;
97
- --z-index-toast: 1060;
98
-
99
93
  /* deprecated alias */
100
94
  --bg-color: var(--bg-body);
101
95
  --body-bg-color: var(--bg-body);