@oardi/css-utils 0.34.2 → 0.35.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.34.2",
3
+ "version": "0.35.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/borders.scss CHANGED
@@ -1,6 +1,8 @@
1
1
  @use 'sass:map';
2
2
  @use './theme.scss';
3
3
 
4
+ $borderWidths: 0, 1, 2, 3, 4, 5;
5
+
4
6
  .border {
5
7
  border: var(--border-width) solid var(--border-color) !important;
6
8
  }
@@ -11,28 +13,11 @@
11
13
  }
12
14
  }
13
15
 
14
- .border-0 {
15
- border: 0 !important;
16
- }
17
-
18
- .border-1 {
19
- --border-width: 1px;
20
- }
21
-
22
- .border-2 {
23
- --border-width: 2px;
24
- }
25
-
26
- .border-3 {
27
- --border-width: 3px;
28
- }
29
-
30
- .border-4 {
31
- --border-width: 4px;
32
- }
33
-
34
- .border-5 {
35
- --border-width: 5px;
16
+ // border widths
17
+ @each $borderWidth in $borderWidths {
18
+ .border-#{$borderWidth} {
19
+ --border-width: #{$borderWidth}px !important;
20
+ }
36
21
  }
37
22
 
38
23
  @each $name, $value in map.get(theme.$theme, colors) {
@@ -1,7 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../theme.scss' as theme;
3
3
 
4
- .btn-base {
4
+ %btn-base {
5
5
  --button-padding-y: 0.25rem;
6
6
  --button-padding-x: 0.9rem;
7
7
  --button-font-size: var(--font-size);
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  .btn {
42
- @extend .btn-base;
42
+ @extend %btn-base;
43
43
 
44
44
  --button-border-radius: var(--border-radius);
45
45
  --button-disabled-font-color: var(--disabled-font-color);
@@ -7,6 +7,7 @@
7
7
  --card-border-color: var(--border-color);
8
8
  --card-border-radius: var(--border-radius);
9
9
  --card-bg-hover-color: var(--gray-900);
10
+ --card-title-spacer-y: var(--spacer-2);
10
11
 
11
12
  background-color: var(--card-bg-color);
12
13
  border: var(--card-border-width) solid var(--card-border-color);
@@ -17,8 +18,14 @@
17
18
  cursor: pointer;
18
19
  }
19
20
 
20
- .card-title + * {
21
- @extend .mt-3;
21
+ .card-title {
22
+ margin-bottom: var(--card-title-spacer-y);
23
+ }
24
+
25
+ .card-subtitle {
26
+ color: var(--gray-500);
27
+ margin-top: calc(-0.5 * var(--card-title-spacer-y));
28
+ margin-bottom: var(--card-title-spacer-y);
22
29
  }
23
30
 
24
31
  .card-body {
@@ -1,7 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../theme.scss';
3
3
 
4
- .chip-base {
4
+ %chip-base {
5
5
  --chip-label-font-size: 0.9rem;
6
6
  --chip-label-padding: 0 7px;
7
7
  --chip-border-radius: 16px;
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  .chip {
34
- @extend .chip-base;
34
+ @extend %chip-base;
35
35
 
36
36
  border-radius: var(--chip-border-radius);
37
37
  line-height: var(--line-height);
@@ -1,15 +1,15 @@
1
1
  :root {
2
- --line-height: 1.6;
2
+ --line-height: 1.7;
3
3
  --font-size: 16px;
4
4
  --font-weight: 400;
5
5
  --font-family: 'Inter', sans-serif;
6
6
 
7
- --h1: var(--font-weight) 2.25rem var(--font-family);
8
- --h2: var(--font-weight) 2rem var(--font-family);
9
- --h3: var(--font-weight) 1.45rem var(--font-family);
10
- --h4: var(--font-weight) 1.35rem var(--font-family);
11
- --h5: var(--font-weight) 1.25rem var(--font-family);
12
- --h6: var(--font-weight) 1.2rem var(--font-family);
7
+ --h1: 500 2.25rem var(--font-family);
8
+ --h2: 500 2rem var(--font-family);
9
+ --h3: 500 1.45rem var(--font-family);
10
+ --h4: 500 1.35rem var(--font-family);
11
+ --h5: 500 1.25rem var(--font-family);
12
+ --h6: 500 1rem var(--font-family);
13
13
  }
14
14
 
15
15
  small {
@@ -28,8 +28,8 @@ h5,
28
28
  .h5,
29
29
  h6,
30
30
  .h6 {
31
- margin: 0;
32
31
  line-height: 1.2;
32
+ margin: 0;
33
33
  margin-bottom: 0.5rem;
34
34
  }
35
35
 
@@ -62,7 +62,6 @@ h5,
62
62
  h6,
63
63
  .h6 {
64
64
  font: var(--h6);
65
- line-height: var(--line-height);
66
65
  }
67
66
 
68
67
  a {
@@ -85,6 +84,5 @@ a {
85
84
 
86
85
  p {
87
86
  --paragraph-margin: 0 0 0.5rem 0;
88
-
89
87
  margin: var(--paragraph-margin);
90
88
  }