minolith 0.0.26 → 0.0.28

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": "minolith",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "design system by minominolyly",
5
5
  "main": "src/minolith.scss",
6
6
  "scripts": {
@@ -5,4 +5,5 @@
5
5
  background-color: var(--#{variables.$prefix}color-default-back);
6
6
  font-family: var(--#{variables.$prefix}font-family-main);
7
7
  z-index: var(--#{variables.$prefix}z-index-tabula);
8
+ text-size-adjust: 100%;
8
9
  }
@@ -30,6 +30,7 @@
30
30
  display: block;
31
31
  padding: 1rem;
32
32
  position: relative;
33
+ touch-action: manipulation;
33
34
  list-style: none;
34
35
  &::marker,
35
36
  &::-webkit-details-marker {
@@ -13,6 +13,7 @@
13
13
  @include mixins.element();
14
14
  position: relative;
15
15
  color: var(--#{variables.$prefix}color-default-blockquote-fore);
16
+ background-color: var(--#{variables.$prefix}color-default-blockquote-back);
16
17
  border-left-color: var(--#{variables.$prefix}color-default-blockquote-border);
17
18
  border-left-style: solid;
18
19
  border-left-width: var(--#{variables.$prefix}blockquote-border-left-width);
@@ -31,7 +32,7 @@
31
32
  top: 0;
32
33
  overflow-y: hidden;
33
34
  height: calc(var(--#{variables.$prefix}blockquote-icon-font-size) / 2);
34
- width: var(--#{variables.$prefix}blockquote-icon-font-size);
35
+ width: calc(var(--#{variables.$prefix}blockquote-icon-font-size) / 2);
35
36
  left: 0.5rem;
36
37
  quotes: initial;
37
38
  content: open-quote;
@@ -49,7 +50,7 @@
49
50
  bottom: 0;
50
51
  overflow-y: hidden;
51
52
  height: calc(var(--#{variables.$prefix}blockquote-icon-font-size) / 2);
52
- width: var(--#{variables.$prefix}blockquote-icon-font-size);
53
+ width: calc(var(--#{variables.$prefix}blockquote-icon-font-size) / 2);
53
54
  right: 0.5rem;
54
55
  quotes: initial;
55
56
  content: close-quote;
@@ -64,6 +65,7 @@
64
65
  @each $color in variables.$colors {
65
66
  $colorName: map.get($color, "name");
66
67
  &.is-#{$colorName} {
68
+ background-color: var(--#{variables.$prefix}color-#{$colorName}-blockquote-back);
67
69
  border-left-color: var(
68
70
  --#{variables.$prefix}color-#{$colorName}-blockquote-border
69
71
  );
@@ -3,6 +3,73 @@
3
3
  @use "../variables/index.scss" as variables;
4
4
  @use "../mixins/index.scss" as mixins;
5
5
 
6
+ @mixin forecolor($colorName, $numStr) {
7
+ @if ($colorName == "rainbow") {
8
+ background-clip: text !important;
9
+ background-image: linear-gradient(
10
+ 135deg,
11
+ var(--#{variables.$prefix}color-red-#{$numStr}),
12
+ var(--#{variables.$prefix}color-orange-#{$numStr}),
13
+ var(--#{variables.$prefix}color-yellow-#{$numStr}),
14
+ var(--#{variables.$prefix}color-green-#{$numStr}),
15
+ var(--#{variables.$prefix}color-cyan-#{$numStr}),
16
+ var(--#{variables.$prefix}color-blue-#{$numStr}),
17
+ var(--#{variables.$prefix}color-violet-#{$numStr}),
18
+ var(--#{variables.$prefix}color-magenta-#{$numStr})
19
+ ) !important;
20
+ color: transparent !important;
21
+ } @else {
22
+ color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
23
+ }
24
+ }
25
+
26
+ @mixin backcolor($colorName, $numStr) {
27
+ @if ($colorName == "rainbow") {
28
+ background-image: linear-gradient(
29
+ 135deg,
30
+ var(--#{variables.$prefix}color-red-#{$numStr}),
31
+ var(--#{variables.$prefix}color-orange-#{$numStr}),
32
+ var(--#{variables.$prefix}color-yellow-#{$numStr}),
33
+ var(--#{variables.$prefix}color-green-#{$numStr}),
34
+ var(--#{variables.$prefix}color-cyan-#{$numStr}),
35
+ var(--#{variables.$prefix}color-blue-#{$numStr}),
36
+ var(--#{variables.$prefix}color-violet-#{$numStr}),
37
+ var(--#{variables.$prefix}color-magenta-#{$numStr})
38
+ ) !important;
39
+ } @else {
40
+ background-color: var(
41
+ --#{variables.$prefix}color-#{$colorName}-#{$numStr}
42
+ ) !important;
43
+ }
44
+ }
45
+
46
+ @mixin bordercolor($colorName, $numStr, $borderSide: "") {
47
+ @if ($borderSide == "") {
48
+ @if ($colorName == "rainbow") {
49
+ // not available
50
+ } @else {
51
+ border-color: var(
52
+ --#{variables.$prefix}color-#{$colorName}-#{$numStr}
53
+ ) !important;
54
+ }
55
+ } @else {
56
+ @if ($colorName == "rainbow") {
57
+ // not available
58
+ } @else {
59
+ border-#{$borderSide}-color: var(
60
+ --#{variables.$prefix}color-#{$colorName}-#{$numStr}
61
+ ) !important;
62
+ }
63
+ }
64
+ }
65
+
66
+ @mixin highlighter($colorName, $numStr) {
67
+ background: linear-gradient(
68
+ transparent 66.66%,
69
+ var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) 33.33%
70
+ ) !important;
71
+ }
72
+
6
73
  @mixin colorUtilities($colorScheme: "") {
7
74
  $derived: "";
8
75
  @if $colorScheme != "" {
@@ -19,118 +86,110 @@
19
86
  }
20
87
  //#region forecolor
21
88
  .forecolor#{$derived}-#{$colorName}-#{$numStr} {
22
- color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
89
+ @include forecolor($colorName, $numStr);
23
90
  }
24
91
  .forecolor#{$derived}-hover-#{$colorName}-#{$numStr} {
25
92
  &:hover {
26
- color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
93
+ @include forecolor($colorName, $numStr);
27
94
  }
28
95
  }
29
96
  .forecolor#{$derived}-#{$colorName}-focus-#{$numStr} {
30
97
  &:focus {
31
- color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
98
+ @include forecolor($colorName, $numStr);
32
99
  }
33
100
  }
34
101
  .forecolor#{$derived}-#{$colorName}-active-#{$numStr} {
35
102
  &:active {
36
- color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
103
+ @include forecolor($colorName, $numStr);
37
104
  }
38
105
  }
39
106
  .forecolor#{$derived}-#{$colorName}-disabled-#{$numStr} {
40
107
  &[disabled],
41
108
  fieldset[disabled] {
42
- color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
109
+ @include forecolor($colorName, $numStr);
43
110
  }
44
111
  }
45
112
  //#endregion forecolor
46
113
 
47
114
  //#region backcolor
48
115
  .backcolor#{$derived}-#{$colorName}-#{$numStr} {
49
- background-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
116
+ @include backcolor($colorName, $numStr);
50
117
  }
51
118
  .backcolor#{$derived}-hover-#{$colorName}-#{$numStr} {
52
119
  &:hover {
53
- background-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
120
+ @include backcolor($colorName, $numStr);
54
121
  }
55
122
  }
56
123
  .backcolor#{$derived}-#{$colorName}-focus-#{$numStr} {
57
124
  &:focus {
58
- background-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
125
+ @include backcolor($colorName, $numStr);
59
126
  }
60
127
  }
61
128
  .backcolor#{$derived}-#{$colorName}-active-#{$numStr} {
62
129
  &:active {
63
- background-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
130
+ @include backcolor($colorName, $numStr);
64
131
  }
65
132
  }
66
133
  .backcolor#{$derived}-#{$colorName}-disabled-#{$numStr} {
67
134
  &[disabled],
68
135
  fieldset[disabled] {
69
- background-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
136
+ @include backcolor($colorName, $numStr);
70
137
  }
71
138
  }
72
139
  //#endregion backcolor
73
140
 
74
141
  //#region bordercolor
75
142
  .bordercolor#{$derived}-#{$colorName}-#{$numStr} {
76
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
143
+ @include bordercolor($colorName, $numStr);
77
144
  }
78
145
  .bordercolor#{$derived}-#{$colorName}-#{$numStr} {
79
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
146
+ @include bordercolor($colorName, $numStr);
80
147
  }
81
148
  .bordercolor#{$derived}-hover-#{$colorName}-#{$numStr} {
82
149
  &:hover {
83
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
150
+ @include bordercolor($colorName, $numStr);
84
151
  }
85
152
  }
86
153
  .bordercolor#{$derived}-#{$colorName}-focus-#{$numStr} {
87
154
  &:focus {
88
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
155
+ @include bordercolor($colorName, $numStr);
89
156
  }
90
157
  }
91
158
  .bordercolor#{$derived}-#{$colorName}-active-#{$numStr} {
92
159
  &:active {
93
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
160
+ @include bordercolor($colorName, $numStr);
94
161
  }
95
162
  }
96
163
  .bordercolor#{$derived}-#{$colorName}-disabled-#{$numStr} {
97
164
  &[disabled],
98
165
  fieldset[disabled] {
99
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
166
+ @include bordercolor($colorName, $numStr);
100
167
  }
101
168
  }
102
169
 
103
170
  @each $borderSide in variables.$borderSides {
104
171
  .bordercolor#{$derived}-#{$borderSide}-#{$colorName}-#{$numStr} {
105
- border-#{$borderSide}-color: var(
106
- --#{variables.$prefix}color-#{$colorName}-#{$numStr}
107
- ) !important;
172
+ @include bordercolor($colorName, $numStr, $borderSide);
108
173
  }
109
174
  .bordercolor#{$derived}-#{$borderSide}-hover-#{$colorName}-#{$numStr} {
110
175
  &:hover {
111
- border-#{$borderSide}-color: var(
112
- --#{variables.$prefix}color-#{$colorName}-#{$numStr}
113
- ) !important;
176
+ @include bordercolor($colorName, $numStr, $borderSide);
114
177
  }
115
178
  }
116
179
  .bordercolor#{$derived}-#{$borderSide}-#{$colorName}-focus-#{$numStr} {
117
180
  &:focus {
118
- border-#{$borderSide}-color: var(
119
- --#{variables.$prefix}color-#{$colorName}-#{$numStr}
120
- ) !important;
181
+ @include bordercolor($colorName, $numStr, $borderSide);
121
182
  }
122
183
  }
123
184
  .bordercolor#{$derived}-#{$borderSide}-#{$colorName}-active-#{$numStr} {
124
185
  &:active {
125
- border-color: var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) !important;
186
+ @include bordercolor($colorName, $numStr, $borderSide);
126
187
  }
127
188
  }
128
189
  .bordercolor#{$derived}-#{$borderSide}-#{$colorName}-disabled-#{$numStr} {
129
190
  &[disabled],
130
191
  fieldset[disabled] {
131
- border-#{$borderSide}-color: var(
132
- --#{variables.$prefix}color-#{$colorName}-#{$numStr}
133
- ) !important;
192
+ @include bordercolor($colorName, $numStr, $borderSide);
134
193
  }
135
194
  }
136
195
  }
@@ -138,48 +197,125 @@
138
197
 
139
198
  //#region highlighter
140
199
  .highlighter#{$derived}-#{$colorName}-#{$numStr} {
141
- background: linear-gradient(
142
- transparent 66.66%,
143
- var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) 33.33%
144
- ) !important;
200
+ @include highlighter($colorName, $numStr);
145
201
  }
146
202
  .highlighter#{$derived}-hover-#{$colorName}-#{$numStr} {
147
203
  &:hover {
148
- background: linear-gradient(
149
- transparent 66.66%,
150
- var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) 33.33%
151
- ) !important;
204
+ @include highlighter($colorName, $numStr);
152
205
  }
153
206
  }
154
207
  .highlighter#{$derived}-#{$colorName}-focus-#{$numStr} {
155
208
  &:focus {
156
- background: linear-gradient(
157
- transparent 66.66%,
158
- var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) 33.33%
159
- ) !important;
209
+ @include highlighter($colorName, $numStr);
160
210
  }
161
211
  }
162
212
  .highlighter#{$derived}-#{$colorName}-active-#{$numStr} {
163
213
  &:active {
164
- background: linear-gradient(
165
- transparent 66.66%,
166
- var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) 33.33%
167
- ) !important;
214
+ @include highlighter($colorName, $numStr);
168
215
  }
169
216
  }
170
217
  .highlighter#{$derived}-#{$colorName}-disabled-#{$numStr} {
171
218
  &[disabled],
172
219
  fieldset[disabled] {
173
- background: linear-gradient(
174
- transparent 66.66%,
175
- var(--#{variables.$prefix}color-#{$colorName}-#{$numStr}) 33.33%
176
- ) !important;
220
+ @include highlighter($colorName, $numStr);
177
221
  }
178
222
  }
179
223
  //#endregion highlighter
224
+ }
225
+ }
226
+
227
+ //#region rainbow
228
+
229
+ $numStr: "00";
230
+ @for $p from 1 through 19 {
231
+ $numStr: "#{($p * 5)}";
232
+ @if (string.length($numStr) == 1) {
233
+ $numStr: "0" + $numStr;
234
+ }
235
+ //#region forecolor
236
+ .forecolor#{$derived}-rainbow-#{$numStr} {
237
+ @include forecolor("rainbow", $numStr);
238
+ }
239
+ .forecolor#{$derived}-hover-rainbow-#{$numStr} {
240
+ &:hover {
241
+ @include forecolor("rainbow", $numStr);
242
+ }
243
+ }
244
+ .forecolor#{$derived}-rainbow-focus-#{$numStr} {
245
+ &:focus {
246
+ @include forecolor("rainbow", $numStr);
247
+ }
248
+ }
249
+ .forecolor#{$derived}-rainbow-active-#{$numStr} {
250
+ &:active {
251
+ @include forecolor("rainbow", $numStr);
252
+ }
253
+ }
254
+ .forecolor#{$derived}-rainbow-disabled-#{$numStr} {
255
+ &[disabled],
256
+ fieldset[disabled] {
257
+ @include forecolor("rainbow", $numStr);
258
+ }
259
+ }
260
+ //#endregion forecolor
180
261
 
