@inc2734/unitone-css 0.102.4 → 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 (92) 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/_font-size.scss +11 -0
  7. package/src/behaviors/_index.scss +2 -2
  8. package/src/compatibility/index.js +1 -1
  9. package/src/foundation/_index.scss +141 -1
  10. package/src/layout-primitives/_index.scss +49 -1
  11. package/src/layout-primitives/both-sides/_index.scss +31 -1
  12. package/src/layout-primitives/center/_index.scss +22 -1
  13. package/src/layout-primitives/cluster/_index.scss +104 -1
  14. package/src/layout-primitives/container/_index.scss +18 -1
  15. package/src/layout-primitives/cover/_index.scss +86 -1
  16. package/src/layout-primitives/decorator/_index.scss +109 -1
  17. package/src/layout-primitives/float/_index.scss +29 -1
  18. package/src/layout-primitives/frame/_index.scss +36 -1
  19. package/src/layout-primitives/gutters/_index.scss +30 -1
  20. package/src/layout-primitives/layers/_index.scss +141 -1
  21. package/src/layout-primitives/marquee/_index.scss +73 -1
  22. package/src/layout-primitives/masonry/_index.scss +26 -1
  23. package/src/layout-primitives/popover/_index.scss +1 -1
  24. package/src/layout-primitives/reel/_index.scss +55 -1
  25. package/src/layout-primitives/responsive-grid/_index.scss +225 -1
  26. package/src/layout-primitives/stack/_index.scss +182 -1
  27. package/src/layout-primitives/switcher/_index.scss +70 -1
  28. package/src/layout-primitives/text/_index.scss +144 -1
  29. package/src/layout-primitives/texture/_index.scss +271 -1
  30. package/src/layout-primitives/vertical-writing/_index.scss +118 -1
  31. package/src/layout-primitives/with-sidebar/_index.scss +304 -1
  32. package/src/library.js +0 -48
  33. package/src/settings/_body.scss +0 -1
  34. package/src/settings/_index.scss +3 -1
  35. package/src/settings/_root.scss +47 -9
  36. package/src/utilities/_font-size.scss +8 -15
  37. package/src/utilities/_index.scss +0 -1
  38. package/src/variables/_index.scss +83 -1
  39. package/dist/compatibility/fluid-typography.js +0 -1
  40. package/dist/compatibility/index.js +0 -1
  41. package/src/behaviors/_typography.scss +0 -21
  42. package/src/compatibility/fluid-typography.js +0 -18
  43. package/src/foundation/_foundation-core.scss +0 -135
  44. package/src/foundation/_foundation.scss +0 -3
  45. package/src/helper/_helper.scss +0 -3
  46. package/src/layout-primitives/_layout-primitives-core.scss +0 -49
  47. package/src/layout-primitives/_layout-primitives.scss +0 -3
  48. package/src/layout-primitives/both-sides/_both-sides-core.scss +0 -31
  49. package/src/layout-primitives/both-sides/_both-sides.scss +0 -3
  50. package/src/layout-primitives/center/_center-core.scss +0 -22
  51. package/src/layout-primitives/center/_center.scss +0 -3
  52. package/src/layout-primitives/cluster/_cluster-core.scss +0 -104
  53. package/src/layout-primitives/cluster/_cluster.scss +0 -3
  54. package/src/layout-primitives/container/_container-core.scss +0 -18
  55. package/src/layout-primitives/container/_container.scss +0 -3
  56. package/src/layout-primitives/cover/_cover-core.scss +0 -86
  57. package/src/layout-primitives/cover/_cover.scss +0 -3
  58. package/src/layout-primitives/decorator/_decorator-core.scss +0 -109
  59. package/src/layout-primitives/decorator/_decorator.scss +0 -3
  60. package/src/layout-primitives/float/_float-core.scss +0 -29
  61. package/src/layout-primitives/float/_float.scss +0 -3
  62. package/src/layout-primitives/frame/_frame-core.scss +0 -36
  63. package/src/layout-primitives/frame/_frame.scss +0 -3
  64. package/src/layout-primitives/gutters/_gutters-core.scss +0 -30
  65. package/src/layout-primitives/gutters/_gutters.scss +0 -3
  66. package/src/layout-primitives/layers/_layers-core.scss +0 -141
  67. package/src/layout-primitives/layers/_layers.scss +0 -3
  68. package/src/layout-primitives/marquee/_marquee-core.scss +0 -73
  69. package/src/layout-primitives/marquee/_marquee.scss +0 -3
  70. package/src/layout-primitives/masonry/_masonry-core.scss +0 -26
  71. package/src/layout-primitives/masonry/_masonry.scss +0 -3
  72. package/src/layout-primitives/reel/_reel-core.scss +0 -55
  73. package/src/layout-primitives/reel/_reel.scss +0 -3
  74. package/src/layout-primitives/responsive-grid/_responsive-grid-core.scss +0 -225
  75. package/src/layout-primitives/responsive-grid/_responsive-grid.scss +0 -3
  76. package/src/layout-primitives/stack/_stack-core.scss +0 -182
  77. package/src/layout-primitives/stack/_stack.scss +0 -3
  78. package/src/layout-primitives/switcher/_switcher-core.scss +0 -70
  79. package/src/layout-primitives/switcher/_switcher.scss +0 -3
  80. package/src/layout-primitives/text/_text-core.scss +0 -144
  81. package/src/layout-primitives/text/_text.scss +0 -3
  82. package/src/layout-primitives/texture/_texture-core.scss +0 -271
  83. package/src/layout-primitives/texture/_texture.scss +0 -3
  84. package/src/layout-primitives/vertical-writing/_vertical-writing-core.scss +0 -118
  85. package/src/layout-primitives/vertical-writing/_vertical-writing.scss +0 -3
  86. package/src/layout-primitives/with-sidebar/_with-sidebar-core.scss +0 -304
  87. package/src/layout-primitives/with-sidebar/_with-sidebar.scss +0 -3
  88. package/src/settings/_settings-core.scss +0 -3
  89. package/src/settings/_settings.scss +0 -3
  90. package/src/utilities/_typography.scss +0 -5
  91. package/src/variables/_variables-core.scss +0 -79
  92. package/src/variables/_variables.scss +0 -3
@@ -1,304 +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"]):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
- }
@@ -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.";