@inc2734/unitone-css 0.102.3 → 1.0.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.
Files changed (95) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/app.js +1 -1
  3. package/dist/library.js +1 -1
  4. package/package.json +2 -4
  5. package/src/app.js +0 -1
  6. package/src/behaviors/_divider.scss +27 -0
  7. package/src/behaviors/_font-size.scss +11 -0
  8. package/src/behaviors/_index.scss +4 -2
  9. package/src/behaviors/_negative-gap.scss +2 -16
  10. package/src/behaviors/_padding.scss +0 -12
  11. package/src/compatibility/index.js +1 -1
  12. package/src/foundation/_index.scss +141 -1
  13. package/src/layout-primitives/_index.scss +49 -1
  14. package/src/layout-primitives/both-sides/_index.scss +31 -1
  15. package/src/layout-primitives/center/_index.scss +22 -1
  16. package/src/layout-primitives/cluster/_index.scss +104 -1
  17. package/src/layout-primitives/container/_index.scss +18 -1
  18. package/src/layout-primitives/cover/_index.scss +86 -1
  19. package/src/layout-primitives/decorator/_index.scss +109 -1
  20. package/src/layout-primitives/float/_index.scss +29 -1
  21. package/src/layout-primitives/frame/_index.scss +36 -1
  22. package/src/layout-primitives/gutters/_index.scss +30 -1
  23. package/src/layout-primitives/layers/_index.scss +141 -1
  24. package/src/layout-primitives/marquee/_index.scss +73 -1
  25. package/src/layout-primitives/masonry/_index.scss +26 -1
  26. package/src/layout-primitives/popover/_index.scss +1 -1
  27. package/src/layout-primitives/reel/_index.scss +55 -1
  28. package/src/layout-primitives/responsive-grid/_index.scss +225 -1
  29. package/src/layout-primitives/stack/_index.scss +182 -1
  30. package/src/layout-primitives/switcher/_index.scss +70 -1
  31. package/src/layout-primitives/text/_index.scss +144 -1
  32. package/src/layout-primitives/texture/_index.scss +271 -1
  33. package/src/layout-primitives/vertical-writing/_index.scss +118 -1
  34. package/src/layout-primitives/with-sidebar/_index.scss +304 -1
  35. package/src/library.js +0 -48
  36. package/src/settings/_body.scss +0 -1
  37. package/src/settings/_index.scss +3 -1
  38. package/src/settings/_root.scss +47 -9
  39. package/src/utilities/_font-size.scss +8 -15
  40. package/src/utilities/_index.scss +0 -1
  41. package/src/variables/_index.scss +83 -1
  42. package/dist/compatibility/fluid-typography.js +0 -1
  43. package/dist/compatibility/index.js +0 -1
  44. package/src/behaviors/_typography.scss +0 -21
  45. package/src/compatibility/fluid-typography.js +0 -18
  46. package/src/foundation/_foundation-core.scss +0 -135
  47. package/src/foundation/_foundation.scss +0 -3
  48. package/src/helper/_helper.scss +0 -3
  49. package/src/layout-primitives/_layout-primitives-core.scss +0 -49
  50. package/src/layout-primitives/_layout-primitives.scss +0 -3
  51. package/src/layout-primitives/both-sides/_both-sides-core.scss +0 -31
  52. package/src/layout-primitives/both-sides/_both-sides.scss +0 -3
  53. package/src/layout-primitives/center/_center-core.scss +0 -22
  54. package/src/layout-primitives/center/_center.scss +0 -3
  55. package/src/layout-primitives/cluster/_cluster-core.scss +0 -126
  56. package/src/layout-primitives/cluster/_cluster.scss +0 -3
  57. package/src/layout-primitives/container/_container-core.scss +0 -18
  58. package/src/layout-primitives/container/_container.scss +0 -3
  59. package/src/layout-primitives/cover/_cover-core.scss +0 -86
  60. package/src/layout-primitives/cover/_cover.scss +0 -3
  61. package/src/layout-primitives/decorator/_decorator-core.scss +0 -109
  62. package/src/layout-primitives/decorator/_decorator.scss +0 -3
  63. package/src/layout-primitives/float/_float-core.scss +0 -29
  64. package/src/layout-primitives/float/_float.scss +0 -3
  65. package/src/layout-primitives/frame/_frame-core.scss +0 -36
  66. package/src/layout-primitives/frame/_frame.scss +0 -3
  67. package/src/layout-primitives/gutters/_gutters-core.scss +0 -12
  68. package/src/layout-primitives/gutters/_gutters.scss +0 -3
  69. package/src/layout-primitives/layers/_layers-core.scss +0 -141
  70. package/src/layout-primitives/layers/_layers.scss +0 -3
  71. package/src/layout-primitives/marquee/_marquee-core.scss +0 -73
  72. package/src/layout-primitives/marquee/_marquee.scss +0 -3
  73. package/src/layout-primitives/masonry/_masonry-core.scss +0 -26
  74. package/src/layout-primitives/masonry/_masonry.scss +0 -3
  75. package/src/layout-primitives/reel/_reel-core.scss +0 -55
  76. package/src/layout-primitives/reel/_reel.scss +0 -3
  77. package/src/layout-primitives/responsive-grid/_responsive-grid-core.scss +0 -249
  78. package/src/layout-primitives/responsive-grid/_responsive-grid.scss +0 -3
  79. package/src/layout-primitives/stack/_stack-core.scss +0 -201
  80. package/src/layout-primitives/stack/_stack.scss +0 -3
  81. package/src/layout-primitives/switcher/_switcher-core.scss +0 -70
  82. package/src/layout-primitives/switcher/_switcher.scss +0 -3
  83. package/src/layout-primitives/text/_text-core.scss +0 -169
  84. package/src/layout-primitives/text/_text.scss +0 -3
  85. package/src/layout-primitives/texture/_texture-core.scss +0 -271
  86. package/src/layout-primitives/texture/_texture.scss +0 -3
  87. package/src/layout-primitives/vertical-writing/_vertical-writing-core.scss +0 -118
  88. package/src/layout-primitives/vertical-writing/_vertical-writing.scss +0 -3
  89. package/src/layout-primitives/with-sidebar/_with-sidebar-core.scss +0 -337
  90. package/src/layout-primitives/with-sidebar/_with-sidebar.scss +0 -3
  91. package/src/settings/_settings-core.scss +0 -3
  92. package/src/settings/_settings.scss +0 -3
  93. package/src/utilities/_typography.scss +0 -5
  94. package/src/variables/_variables-core.scss +0 -79
  95. package/src/variables/_variables.scss +0 -3