262
+ //#region backcolor
263
+ .backcolor#{$derived}-rainbow-#{$numStr} {
264
+ @include backcolor("rainbow", $numStr);
265
+ }
266
+ .backcolor#{$derived}-hover-rainbow-#{$numStr} {
267
+ &:hover {
268
+ @include backcolor("rainbow", $numStr);
269
+ }
270
+ }
271
+ .backcolor#{$derived}-rainbow-focus-#{$numStr} {
272
+ &:focus {
273
+ @include backcolor("rainbow", $numStr);
274
+ }
275
+ }
276
+ .backcolor#{$derived}-rainbow-active-#{$numStr} {
277
+ &:active {
278
+ @include backcolor("rainbow", $numStr);
279
+ }
280
+ }
281
+ .backcolor#{$derived}-rainbow-disabled-#{$numStr} {
282
+ &[disabled],
283
+ fieldset[disabled] {
284
+ @include backcolor("rainbow", $numStr);
285
+ }
286
+ }
287
+ //#endregion backcolor
288
+
289
+ // bordercolor is not available
290
+
291
+ // highlighter is not available
292
+ .highlighter#{$derived}-rainbow-#{$numStr} {
293
+ @include highlighter("rainbow", $numStr);
294
+ }
295
+ .highlighter#{$derived}-hover-rainbow-#{$numStr} {
296
+ &:hover {
297
+ @include highlighter("rainbow", $numStr);
298
+ }
299
+ }
300
+ .highlighter#{$derived}-rainbow-focus-#{$numStr} {
301
+ &:focus {
302
+ @include highlighter("rainbow", $numStr);
303
+ }
304
+ }
305
+ .highlighter#{$derived}-rainbow-active-#{$numStr} {
306
+ &:active {
307
+ @include highlighter("rainbow", $numStr);
308
+ }
309
+ }
310
+ .highlighter#{$derived}-rainbow-disabled-#{$numStr} {
311
+ &[disabled],
312
+ fieldset[disabled] {
313
+ @include highlighter("rainbow", $numStr);
314
+ }
181
315
  }
