@inc2734/unitone-css 0.102.4 → 1.0.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/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/library.js +1 -1
- package/package.json +2 -4
- package/src/app.js +0 -1
- package/src/behaviors/_font-size.scss +11 -0
- package/src/behaviors/_index.scss +2 -2
- package/src/behaviors/_negative-gap.scss +1 -1
- package/src/compatibility/index.js +1 -1
- package/src/foundation/_index.scss +133 -1
- package/src/layout-primitives/_index.scss +49 -1
- package/src/layout-primitives/both-sides/_index.scss +31 -1
- package/src/layout-primitives/center/_index.scss +22 -1
- package/src/layout-primitives/cluster/_index.scss +104 -1
- package/src/layout-primitives/container/_index.scss +18 -1
- package/src/layout-primitives/cover/_index.scss +86 -1
- package/src/layout-primitives/decorator/_index.scss +109 -1
- package/src/layout-primitives/float/_index.scss +29 -1
- package/src/layout-primitives/frame/_index.scss +36 -1
- package/src/layout-primitives/gutters/_index.scss +30 -1
- package/src/layout-primitives/layers/_index.scss +141 -1
- package/src/layout-primitives/marquee/_index.scss +73 -1
- package/src/layout-primitives/masonry/_index.scss +26 -1
- package/src/layout-primitives/popover/_index.scss +1 -1
- package/src/layout-primitives/reel/_index.scss +55 -1
- package/src/layout-primitives/responsive-grid/_index.scss +225 -1
- package/src/layout-primitives/stack/_index.scss +181 -1
- package/src/layout-primitives/switcher/_index.scss +70 -1
- package/src/layout-primitives/text/_index.scss +144 -1
- package/src/layout-primitives/texture/_index.scss +271 -1
- package/src/layout-primitives/vertical-writing/_index.scss +118 -1
- package/src/layout-primitives/with-sidebar/_index.scss +304 -1
- package/src/library.js +0 -48
- package/src/settings/_body.scss +0 -1
- package/src/settings/_index.scss +3 -1
- package/src/settings/_root.scss +47 -9
- package/src/utilities/_font-size.scss +8 -15
- package/src/utilities/_index.scss +0 -1
- package/src/variables/_index.scss +83 -1
- package/dist/compatibility/fluid-typography.js +0 -1
- package/dist/compatibility/index.js +0 -1
- package/src/behaviors/_typography.scss +0 -21
- package/src/compatibility/fluid-typography.js +0 -18
- package/src/foundation/_foundation-core.scss +0 -135
- package/src/foundation/_foundation.scss +0 -3
- package/src/helper/_helper.scss +0 -3
- package/src/layout-primitives/_layout-primitives-core.scss +0 -49
- package/src/layout-primitives/_layout-primitives.scss +0 -3
- package/src/layout-primitives/both-sides/_both-sides-core.scss +0 -31
- package/src/layout-primitives/both-sides/_both-sides.scss +0 -3
- package/src/layout-primitives/center/_center-core.scss +0 -22
- package/src/layout-primitives/center/_center.scss +0 -3
- package/src/layout-primitives/cluster/_cluster-core.scss +0 -104
- package/src/layout-primitives/cluster/_cluster.scss +0 -3
- package/src/layout-primitives/container/_container-core.scss +0 -18
- package/src/layout-primitives/container/_container.scss +0 -3
- package/src/layout-primitives/cover/_cover-core.scss +0 -86
- package/src/layout-primitives/cover/_cover.scss +0 -3
- package/src/layout-primitives/decorator/_decorator-core.scss +0 -109
- package/src/layout-primitives/decorator/_decorator.scss +0 -3
- package/src/layout-primitives/float/_float-core.scss +0 -29
- package/src/layout-primitives/float/_float.scss +0 -3
- package/src/layout-primitives/frame/_frame-core.scss +0 -36
- package/src/layout-primitives/frame/_frame.scss +0 -3
- package/src/layout-primitives/gutters/_gutters-core.scss +0 -30
- package/src/layout-primitives/gutters/_gutters.scss +0 -3
- package/src/layout-primitives/layers/_layers-core.scss +0 -141
- package/src/layout-primitives/layers/_layers.scss +0 -3
- package/src/layout-primitives/marquee/_marquee-core.scss +0 -73
- package/src/layout-primitives/marquee/_marquee.scss +0 -3
- package/src/layout-primitives/masonry/_masonry-core.scss +0 -26
- package/src/layout-primitives/masonry/_masonry.scss +0 -3
- package/src/layout-primitives/reel/_reel-core.scss +0 -55
- package/src/layout-primitives/reel/_reel.scss +0 -3
- package/src/layout-primitives/responsive-grid/_responsive-grid-core.scss +0 -225
- package/src/layout-primitives/responsive-grid/_responsive-grid.scss +0 -3
- package/src/layout-primitives/stack/_stack-core.scss +0 -182
- package/src/layout-primitives/stack/_stack.scss +0 -3
- package/src/layout-primitives/switcher/_switcher-core.scss +0 -70
- package/src/layout-primitives/switcher/_switcher.scss +0 -3
- package/src/layout-primitives/text/_text-core.scss +0 -144
- package/src/layout-primitives/text/_text.scss +0 -3
- package/src/layout-primitives/texture/_texture-core.scss +0 -271
- package/src/layout-primitives/texture/_texture.scss +0 -3
- package/src/layout-primitives/vertical-writing/_vertical-writing-core.scss +0 -118
- package/src/layout-primitives/vertical-writing/_vertical-writing.scss +0 -3
- package/src/layout-primitives/with-sidebar/_with-sidebar-core.scss +0 -304
- package/src/layout-primitives/with-sidebar/_with-sidebar.scss +0 -3
- package/src/settings/_settings-core.scss +0 -3
- package/src/settings/_settings.scss +0 -3
- package/src/utilities/_typography.scss +0 -5
- package/src/variables/_variables-core.scss +0 -79
- package/src/variables/_variables.scss +0 -3
|
@@ -1 +1,271 @@
|
|
|
1
|
-
@
|
|
1
|
+
@mixin abstract-texture() {
|
|
2
|
+
--unitone--texture-color: var(--unitone--color--light-gray);
|
|
3
|
+
--unitone--texture-gap: 50px;
|
|
4
|
+
--unitone--texture-size: 1px;
|
|
5
|
+
--unitone--texture-top: 0px;
|
|
6
|
+
--unitone--texture-right: 0px;
|
|
7
|
+
--unitone--texture-bottom: 0px;
|
|
8
|
+
--unitone--texture-left: 0px;
|
|
9
|
+
--unitone--texture-border-radius: 0px;
|
|
10
|
+
--unitone--texture-border-top-left-radius: var(--unitone--texture-border-radius);
|
|
11
|
+
--unitone--texture-border-top-right-radius: var(--unitone--texture-border-radius);
|
|
12
|
+
--unitone--texture-border-bottom-left-radius: var(--unitone--texture-border-radius);
|
|
13
|
+
--unitone--texture-border-bottom-right-radius: var(--unitone--texture-border-radius);
|
|
14
|
+
--unitone--texture-band-top-size: 0px;
|
|
15
|
+
--unitone--texture-band-bottom-size: 0px;
|
|
16
|
+
|
|
17
|
+
position: relative;
|
|
18
|
+
|
|
19
|
+
@at-root {
|
|
20
|
+
:where(#{ & } > *) {
|
|
21
|
+
--unitone--position: relative;
|
|
22
|
+
|
|
23
|
+
position: var(--unitone--position);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&::before {
|
|
28
|
+
content: '';
|
|
29
|
+
position: absolute;
|
|
30
|
+
inset:
|
|
31
|
+
var(--unitone--texture-top)
|
|
32
|
+
var(--unitone--texture-right)
|
|
33
|
+
var(--unitone--texture-bottom)
|
|
34
|
+
var(--unitone--texture-left);
|
|
35
|
+
background-position: center;
|
|
36
|
+
border-radius:
|
|
37
|
+
var(--unitone--texture-border-top-left-radius)
|
|
38
|
+
var(--unitone--texture-border-top-right-radius)
|
|
39
|
+
var(--unitone--texture-border-bottom-right-radius)
|
|
40
|
+
var(--unitone--texture-border-bottom-left-radius);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
&[data-unitone-layout~="-texture\:dots"]::before {
|
|
45
|
+
background-image:
|
|
46
|
+
radial-gradient(
|
|
47
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
48
|
+
transparent var(--unitone--texture-size)
|
|
49
|
+
);
|
|
50
|
+
background-size:
|
|
51
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2)
|
|
52
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[data-unitone-layout~="-texture\:offset-dots"]::before {
|
|
56
|
+
background-image:
|
|
57
|
+
radial-gradient(
|
|
58
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
59
|
+
transparent var(--unitone--texture-size)
|
|
60
|
+
),
|
|
61
|
+
radial-gradient(
|
|
62
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
63
|
+
transparent var(--unitone--texture-size)
|
|
64
|
+
);
|
|
65
|
+
background-position:
|
|
66
|
+
0
|
|
67
|
+
0,
|
|
68
|
+
max(var(--unitone--texture-gap) / 2, var(--unitone--texture-size) * 3 / 2)
|
|
69
|
+
max(var(--unitone--texture-gap) / 2, var(--unitone--texture-size) * 3 / 2);
|
|
70
|
+
background-size:
|
|
71
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 3)
|
|
72
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 3);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-unitone-layout~="-texture\:grid"]::before {
|
|
76
|
+
background-image:
|
|
77
|
+
linear-gradient(
|
|
78
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
79
|
+
transparent var(--unitone--texture-size)
|
|
80
|
+
),
|
|
81
|
+
linear-gradient(
|
|
82
|
+
to right,
|
|
83
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
84
|
+
transparent var(--unitone--texture-size)
|
|
85
|
+
);
|
|
86
|
+
background-size:
|
|
87
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2)
|
|
88
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&[data-unitone-layout~="-texture\:horizontal-stripe"]::before {
|
|
92
|
+
background-image:
|
|
93
|
+
linear-gradient(
|
|
94
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
95
|
+
transparent var(--unitone--texture-size)
|
|
96
|
+
);
|
|
97
|
+
background-size:
|
|
98
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2)
|
|
99
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&[data-unitone-layout~="-texture\:vertical-stripe"]::before {
|
|
103
|
+
background-image:
|
|
104
|
+
linear-gradient(
|
|
105
|
+
to right,
|
|
106
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
107
|
+
transparent var(--unitone--texture-size)
|
|
108
|
+
);
|
|
109
|
+
background-size:
|
|
110
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2)
|
|
111
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[data-unitone-layout~="-texture\:checker-pattern"]::before {
|
|
115
|
+
background-image:
|
|
116
|
+
repeating-linear-gradient(
|
|
117
|
+
45deg,
|
|
118
|
+
var(--unitone--texture-color) 25%,
|
|
119
|
+
transparent 25%,
|
|
120
|
+
transparent 75%,
|
|
121
|
+
var(--unitone--texture-color) 75%,
|
|
122
|
+
var(--unitone--texture-color)
|
|
123
|
+
),
|
|
124
|
+
repeating-linear-gradient(
|
|
125
|
+
45deg,
|
|
126
|
+
var(--unitone--texture-color) 25%,
|
|
127
|
+
transparent 25%,
|
|
128
|
+
transparent 75%,
|
|
129
|
+
var(--unitone--texture-color) 75%,
|
|
130
|
+
var(--unitone--texture-color)
|
|
131
|
+
);
|
|
132
|
+
background-position:
|
|
133
|
+
0
|
|
134
|
+
0,
|
|
135
|
+
var(--unitone--texture-gap)
|
|
136
|
+
var(--unitone--texture-gap);
|
|
137
|
+
background-size:
|
|
138
|
+
calc(var(--unitone--texture-gap) * 2)
|
|
139
|
+
calc(var(--unitone--texture-gap) * 2);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&[data-unitone-layout~="-texture\:graph-paper"]::before {
|
|
143
|
+
background-image:
|
|
144
|
+
linear-gradient(
|
|
145
|
+
var(--unitone--texture-color) calc(var(--unitone--texture-size) * .8),
|
|
146
|
+
transparent calc(var(--unitone--texture-size) * .8)
|
|
147
|
+
),
|
|
148
|
+
linear-gradient(
|
|
149
|
+
90deg,
|
|
150
|
+
var(--unitone--texture-color) calc(var(--unitone--texture-size) * .8),
|
|
151
|
+
transparent calc(var(--unitone--texture-size) * .8)
|
|
152
|
+
),
|
|
153
|
+
linear-gradient(
|
|
154
|
+
var(--unitone--texture-color) calc(var(--unitone--texture-size) * .5),
|
|
155
|
+
transparent calc(var(--unitone--texture-size) * .5)
|
|
156
|
+
),
|
|
157
|
+
linear-gradient(
|
|
158
|
+
90deg,
|
|
159
|
+
var(--unitone--texture-color) calc(var(--unitone--texture-size) * .5),
|
|
160
|
+
transparent calc(var(--unitone--texture-size) * .5)
|
|
161
|
+
);
|
|
162
|
+
background-position:
|
|
163
|
+
calc(var(--unitone--texture-size) * -.8) calc(var(--unitone--texture-size) * -.8),
|
|
164
|
+
calc(var(--unitone--texture-size) * -.8) calc(var(--unitone--texture-size) * -.8),
|
|
165
|
+
calc(var(--unitone--texture-size) * -.5) calc(var(--unitone--texture-size) * -.5),
|
|
166
|
+
calc(var(--unitone--texture-size) * -.5) calc(var(--unitone--texture-size) * -.5);
|
|
167
|
+
background-size:
|
|
168
|
+
max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30)
|
|
169
|
+
calc(max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30) * 2),
|
|
170
|
+
calc(max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30) * 2)
|
|
171
|
+
max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30),
|
|
172
|
+
calc(max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30) / 5)
|
|
173
|
+
calc(max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30) / 5),
|
|
174
|
+
calc(max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30) / 5)
|
|
175
|
+
calc(max(var(--unitone--texture-gap) * 3, var(--unitone--texture-size) * 30) / 5);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&[data-unitone-layout~="-texture\:slash"]::before {
|
|
179
|
+
background-image:
|
|
180
|
+
repeating-linear-gradient(
|
|
181
|
+
135deg,
|
|
182
|
+
var(--unitone--texture-color) 0,
|
|
183
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
184
|
+
transparent 0,
|
|
185
|
+
transparent 50%
|
|
186
|
+
);
|
|
187
|
+
background-size:
|
|
188
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 1.5 + 2px)
|
|
189
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 1.5 + 2px);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&[data-unitone-layout~="-texture\:backslash"]::before {
|
|
193
|
+
background-image:
|
|
194
|
+
repeating-linear-gradient(
|
|
195
|
+
45deg,
|
|
196
|
+
var(--unitone--texture-color) 0,
|
|
197
|
+
var(--unitone--texture-color) var(--unitone--texture-size),
|
|
198
|
+
transparent 0,
|
|
199
|
+
transparent 50%
|
|
200
|
+
);
|
|
201
|
+
background-size:
|
|
202
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 1.5 + 2px)
|
|
203
|
+
max(var(--unitone--texture-gap), var(--unitone--texture-size) * 1.5 + 2px);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&[data-unitone-layout~="-texture\:wave"]::before {
|
|
207
|
+
background-color: var(--unitone--texture-color);
|
|
208
|
+
border-radius: 0 !important;
|
|
209
|
+
mask-image:
|
|
210
|
+
url('data:image/svg+xml,<svg viewBox="0 0 200 20" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M200 0C173.236 0 146.472 2.68557 119.611 8.05762C79.8049 16.0189 39.9025 19.999 0 19.999V0H200Z"/></svg>'),
|
|
211
|
+
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><rect x="0" y="0" height="100" width="100"/></svg>'),
|
|
212
|
+
url('data:image/svg+xml,<svg viewBox="0 0 200 20" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M200 19.999H0C26.7642 19.999 53.5284 17.3134 80.3887 11.9414C120.195 3.98014 160.098 2.69917e-07 200 0V19.999Z"/></svg>');
|
|
213
|
+
mask-composite: exclude, subtract;
|
|
214
|
+
mask-position:
|
|
215
|
+
0 0,
|
|
216
|
+
0 0,
|
|
217
|
+
0 100%;
|
|
218
|
+
mask-size:
|
|
219
|
+
100% max(40px + var(--unitone--texture-size)),
|
|
220
|
+
100% 100%,
|
|
221
|
+
100% max(40px + var(--unitone--texture-size));
|
|
222
|
+
mask-repeat:
|
|
223
|
+
repeat-x,
|
|
224
|
+
repeat,
|
|
225
|
+
repeat-x;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&[data-unitone-layout~="-texture\:solid-color"]::before {
|
|
229
|
+
background-color: var(--unitone--texture-color);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&[data-unitone-layout~="-texture\:slash-shape"] {
|
|
233
|
+
--unitone--texture-band-top-size: 25%;
|
|
234
|
+
--unitone--texture-band-bottom-size: 25%;
|
|
235
|
+
|
|
236
|
+
&::before {
|
|
237
|
+
inset: 0 !important;
|
|
238
|
+
background-color: var(--unitone--texture-color);
|
|
239
|
+
border-radius: 0 !important;
|
|
240
|
+
clip-path: polygon(
|
|
241
|
+
0 100%,
|
|
242
|
+
0 min(100%, calc(100% - var(--unitone--texture-band-bottom-size))),
|
|
243
|
+
100% 0,
|
|
244
|
+
100% max(0%, var(--unitone--texture-band-top-size))
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&[data-unitone-layout~="-texture\:backslash-shape"] {
|
|
250
|
+
--unitone--texture-band-top-size: 25%;
|
|
251
|
+
--unitone--texture-band-bottom-size: 25%;
|
|
252
|
+
|
|
253
|
+
&::before {
|
|
254
|
+
inset: 0 !important;
|
|
255
|
+
background-color: var(--unitone--texture-color);
|
|
256
|
+
border-radius: 0 !important;
|
|
257
|
+
clip-path: polygon(
|
|
258
|
+
min(0%, calc(-1 * var(--unitone--texture-band-top-size))) 0%,
|
|
259
|
+
100% 100%,
|
|
260
|
+
100% min(100%, calc(100% - var(--unitone--texture-band-bottom-size))),
|
|
261
|
+
0% 0%
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@mixin texture() {
|
|
268
|
+
[data-unitone-layout~="texture"] {
|
|
269
|
+
@include abstract-texture();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -1 +1,118 @@
|
|
|
1
|
-
@
|
|
1
|
+
@mixin abstract-vertical-writing() {
|
|
2
|
+
--unitone--gap: var(--unitone--global--text-gap);
|
|
3
|
+
--unitone--column-gap: var(--unitone--global--gap);
|
|
4
|
+
--unitone--row-gap: var(--unitone--gap);
|
|
5
|
+
|
|
6
|
+
--unitone--max-height: var(--unitone--vertical-writing--max-height, 25rem);
|
|
7
|
+
--unitone--text-orientation: mixed;
|
|
8
|
+
--unitone--threshold: 0px;
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
writing-mode: vertical-rl;
|
|
12
|
+
column-count: 1;
|
|
13
|
+
column-gap: var(--unitone--column-gap);
|
|
14
|
+
text-orientation: var(--unitone--text-orientation);
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
|
|
17
|
+
&[data-unitone-layout~="vertical-writing\:initialized"] {
|
|
18
|
+
visibility: visible;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&[data-unitone-layout~="vertical-writing\:safari"] {
|
|
22
|
+
column-count: 2
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> * {
|
|
26
|
+
max-inline-size: var(--unitone--max-height);
|
|
27
|
+
box-sizing: content-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> [data-unitone-layout~="vertical-writing__thresholder"] {
|
|
31
|
+
height: 0 !important;
|
|
32
|
+
position: absolute !important;
|
|
33
|
+
inset: auto auto 0 0 !important;
|
|
34
|
+
z-index: -1 !important;
|
|
35
|
+
pointer-events: none !important;
|
|
36
|
+
width: var(--unitone--threshold) !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&[data-unitone-layout~="-force-switch"] {
|
|
40
|
+
column-count: auto;
|
|
41
|
+
writing-mode: horizontal-tb;
|
|
42
|
+
|
|
43
|
+
> * {
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
max-inline-size: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (orientation: portrait) and (max-width: 599px) {
|
|
50
|
+
&[data-unitone-layout~="-switch"] {
|
|
51
|
+
column-count: auto;
|
|
52
|
+
writing-mode: horizontal-tb;
|
|
53
|
+
|
|
54
|
+
> * {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> *:not(:first-child) {
|
|
61
|
+
margin-block-start: calc(var(--unitone--margin-block-start, 1) * var(--unitone--row-gap));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> *:not(:last-child) {
|
|
65
|
+
margin-block-end: calc(var(--unitone--margin-block-end, 1) * var(--unitone--row-gap));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
> h1 {
|
|
69
|
+
font-size: var(--unitone--font-size-3xl);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> :where(h2, h3, h4, h5, h6) {
|
|
73
|
+
--unitone--margin-block-start: 2;
|
|
74
|
+
|
|
75
|
+
& + :where(h2, h3, h4, h5, h6) {
|
|
76
|
+
--unitone--margin-block-start: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
> h2 {
|
|
81
|
+
font-size: var(--unitone--font-size-2xl);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
> h3 {
|
|
85
|
+
font-size: var(--unitone--font-size-xl);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
> h4 {
|
|
89
|
+
font-size: var(--unitone--font-size-l);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> h5 {
|
|
93
|
+
font-size: var(--unitone--font-size-m);
|
|
94
|
+
|
|
95
|
+
& + * {
|
|
96
|
+
--unitone--margin-block-start: .5;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
> h6 {
|
|
101
|
+
font-size: var(--unitone--font-size-m);
|
|
102
|
+
|
|
103
|
+
& + * {
|
|
104
|
+
--unitone--margin-block-start: .5;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@mixin vertical-writing() {
|
|
110
|
+
[data-unitone-layout~="vertical-writing-wrapper"] {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-unitone-layout~="vertical-writing"] {
|
|
116
|
+
@include abstract-vertical-writing();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -1 +1,304 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:selector';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
|
|
5
|
+
@mixin _aside() {
|
|
6
|
+
flex-basis: var(--unitone--sidebar-width);
|
|
7
|
+
flex-grow: 1;
|
|
8
|
+
min-width: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin _main() {
|
|
12
|
+
flex-basis: 0;
|
|
13
|
+
flex-grow: 999;
|
|
14
|
+
min-width: min(100%, var(--unitone--content-min-width));
|
|
15
|
+
max-width: min(100%, var(--unitone--content-max-width));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
$selector-main-aside: (
|
|
19
|
+
':not([data-unitone-layout~="-revert"]):not([data-unitone-layout~="-sidebar:left"])',
|
|
20
|
+
'[data-unitone-layout~="-revert"][data-unitone-layout~="-sidebar:left"]'
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
$selector-aside-main: (
|
|
24
|
+
':not([data-unitone-layout~="-revert"])[data-unitone-layout~="-sidebar:left"]',
|
|
25
|
+
'[data-unitone-layout~="-revert"]:not([data-unitone-layout~="-sidebar:left"])'
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
@mixin abstract-with-sidebar() {
|
|
29
|
+
--unitone--sidebar-width: auto;
|
|
30
|
+
--unitone--content-min-width: 50%;
|
|
31
|
+
--unitone--content-max-width: 100%;
|
|
32
|
+
--unitone--gap: var(--unitone--global--gap);
|
|
33
|
+
--unitone--column-gap: var(--unitone--gap);
|
|
34
|
+
--unitone--row-gap: var(--unitone--gap);
|
|
35
|
+
--unitone--align-items: stretch;
|
|
36
|
+
--unitone--overflow: visible;
|
|
37
|
+
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
column-gap: var(--unitone--column-gap);
|
|
41
|
+
row-gap: var(--unitone--row-gap);
|
|
42
|
+
align-items: var(--unitone--align-items);
|
|
43
|
+
overflow: var(--unitone--overflow);
|
|
44
|
+
|
|
45
|
+
&:where(#{ $selector-main-aside }) > :first-child,
|
|
46
|
+
&:where(#{ $selector-aside-main }) > :nth-child(2) {
|
|
47
|
+
@include _main();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:where(#{ $selector-main-aside }) > :nth-child(2),
|
|
51
|
+
&:where(#{ $selector-aside-main }) > :first-child {
|
|
52
|
+
@include _aside();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[data-unitone-layout~="-revert"] {
|
|
56
|
+
flex-direction: row-reverse;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:where([data-unitone-layout*="-divider\:"]) {
|
|
60
|
+
> * {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
justify-content: var(--unitone--align-items);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// For vertical layout.
|
|
67
|
+
&[data-unitone-layout~="-stack"] {
|
|
68
|
+
// When -bol / -linewrap is added, the vertical/horizontal layout may switch.
|
|
69
|
+
// This will break the design.
|
|
70
|
+
// This is necessary to prevent this.
|
|
71
|
+
--unitone--content-min-width: 100% !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-unitone-layout~="-divider\:stripe"] {
|
|
76
|
+
align-items: stretch;
|
|
77
|
+
|
|
78
|
+
// For vertical layout.
|
|
79
|
+
&[data-unitone-layout~="-stack"] {
|
|
80
|
+
row-gap: 0;
|
|
81
|
+
|
|
82
|
+
&:where(#{ $selector-main-aside }) > :first-child,
|
|
83
|
+
&:where(#{ $selector-aside-main }) > :nth-child(2) {
|
|
84
|
+
padding-top: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
85
|
+
padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
86
|
+
|
|
87
|
+
&::before {
|
|
88
|
+
border-top-width: var(--unitone--divider-width);
|
|
89
|
+
border-bottom-width: var(--unitone--divider-width);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:where(#{ $selector-aside-main }) > :first-child {
|
|
94
|
+
padding-top: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
95
|
+
padding-bottom: calc(var(--unitone--row-gap));
|
|
96
|
+
|
|
97
|
+
&::before {
|
|
98
|
+
border-top-width: var(--unitone--divider-width);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:where(#{ $selector-main-aside }) > :nth-child(2) {
|
|
103
|
+
padding-top: var(--unitone--row-gap);
|
|
104
|
+
padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
105
|
+
|
|
106
|
+
&::before {
|
|
107
|
+
border-bottom-width: var(--unitone--divider-width);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// For horizontal layout.
|
|
113
|
+
&:not([data-unitone-layout~="-stack"]) {
|
|
114
|
+
column-gap: 0;
|
|
115
|
+
|
|
116
|
+
> * {
|
|
117
|
+
padding-right: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
|
|
118
|
+
padding-left: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :first-child,
|
|
122
|
+
&:where([data-unitone-layout~="-revert"]) > :nth-child(2) {
|
|
123
|
+
&::before {
|
|
124
|
+
border-right-width: var(--unitone--divider-width);
|
|
125
|
+
border-left-width: var(--unitone--divider-width);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
|
|
130
|
+
&:where([data-unitone-layout~="-revert"]) > :first-child {
|
|
131
|
+
&::before {
|
|
132
|
+
border-right-width: var(--unitone--divider-width);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-unitone-layout~="-divider\:divide"] {
|
|
139
|
+
align-items: stretch;
|
|
140
|
+
|
|
141
|
+
// For vertical layout.
|
|
142
|
+
&[data-unitone-layout~="-stack"] {
|
|
143
|
+
row-gap: 0;
|
|
144
|
+
|
|
145
|
+
> :first-child {
|
|
146
|
+
&::before {
|
|
147
|
+
border-width: 0 0 var(--unitone--divider-width);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:where(#{ $selector-main-aside }) > :first-child {
|
|
152
|
+
padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:where(#{ $selector-main-aside }) > :nth-child(2) {
|
|
156
|
+
padding-top: var(--unitone--row-gap);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:where(#{ $selector-aside-main }) > :first-child {
|
|
160
|
+
padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:where(#{ $selector-aside-main }) > :nth-child(2) {
|
|
164
|
+
padding-top: var(--unitone--row-gap);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// For horizontal layout.
|
|
169
|
+
&:not([data-unitone-layout~="-stack"]) {
|
|
170
|
+
column-gap: 0;
|
|
171
|
+
|
|
172
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :first-child,
|
|
173
|
+
&:where([data-unitone-layout~="-revert"]) > :nth-child(2) {
|
|
174
|
+
padding-right: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
|
|
175
|
+
|
|
176
|
+
&::before {
|
|
177
|
+
border-right-width: var(--unitone--divider-width);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
|
|
182
|
+
&:where([data-unitone-layout~="-revert"]) > :first-child {
|
|
183
|
+
padding-left: var(--unitone--column-gap);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&[data-unitone-layout~="-divider\:slash"] {
|
|
189
|
+
--unitone--divider-height: 2rem;
|
|
190
|
+
|
|
191
|
+
gap: 0;
|
|
192
|
+
align-items: stretch;
|
|
193
|
+
|
|
194
|
+
> :first-child::before {
|
|
195
|
+
right: auto;
|
|
196
|
+
height: var(--unitone--divider-height);
|
|
197
|
+
border-left-width: var(--unitone--divider-width);
|
|
198
|
+
border-color: color-mix(in oklab, var(--unitone--divider-color) 97%, #000);
|
|
199
|
+
transform: rotate(22.5deg);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// For vertical layout.
|
|
203
|
+
&[data-unitone-layout~="-stack"] {
|
|
204
|
+
> :first-child {
|
|
205
|
+
padding-bottom: var(--unitone--row-gap);
|
|
206
|
+
|
|
207
|
+
&::before {
|
|
208
|
+
inset:
|
|
209
|
+
100%
|
|
210
|
+
auto
|
|
211
|
+
auto
|
|
212
|
+
calc(50% - var(--unitone--divider-width) / 2);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
> :nth-child(2) {
|
|
217
|
+
padding-top: calc(var(--unitone--row-gap) + var(--unitone--divider-height));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// For horizontal layout.
|
|
222
|
+
&:not([data-unitone-layout~="-stack"]) {
|
|
223
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :first-child,
|
|
224
|
+
&:where([data-unitone-layout~="-revert"]) > :nth-child(2) {
|
|
225
|
+
padding-right: var(--unitone--column-gap);
|
|
226
|
+
|
|
227
|
+
&::before {
|
|
228
|
+
right: auto;
|
|
229
|
+
bottom: auto;
|
|
230
|
+
left: 100%;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
|
|
235
|
+
&:where([data-unitone-layout~="-revert"]) > :first-child {
|
|
236
|
+
padding-left: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&[data-unitone-layout~="-divider\:bordered"] {
|
|
242
|
+
gap: 0;
|
|
243
|
+
align-items: stretch;
|
|
244
|
+
|
|
245
|
+
// For vertical layout.
|
|
246
|
+
&[data-unitone-layout~="-stack"] {
|
|
247
|
+
> ::before {
|
|
248
|
+
border-width: var(--unitone--divider-width);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
> :nth-child(2)::before {
|
|
252
|
+
border-top-width: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:where(#{ $selector-main-aside }) > :first-child {
|
|
256
|
+
padding: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&:where(#{ $selector-main-aside }) > :nth-child(2) {
|
|
260
|
+
padding:
|
|
261
|
+
var(--unitone--row-gap)
|
|
262
|
+
calc(var(--unitone--row-gap) + var(--unitone--divider-width))
|
|
263
|
+
calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&:where(#{ $selector-aside-main }) > :first-child {
|
|
267
|
+
padding: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&:where(#{ $selector-aside-main }) > :nth-child(2) {
|
|
271
|
+
padding:
|
|
272
|
+
var(--unitone--row-gap)
|
|
273
|
+
calc(var(--unitone--row-gap) + var(--unitone--divider-width))
|
|
274
|
+
calc(var(--unitone--row-gap) + var(--unitone--divider-width));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// For horizontal layout.
|
|
279
|
+
&:not([data-unitone-layout~="-stack"]) {
|
|
280
|
+
> * {
|
|
281
|
+
padding: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
|
|
282
|
+
|
|
283
|
+
&::before {
|
|
284
|
+
border-width: var(--unitone--divider-width);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
|
|
289
|
+
&:where([data-unitone-layout~="-revert"]) > :first-child {
|
|
290
|
+
padding-left: var(--unitone--column-gap);
|
|
291
|
+
|
|
292
|
+
&::before {
|
|
293
|
+
border-left: 0;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
@mixin with-sidebar() {
|
|
301
|
+
[data-unitone-layout~="with-sidebar"] {
|
|
302
|
+
@include abstract-with-sidebar();
|
|
303
|
+
}
|
|
304
|
+
}
|