@@ -1,337 +0,0 @@
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"])[data-unitone-layout~="-sidebar:right"]',
20
- ':not([data-unitone-layout~="-revert"]):not([data-unitone-layout~="-sidebar:left"])',
21
- '[data-unitone-layout~="-revert"][data-unitone-layout~="-sidebar:left"]'
22
- );
23
-
24
- $selector-aside-main: (
25
- ':not([data-unitone-layout~="-revert"])[data-unitone-layout~="-sidebar:left"]',
26
- '[data-unitone-layout~="-revert"][data-unitone-layout~="-sidebar:right"]',
27
- '[data-unitone-layout~="-revert"]:not([data-unitone-layout~="-sidebar:left"])'
28
- );
29
-
30
- $selector-right-sidebar: (
31
- '[data-unitone-layout~="-sidebar:right"]',
32
- ':not([data-unitone-layout~="-sidebar:left"])'
33
- );
34
-
35
- $selector-left-sidebar: (
36
- '[data-unitone-layout~="-sidebar:left"]',
37
- );
38
-
39
- @mixin abstract-with-sidebar() {
40
- --unitone--sidebar-width: auto;
41
- --unitone--content-min-width: 50%;
42
- --unitone--content-max-width: 100%;
43
- --unitone--gap: var(--unitone--global--gap);
44
- --unitone--column-gap: var(--unitone--gap);
45
- --unitone--row-gap: var(--unitone--gap);
46
- --unitone--align-items: stretch;
47
- --unitone--overflow: visible;
48
-
49
- display: flex;
50
- flex-wrap: wrap;
51
- column-gap: var(--unitone--column-gap);
52
- row-gap: var(--unitone--row-gap);
53
- align-items: var(--unitone--align-items);
54
- overflow: var(--unitone--overflow);
55
-
56
- &:where(#{ $selector-main-aside }) > :first-child,
57
- &:where(#{ $selector-aside-main }) > :nth-child(2) {
58
- @include _main();
59
- }
60
-
61
- &:where(#{ $selector-main-aside }) > :nth-child(2),
62
- &:where(#{ $selector-aside-main }) > :first-child {
63
- @include _aside();
64
- }
65
-
66
- &[data-unitone-layout~="-revert"] {
67
- flex-direction: row-reverse;
68
- }
69
-
70
- &:where([data-unitone-layout*="-divider\:"]) {
71
- --unitone--divider-width: 1px;
72
- --unitone--divider-style: solid;
73
- --unitone--divider-color: var(--unitone--color--gray);
74
-
75
- visibility: hidden;
76
-
77
- &[data-unitone-layout~="divider:initialized"] {
78
- visibility: visible;
79
- }
80
-
81
- > * {
82
- position: relative;
83
- display: flex;
84
- flex-direction: column;
85
- justify-content: var(--unitone--align-items);
86
- }
87
-
88
- > ::before {
89
- content: '';
90
- position: absolute;
91
- inset: 0;
92
- user-select: none;
93
- pointer-events: none;
94
- border-width: 0;
95
- border-style: var(--unitone--divider-style);
96
- border-color: var(--unitone--divider-color);
97
- }
98
-
99
- // For vertical layout.
100
- &[data-unitone-layout~="-stack"] {
101
- // When -bol / -linewrap is added, the vertical/horizontal layout may switch.
102
- // This will break the design.
103
- // This is necessary to prevent this.
104
- --unitone--content-min-width: 100% !important;
105
- }
106
- }
107
-
108
- &[data-unitone-layout~="-divider\:stripe"] {
109
- align-items: stretch;
110
-
111
- // For vertical layout.
112
- &[data-unitone-layout~="-stack"] {
113
- row-gap: 0;
114
-
115
- &:where(#{ $selector-main-aside }) > :first-child,
116
- &:where(#{ $selector-aside-main }) > :nth-child(2) {
117
- padding-top: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
118
- padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
119
-
120
- &::before {
121
- border-top-width: var(--unitone--divider-width);
122
- border-bottom-width: var(--unitone--divider-width);
123
- }
124
- }
125
-
126
- &:where(#{ $selector-aside-main }) > :first-child {
127
- padding-top: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
128
- padding-bottom: calc(var(--unitone--row-gap));
129
-
130
- &::before {
131
- border-top-width: var(--unitone--divider-width);
132
- }
133
- }
134
-
135
- &:where(#{ $selector-main-aside }) > :nth-child(2) {
136
- padding-top: var(--unitone--row-gap);
137
- padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
138
-
139
- &::before {
140
- border-bottom-width: var(--unitone--divider-width);
141
- }
142
- }
143
- }
144
-
145
- // For horizontal layout.
146
- &:not([data-unitone-layout~="-stack"]) {
147
- column-gap: 0;
148
-
149
- > * {
150
- padding-right: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
151
- padding-left: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
152
- }
153
-
154
- &:where(:not([data-unitone-layout~="-revert"])) > :first-child,
155
- &:where([data-unitone-layout~="-revert"]) > :nth-child(2) {
156
- &::before {
157
- border-right-width: var(--unitone--divider-width);
158
- border-left-width: var(--unitone--divider-width);
159
- }
160
- }
161
-
162
- &:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
163
- &:where([data-unitone-layout~="-revert"]) > :first-child {
164
- &::before {
165
- border-right-width: var(--unitone--divider-width);
166
- }
167
- }
168
- }
169
- }
170
-
171
- &[data-unitone-layout~="-divider\:divide"] {
172
- align-items: stretch;
173
-
174
- // For vertical layout.
175
- &[data-unitone-layout~="-stack"] {
176
- row-gap: 0;
177
-
178
- > :first-child {
179
- &::before {
180
- border-width: 0 0 var(--unitone--divider-width);
181
- }
182
- }
183
-
184
- &:where(#{ $selector-main-aside }) > :first-child {
185
- padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
186
- }
187
-
188
- &:where(#{ $selector-main-aside }) > :nth-child(2) {
189
- padding-top: var(--unitone--row-gap);
190
- }
191
-
192
- &:where(#{ $selector-aside-main }) > :first-child {
193
- padding-bottom: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
194
- }
195
-
196
- &:where(#{ $selector-aside-main }) > :nth-child(2) {
197
- padding-top: var(--unitone--row-gap);
198
- }
199
- }
200
-
201
- // For horizontal layout.
202
- &:not([data-unitone-layout~="-stack"]) {
203
- column-gap: 0;
204
-
205
- &:where(:not([data-unitone-layout~="-revert"])) > :first-child,
206
- &:where([data-unitone-layout~="-revert"]) > :nth-child(2) {
207
- padding-right: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
208
-
209
- &::before {
210
- border-right-width: var(--unitone--divider-width);
211
- }
212
- }
213
-
214
- &:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
215
- &:where([data-unitone-layout~="-revert"]) > :first-child {
216
- padding-left: var(--unitone--column-gap);
217
- }
218
- }
219
- }
220
-
221
- &[data-unitone-layout~="-divider\:slash"] {
222
- --unitone--divider-height: 2rem;
223
-
224
- gap: 0;
225
- align-items: stretch;
226
-
227
- > :first-child::before {
228
- right: auto;
229
- height: var(--unitone--divider-height);
230
- border-left-width: var(--unitone--divider-width);
231
- border-color: color-mix(in oklab, var(--unitone--divider-color) 97%, #000);
232
- transform: rotate(22.5deg);
233
- }
234
-
235
- // For vertical layout.
236
- &[data-unitone-layout~="-stack"] {
237
- > :first-child {
238
- padding-bottom: var(--unitone--row-gap);
239
-
240
- &::before {
241
- inset:
242
- 100%
243
- auto
244
- auto
245
- calc(50% - var(--unitone--divider-width) / 2);
246
- }
247
- }
248
-
249
- > :nth-child(2) {
250
- padding-top: calc(var(--unitone--row-gap) + var(--unitone--divider-height));
251
- }
252
- }
253
-
254
- // For horizontal layout.
255
- &:not([data-unitone-layout~="-stack"]) {
256
- &:where(:not([data-unitone-layout~="-revert"])) > :first-child,
257
- &:where([data-unitone-layout~="-revert"]) > :nth-child(2) {
258
- padding-right: var(--unitone--column-gap);
259
-
260
- &::before {
261
- right: auto;
262
- bottom: auto;
263
- left: 100%;
264
- }
265
- }
266
-
267
- &:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
268
- &:where([data-unitone-layout~="-revert"]) > :first-child {
269
- padding-left: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
270
- }
271
- }
272
- }
273
-
274
- &[data-unitone-layout~="-divider\:bordered"] {
275
- gap: 0;
276
- align-items: stretch;
277
-
278
- // For vertical layout.
279
- &[data-unitone-layout~="-stack"] {
280
- > ::before {
281
- border-width: var(--unitone--divider-width);
282
- }
283
-
284
- > :nth-child(2)::before {
285
- border-top-width: 0;
286
- }
287
-
288
- &:where(#{ $selector-main-aside }) > :first-child {
289
- padding: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
290
- }
291
-
292
- &:where(#{ $selector-main-aside }) > :nth-child(2) {
293
- padding:
294
- var(--unitone--row-gap)
295
- calc(var(--unitone--row-gap) + var(--unitone--divider-width))
296
- calc(var(--unitone--row-gap) + var(--unitone--divider-width));
297
- }
298
-
299
- &:where(#{ $selector-aside-main }) > :first-child {
300
- padding: calc(var(--unitone--row-gap) + var(--unitone--divider-width));
301
- }
302
-
303
- &:where(#{ $selector-aside-main }) > :nth-child(2) {
304
- padding:
305
- var(--unitone--row-gap)
306
- calc(var(--unitone--row-gap) + var(--unitone--divider-width))
307
- calc(var(--unitone--row-gap) + var(--unitone--divider-width));
308
- }
309
- }
310
-
311
- // For horizontal layout.
312
- &:not([data-unitone-layout~="-stack"]) {
313
- > * {
314
- padding: calc(var(--unitone--column-gap) + var(--unitone--divider-width));
315
-
316
- &::before {
317
- border-width: var(--unitone--divider-width);
318
- }
319
- }
320
-
321
- &:where(:not([data-unitone-layout~="-revert"])) > :nth-child(2),
322
- &:where([data-unitone-layout~="-revert"]) > :first-child {
323
- padding-left: var(--unitone--column-gap);
324
-
325
- &::before {
326
- border-left: 0;
327
- }
328
- }
329
- }
330
- }
331
- }
332
-
333
- @mixin with-sidebar() {
334
- [data-unitone-layout~="with-sidebar"] {
335
- @include abstract-with-sidebar();
336
- }
337
- }
@@ -1,3 +0,0 @@
1
- @forward './with-sidebar-core';
2
-
3
- @warn "Deprecated Sass entry '@inc2734/unitone-css/src/layout-primitives/with-sidebar/with-sidebar' will be removed in a future release. Use '@inc2734/unitone-css/src/layout-primitives/with-sidebar' instead.";
@@ -1,3 +0,0 @@
1
- @use 'root';
2
- @use 'html';
3
- @use 'body';
@@ -1,3 +0,0 @@
1
- @forward './settings-core';
2
-
3
- @warn "Deprecated Sass entry '@inc2734/unitone-css/src/settings/settings' will be removed in a future release. Use '@inc2734/unitone-css/src/settings' instead.";
@@ -1,5 +0,0 @@
1
- @use '../variables' as variables;
2
-
3
- .-fluid-typography {
4
- @include variables.fluid-typography();
5
- }
@@ -1,79 +0,0 @@
1
- $fibonacci-sequence: 1, 2, 3, 5, 8, 13, 21, 34, 55;
2
-
3
- $min-breakpoint: 27; // = 432px
4
- $max-breakpoint: 80; // = 1280px
5
-
6
- $root-font-size: calc(var(--unitone--base-font-size) * 1px);
7
-
8
- $_max-font-size: calc(var(--unitone--harmonic-sequence-base) / (var(--unitone--max-harmonic-sequence-base) - var(--unitone--font-size)));
9
- $_min-font-size: calc(var(--unitone--harmonic-sequence-base) / (var(--unitone--min-harmonic-sequence-base) - var(--unitone--font-size)) + 1 - (var(--unitone--harmonic-sequence-base) / var(--unitone--min-harmonic-sequence-base)));
10
- $_slope: calc((#{ $_max-font-size } - #{ $_min-font-size }) / (#{ $max-breakpoint - $min-breakpoint }));
11
- $_intercept: calc(#{-1 * $min-breakpoint } * #{ $_slope } + #{ $_min-font-size });
12
- $_preferred-font-size: calc((#{ $_intercept } * 1rem) + (#{ $_slope } * 100vw));
13
- $_font-size-fluid: clamp(var(--unitone--fluid-typography-min-length, calc(1rem * #{ $_min-font-size })), #{ $_preferred-font-size }, var(--unitone--fluid-typography-max-length, calc(1rem * $_max-font-size)));
14
-
15
- $_font-size-scale: calc(var(--unitone--harmonic-sequence-base) / (var(--unitone--harmonic-sequence-base) - var(--unitone--font-size)));
16
-
17
- /**
18
- * Line-height scaling (non-linear / hyperbolic reciprocal curve)
19
- *
20
- * This block computes a font-size–dependent line-height using a hyperbolic (reciprocal) curve:
21
- *
22
- * LH(fs) = Lmin' + K / (fs + C)
23
- *
24
- * ### Internal bias (-0.1) for the effective minimum (Lmin')
25
- * We slightly lower the effective minimum to compensate for the
26
- * asymptotic nature of the reciprocal curve. This makes the observed
27
- * minimum in typical font-size ranges closer to the user’s expectation.
28
- *
29
- * ### C: Curvature / controls how quickly the curve approaches the minimum
30
- * Larger C => slower decay (more generous line-height for larger text)
31
- * Smaller C => faster decay (tighter line-height sooner)
32
- *
33
- * ### K: Amplitude / scale factor for the reciprocal term
34
- * We compute K so that the curve respects the intended range between
35
- * max-line-height and the biased minimum, and so that near the base
36
- * font size the line-height stays close to max (and is clamped there).
37
- */
38
- $_min-line-height: calc(var(--unitone--min-line-height) - 0.1);
39
- $_line-height-amplitude: calc((var(--unitone--max-line-height) - #{ $_min-line-height }) * (var(--unitone--base-font-size) + var(--unitone--line-height-curvature)));
40
- $_line-height: clamp(
41
- var(--unitone--min-line-height),
42
- (#{ $_min-line-height } + #{ $_line-height-amplitude } / (var(--unitone--result--1em-px) + var(--unitone--line-height-curvature))),
43
- var(--unitone--max-line-height)
44
- );
45
-
46
- $_font-size: calc($_font-size-scale * 1rem);
47
- $_font-size-em: calc($_font-size-scale * 1em);
48
-
49
- @mixin typography {
50
- --unitone--font-size-rem: #{ $_font-size };
51
- --unitone--font-size-em: #{ $_font-size-em };
52
- --unitone--font-size-fluid: #{ $_font-size-fluid };
53
- --unitone--calculated-font-size: var(--unitone--font-size-rem);
54
-
55
- --unitone--min-line-height: calc(1 + 2 * min(var(--unitone--min-half-leading), var(--unitone--half-leading)));
56
- --unitone--max-line-height: calc(1 + 2 * var(--unitone--half-leading));
57
- --unitone--line-height: #{ $_line-height };
58
-
59
- font-size: var(--unitone--calculated-font-size);
60
- line-height: var(--unitone--line-height);
61
-
62
- // @todo In Firefox, using tan(atan2()) for line-height is considered invalid.
63
- // Therefore, a fallback line-height is applied.
64
- @supports (-moz-appearance: none) {
65
- --unitone--result--1em-px: calc(#{ $_font-size-scale } * var(--unitone--base-font-size));
66
- }
67
- }
68
-
69
- @mixin typography-em {
70
- --unitone--calculated-font-size: var(--unitone--font-size-em);
71
- }
72
-
73
- @mixin fluid-typography {
74
- --unitone--calculated-font-size: var(--unitone--font-size-fluid);
75
- }
76
-
77
- $container-max-width: $max-breakpoint * 16px; // = 1280px
78
- $grid-columns: 12;
79
- $grid-rows: 7;
@@ -1,3 +0,0 @@
1
- @forward './variables-core';
2
-
3
- @warn "Deprecated Sass entry '@inc2734/unitone-css/src/variables/variables' will be removed in a future release. Use '@inc2734/unitone-css/src/variables' instead.";