316
+ //#endregion highlighter
182
317
  }
318
+ //#endregion rainbow
183
319
  }
184
320
 
185
321
  @include colorUtilities();
@@ -40,80 +40,73 @@
40
40
  height: auto !important;
41
41
  }
42
42
 
43
- .aspect-ratio-square {
44
- aspect-ratio: 1 / 1;
43
+ @mixin aspect-ratio-base() {
44
+ contain: strict;
45
45
  width: 100%;
46
46
  height: auto;
47
47
  }
48
48
 
49
+ .aspect-ratio-square {
50
+ @include aspect-ratio-base();
51
+ aspect-ratio: 1 / 1;
52
+ }
53
+
49
54
  .aspect-ratio-paper-landscape {
55
+ @include aspect-ratio-base();
50
56
  aspect-ratio: 1.414 / 1;
51
- width: 100%;
52
- height: auto;
53
57
  }
54
58
 
55
59
  .aspect-ratio-paper-portrait {
60
+ @include aspect-ratio-base();
56
61
  aspect-ratio: 1 / 1.414;
57
- width: 100%;
58
- height: auto;
59
62
  }
60
63
 
61
64
  .aspect-ratio-2-3 {
65
+ @include aspect-ratio-base();
62
66
  aspect-ratio: 2 / 3;
63
- width: 100%;
64
- height: auto;
65
67
  }
66
68
 
67
69
  .aspect-ratio-3-2 {
70
+ @include aspect-ratio-base();
68
71
  aspect-ratio: 3 / 2;
69
- width: 100%;
70
- height: auto;
71
72
  }
72
73
 
73
74
  .aspect-ratio-3-4 {
75
+ @include aspect-ratio-base();
74
76
  aspect-ratio: 3 / 4;
75
- width: 100%;
76
- height: auto;
77
77
  }
78
78
 
79
79
  .aspect-ratio-4-3 {
80
+ @include aspect-ratio-base();
80
81
  aspect-ratio: 4 / 3;
81
- width: 100%;
82
- height: auto;
83
82
  }
84
83
 
85
84
  .aspect-ratio-4-5 {
85
+ @include aspect-ratio-base();
86
86
  aspect-ratio: 4 / 5;
87
- width: 100%;
88
- height: auto;
89
87
  }
90
88
 
91
89
  .aspect-ratio-5-4 {
90
+ @include aspect-ratio-base();
92
91
  aspect-ratio: 5 / 4;
93
- width: 100%;
94
- height: auto;
95
92
  }
96
93
 
97
94
  .aspect-ratio-5-8 {
95
+ @include aspect-ratio-base();
98
96
  aspect-ratio: 5 / 8;
99
- width: 100%;
100
- height: auto;
101
97
  }
102
98
 
103
99
  .aspect-ratio-8-5 {
100
+ @include aspect-ratio-base();
104
101
  aspect-ratio: 8 / 5;
105
- width: 100%;
106
- height: auto;
107
102
  }
108
103
 
109
104
  .aspect-ratio-9-16 {
105
+ @include aspect-ratio-base();
110
106
  aspect-ratio: 9 / 16;
111
- width: 100%;
112
- height: auto;
113
107
  }
114
108
 
115
109
  .aspect-ratio-16-9 {
110
+ @include aspect-ratio-base();
116
111
  aspect-ratio: 16 / 9;
117
- width: 100%;
118
- height: auto;
119
112
  }
@@ -79,8 +79,9 @@ $color-light-lightness-badge-border: 70 !default;
79
79
  //#endregion color-light-lightness-badge
80
80
 
81
81
  //#region color-light-lightness-blockquote
82
- $color-light-lightness-blockquote-fore: 70 !default;
83
- $color-light-lightness-blockquote-border: 70 !default;
82
+ $color-light-lightness-blockquote-fore: 50 !default;
83
+ $color-light-lightness-blockquote-back: 90 !default;
84
+ $color-light-lightness-blockquote-border: 50 !default;
84
85
  //#endregion color-light-lightness-blockquote
85
86
 
86
87
  //#region color-light-lightness-card
@@ -191,6 +192,7 @@ $color-dark-lightness-badge-border: 30 !default;
191
192
 
192
193
  //#region color-light-lightness-blockquote
193
194
  $color-dark-lightness-blockquote-fore: 70 !default;
195
+ $color-dark-lightness-blockquote-back: 20 !default;
194
196
  $color-dark-lightness-blockquote-border: 70 !default;
195
197
  //#endregion color-light-lightness-blockquote
196
198
 
@@ -352,6 +354,7 @@ $colorShadesLight: (
352
354
  ),
353
355
  blockquote: (
354
356
  fore: functions.zeroPadding($color-light-lightness-blockquote-fore, 2),
357
+ back: functions.zeroPadding($color-light-lightness-blockquote-back, 2),
355
358
  border: functions.zeroPadding($color-light-lightness-blockquote-border, 2),
356
359
  ),
357
360
  button: (
@@ -843,6 +846,7 @@ $colorShadesDark: (
843
846
  ),
844
847
  blockquote: (
845
848
  fore: functions.zeroPadding($color-dark-lightness-blockquote-fore, 2),
849
+ back: functions.zeroPadding($color-dark-lightness-blockquote-back, 2),
846
850
  border: functions.zeroPadding($color-dark-lightness-blockquote-border, 2),
847
851
  ),
848
852
  button: (
@@ -1,24 +0,0 @@
1
- .tree-view {
2
- color: var(--#{variables.$prefix}color-default-tree-view-fore);
3
- background-color: var(--#{variables.$prefix}color-default-tree-view-back);
4
- border-color: var(--#{variables.$prefix}color-default-tree-view-border);
5
- border-collapse: collapse;
6
- display: block;
7
- >.tree-view-node {
8
- cursor: pointer;
9
- display: block;
10
- &::marker,
11
- &::-webkit-details-marker {
12
- display: none;
13
- }
14
- &::after {
15
- @include icons.chevron() {
16
- transform: rotate(90deg);
17
- content: "";
18
- left: 1rem;
19
- position: absolute;
20
- top: calc(50% - 0.25rem);
21
- }
22
- }
23
- }
24
- }