@oardi/css-utils 0.72.1 → 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.72.1",
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
@@ -56,31 +56,15 @@
56
56
  }
57
57
  }
58
58
 
59
- .text-xs {
60
- font-size: var(--font-size-xs);
61
- }
62
-
63
- .text-sm {
64
- font-size: var(--font-size-sm);
65
- }
66
-
67
- .text-md {
68
- font-size: var(--font-size-md);
69
- }
70
-
71
- .text-lg {
72
- font-size: var(--font-size-lg);
73
- }
74
-
75
- .text-xl {
76
- font-size: var(--font-size-xl);
77
- }
78
-
79
- .text-xxl {
80
- font-size: var(--font-size-xxl);
59
+ @each $name, $value in map.get(theme.$theme, fontSizes) {
60
+ .text-#{$name} {
61
+ font-size: var(--font-size-#{$name});
62
+ }
81
63
  }
82
64
 
83
- .text-xxxl {
84
- font-size: var(--font-size-xxxl);
65
+ @each $name, $value in map.get(theme.$theme, lineHeights) {
66
+ .lh-#{$name} {
67
+ line-height: var(--line-height-#{$name});
68
+ }
85
69
  }
86
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()
@@ -6,14 +6,6 @@
6
6
  --h4: 500 1.35rem var(--font-family);
7
7
  --h5: 500 1.25rem var(--font-family);
8
8
  --h6: 500 1rem var(--font-family);
9
-
10
- --font-size-xs: 0.75rem;
11
- --font-size-sm: 0.875rem;
12
- --font-size-md: 1rem;
13
- --font-size-lg: 1.125rem;
14
- --font-size-xl: 1.25rem;
15
- --font-size-xxl: 1.5rem;
16
- --font-size-xxxl: 2rem;
17
9
  }
18
10
 
19
11
  small {
@@ -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