@oardi/css-utils 0.73.0 → 0.73.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.73.0",
3
+ "version": "0.73.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",
package/scss/text.scss CHANGED
@@ -1,35 +1,6 @@
1
1
  @use 'sass:map';
2
2
  @use './theme.scss' as theme;
3
3
 
4
- $-line-heights: (
5
- xs: 1,
6
- sm: 1.125,
7
- md: 1.25,
8
- base: var(--line-height),
9
- lg: 1.5,
10
- xl: 1.75,
11
- xxl: 2,
12
- xxxl: 2.5,
13
- );
14
-
15
- $-font-sizes: (
16
- xs: 0.75,
17
- sm: 0.875,
18
- md: 1,
19
- lg: 1.125,
20
- xl: 1.25,
21
- xxl: 1.5,
22
- xxxl: 2,
23
- );
24
-
25
- @layer base {
26
- :root {
27
- @each $name, $value in $-font-sizes {
28
- --font-size-#{$name}: #{$value}rem;
29
- }
30
- }
31
- }
32
-
33
4
  @layer utilities {
34
5
  .text-center {
35
6
  text-align: center;
@@ -85,15 +56,15 @@ $-font-sizes: (
85
56
  }
86
57
  }
87
58
 
88
- @each $name, $value in $-font-sizes {
59
+ @each $name, $value in map.get(theme.$theme, fontSizes) {
89
60
  .text-#{$name} {
90
61
  font-size: var(--font-size-#{$name});
91
62
  }
92
63
  }
93
64
 
94
- @each $name, $value in $-line-heights {
65
+ @each $name, $value in map.get(theme.$theme, lineHeights) {
95
66
  .lh-#{$name} {
96
- line-height: $value;
67
+ line-height: var(--line-height-#{$name});
97
68
  }
98
69
  }
99
70
  }
package/scss/theme.scss CHANGED
@@ -129,6 +129,24 @@ $default-theme: (
129
129
  xl: 1200px,
130
130
  xxl: 1400px,
131
131
  ),
132
+ lineHeights: (
133
+ xs: 1,
134
+ sm: 1.125,
135
+ md: 1.25,
136
+ lg: 1.5,
137
+ xl: 1.75,
138
+ xxl: 2,
139
+ xxxl: 2.5,
140
+ ),
141
+ fontSizes: (
142
+ xs: 0.75rem,
143
+ sm: 0.875rem,
144
+ md: 1rem,
145
+ lg: 1.125rem,
146
+ xl: 1.25rem,
147
+ xxl: 1.5rem,
148
+ xxxl: 2rem,
149
+ ),
132
150
  );
133
151
 
134
152
  $theme: () !default; // user overrides via with()
@@ -41,7 +41,15 @@
41
41
  }
42
42
 
43
43
  --line-height: 1.8;
44
+ @each $name, $value in map.get(theme.$theme, lineHeights) {
45
+ --line-height-#{$name}: #{$value};
46
+ }
47
+
44
48
  --font-size: 16px;
49
+ @each $name, $value in map.get(theme.$theme, fontSizes) {
50
+ --font-size-#{$name}: #{$value};
51
+ }
52
+
45
53
  --font-weight: 400;
46
54
  --font-family: 'Inter', sans-serif;
47
55