@oardi/css-utils 0.19.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.
@@ -0,0 +1,63 @@
1
+ $theme: (
2
+ colors: (
3
+ primary: #715acd,
4
+ secondary: #595959,
5
+ success: #16a085,
6
+ error: #f03e3e,
7
+ ),
8
+ on-colors: (
9
+ primary: #ffffff,
10
+ secondary: #ffffff,
11
+ success: #ffffff,
12
+ error: #ffffff,
13
+ ),
14
+ grays: (
15
+ 10: hsl(210, 10%, 10%),
16
+ 20: hsl(210, 10%, 15%),
17
+ 30: hsl(210, 10%, 30%),
18
+ 40: hsl(210, 10%, 40%),
19
+ 50: hsl(210, 10%, 50%),
20
+ 60: hsl(210, 10%, 60%),
21
+ 70: hsl(210, 10%, 70%),
22
+ 80: hsl(210, 10%, 80%),
23
+ 90: hsl(210, 10%, 90%),
24
+ ),
25
+ directions: (
26
+ t: top,
27
+ r: right,
28
+ b: bottom,
29
+ l: left,
30
+ ),
31
+ spacings: (
32
+ 0: 0rem,
33
+ 1: 1rem,
34
+ 2: 2rem,
35
+ 3: 3rem,
36
+ 4: 4rem,
37
+ 5: 5rem,
38
+ ),
39
+ positions: (
40
+ relative,
41
+ absolute,
42
+ fixed,
43
+ static,
44
+ sticky,
45
+ inherit,
46
+ initial,
47
+ unset,
48
+ ),
49
+ zIndexLevels: (
50
+ n1: -1,
51
+ 0: 0,
52
+ 1: 1,
53
+ 2: 2,
54
+ 3: 3,
55
+ ),
56
+ breakpoints: (
57
+ sm: 576px,
58
+ md: 768px,
59
+ lg: 992px,
60
+ xl: 1200px,
61
+ xxl: 1400px,
62
+ ),
63
+ ) !default;
@@ -0,0 +1,72 @@
1
+ :root {
2
+ --line-height: 1.5;
3
+ --font-size: 16px;
4
+ --font-weight: 400;
5
+ --font-family: 'Inter', sans-serif;
6
+
7
+ --h1: var(--font-weight) 2.3rem var(--font-family);
8
+ --h2: var(--font-weight) 2rem var(--font-family);
9
+ --h3: var(--font-weight) 1.8rem var(--font-family);
10
+ --h4: var(--font-weight) 1.6rem var(--font-family);
11
+ --h5: var(--font-weight) 1.4rem var(--font-family);
12
+ --h6: var(--font-weight) 1.2rem var(--font-family);
13
+ }
14
+
15
+ small {
16
+ font-size: 0.833rem;
17
+ }
18
+
19
+ h1,
20
+ h2,
21
+ h3,
22
+ h4,
23
+ h5,
24
+ h6 {
25
+ margin: 0 0 0.5rem 0;
26
+ line-height: 1.2;
27
+ }
28
+
29
+ h1,
30
+ .h1 {
31
+ font: var(--h1);
32
+ letter-spacing: -1px;
33
+ }
34
+
35
+ h2,
36
+ .h2 {
37
+ font: var(--h2);
38
+ }
39
+
40
+ h3,
41
+ .h3 {
42
+ font: var(--h3);
43
+ }
44
+
45
+ h4,
46
+ .h4 {
47
+ font: var(--h4);
48
+ }
49
+
50
+ h5,
51
+ .h5 {
52
+ font: var(--h5);
53
+ }
54
+
55
+ h6,
56
+ .h6 {
57
+ font: var(--h6);
58
+ line-height: var(--line-height);
59
+ }
60
+
61
+ a {
62
+ color: var(--primary);
63
+ fill: var(--primary);
64
+ text-decoration: none;
65
+ &:hover {
66
+ text-decoration: underline;
67
+ }
68
+ }
69
+
70
+ p {
71
+ margin-bottom: 1rem;
72
+ }
@@ -0,0 +1,194 @@
1
+ @use 'sass:map';
2
+ @use './theme.scss';
3
+
4
+ .d-none {
5
+ display: none;
6
+ }
7
+
8
+ // positions
9
+ @each $value in map.get(theme.$theme, positions) {
10
+ .position-#{$value} {
11
+ position: $value !important;
12
+ }
13
+ }
14
+
15
+ .container {
16
+ max-width: var(--container);
17
+ margin-left: auto;
18
+ margin-right: auto;
19
+ padding-left: 2rem;
20
+ padding-right: 2rem;
21
+ width: 100%;
22
+
23
+ // use breakpoint utility
24
+ @media (max-width: 576px) {
25
+ padding-left: 1.25rem;
26
+ padding-right: 1.25rem;
27
+ }
28
+ }
29
+
30
+ .text-center {
31
+ text-align: center;
32
+ }
33
+
34
+ .text-left {
35
+ text-align: left;
36
+ }
37
+
38
+ .text-right {
39
+ text-align: right;
40
+ }
41
+
42
+ .text-white {
43
+ color: var(--white);
44
+ }
45
+
46
+ .text-dark {
47
+ color: var(--black);
48
+ }
49
+
50
+ @each $name, $value in map.get(theme.$theme, colors) {
51
+ .text-#{$name} {
52
+ color: var(--#{$name});
53
+ }
54
+
55
+ .bg-#{$name}-light {
56
+ background-color: var(--#{$name}-light);
57
+ color: var(--on-#{$name});
58
+ }
59
+
60
+ .bg-#{$name} {
61
+ background-color: var(--#{$name});
62
+ color: var(--on-#{$name});
63
+ }
64
+
65
+ .bg-#{$name}-dark {
66
+ background-color: var(--#{$name}-dark);
67
+ color: var(--on-#{$name});
68
+ }
69
+ }
70
+
71
+ @each $name, $value in map.get(theme.$theme, grays) {
72
+ .text-gray-#{$name} {
73
+ color: var(--gray-#{$name});
74
+ }
75
+
76
+ .bg-gray-#{$name} {
77
+ background-color: var(--gray-#{$name});
78
+ }
79
+ }
80
+
81
+ .bg-white {
82
+ background-color: var(--white);
83
+ }
84
+
85
+ .img-responsive {
86
+ width: 100%;
87
+ }
88
+
89
+ .rounded-circle {
90
+ border-radius: 50%;
91
+ }
92
+
93
+ .shadow-light {
94
+ box-shadow: var(--shadow-light);
95
+ }
96
+
97
+ .shadow {
98
+ box-shadow: var(--shadow);
99
+ }
100
+
101
+ .shadow-dark {
102
+ box-shadow: var(--shadow-dark);
103
+ }
104
+
105
+ .w-100 {
106
+ width: 100%;
107
+ }
108
+
109
+ .w-60 {
110
+ width: 60%;
111
+ }
112
+
113
+ .w-50 {
114
+ width: 50%;
115
+ }
116
+
117
+ .w-40 {
118
+ width: 40%;
119
+ }
120
+
121
+ .h-100 {
122
+ height: 100%;
123
+ }
124
+
125
+ // TODO - check if more classes are needed
126
+ .top-0 {
127
+ top: 0px;
128
+ }
129
+
130
+ .right-0 {
131
+ right: 0px;
132
+ }
133
+
134
+ .bottom-0 {
135
+ bottom: 0px;
136
+ }
137
+
138
+ .left-0 {
139
+ left: 0px;
140
+ }
141
+
142
+ .fixed-top {
143
+ position: fixed;
144
+ top: 0;
145
+ right: 0;
146
+ left: 0;
147
+ z-index: 1030;
148
+ }
149
+
150
+ .overflow-y-scroll {
151
+ overflow-y: scroll;
152
+ }
153
+
154
+ .no-scroll {
155
+ overflow: hidden;
156
+ position: fixed;
157
+ width: 100%;
158
+ height: 100%;
159
+ }
160
+
161
+ // width, height, display with breakpoints and directions
162
+ @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
163
+ @media (min-width: #{$bp-value}) {
164
+ .w-#{$bp}-100 {
165
+ width: 100% !important;
166
+ }
167
+
168
+ .w-#{$bp}-60 {
169
+ width: 60% !important;
170
+ }
171
+
172
+ .w-#{$bp}-50 {
173
+ width: 50% !important;
174
+ }
175
+
176
+ .w-#{$bp}-40 {
177
+ width: 40% !important;
178
+ }
179
+
180
+ .w-#{$bp}-30 {
181
+ width: 30% !important;
182
+ }
183
+
184
+ .d-#{$bp}-block {
185
+ display: block !important;
186
+ }
187
+ }
188
+ }
189
+
190
+ @each $name, $value in map.get(theme.$theme, zIndexLevels) {
191
+ .z-index-#{$name} {
192
+ z-index: $value;
193
+ }
194
+ }
@@ -0,0 +1,38 @@
1
+ @use 'sass:color';
2
+ @use 'sass:map';
3
+ @use './theme.scss';
4
+
5
+ :root {
6
+ --white: #ffffff;
7
+ --black: #000000;
8
+
9
+ --font-color: #000000;
10
+ --body-bg-color: #f9f9f9;
11
+
12
+ @each $name, $value in map.get(theme.$theme, colors) {
13
+ --#{$name}-light: #{color.adjust($value, $lightness: 15%)};
14
+ --#{$name}: #{$value};
15
+ --#{$name}-dark: #{color.adjust($value, $lightness: -15%)};
16
+ --text-#{$name}: #{$value};
17
+ }
18
+
19
+ @each $name, $value in map.get(theme.$theme, on-colors) {
20
+ --on-#{$name}: #{$value};
21
+ }
22
+
23
+ @each $name, $value in map.get(theme.$theme, grays) {
24
+ --gray-#{$name}: #{$value};
25
+ }
26
+
27
+ --highlight: rgba(189, 189, 189, 0.1);
28
+ --border-radius: 6px;
29
+
30
+ --shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.075);
31
+ --shadow-dark: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.1);
32
+ --shadow-light: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.005);
33
+
34
+ --box-shadow: 0 0 0 0.2rem var(--primary-light);
35
+ --box-shadow-error: 0 0 0 0.2rem var(--error-light);
36
+
37
+ --container: 900px;
38
+ }