@inc2734/unitone-css 0.94.3 → 0.95.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 (163) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/app.js +1 -1
  3. package/dist/behaviors/dividers.js +1 -0
  4. package/dist/behaviors/index.js +1 -0
  5. package/dist/behaviors/stairs.js +1 -0
  6. package/dist/compatibility/fluid-typography.js +1 -0
  7. package/dist/compatibility/index.js +1 -0
  8. package/dist/layout-primitives/both-sides/react.js +1 -0
  9. package/dist/layout-primitives/center/react.js +1 -0
  10. package/dist/layout-primitives/cluster/react.js +1 -0
  11. package/dist/layout-primitives/container/react.js +1 -0
  12. package/dist/layout-primitives/cover/react.js +1 -0
  13. package/dist/layout-primitives/decorator/react.js +1 -0
  14. package/dist/layout-primitives/float/react.js +1 -0
  15. package/dist/layout-primitives/frame/react.js +1 -0
  16. package/dist/layout-primitives/gutters/react.js +1 -0
  17. package/dist/layout-primitives/index.js +1 -0
  18. package/dist/layout-primitives/layers/react.js +1 -0
  19. package/dist/layout-primitives/marquee/behavior.js +1 -0
  20. package/dist/layout-primitives/marquee/react.js +1 -0
  21. package/dist/layout-primitives/masonry/react.js +1 -0
  22. package/dist/layout-primitives/reel/react.js +1 -0
  23. package/dist/layout-primitives/responsive-grid/react.js +1 -0
  24. package/dist/layout-primitives/stack/react.js +1 -0
  25. package/dist/layout-primitives/switcher/react.js +1 -0
  26. package/dist/layout-primitives/text/react.js +1 -0
  27. package/dist/layout-primitives/texture/react.js +1 -0
  28. package/dist/layout-primitives/vertical-writing/behavior.js +1 -0
  29. package/dist/layout-primitives/vertical-writing/react.js +1 -0
  30. package/dist/layout-primitives/with-sidebar/react.js +1 -0
  31. package/dist/library.js +1 -1
  32. package/package.json +24 -19
  33. package/src/app.js +3 -110
  34. package/src/app.scss +4 -4
  35. package/src/behaviors/_index.scss +43 -0
  36. package/src/{helper → behaviors}/_typography.scss +1 -1
  37. package/src/behaviors/dividers.js +8 -0
  38. package/src/behaviors/index.js +2 -0
  39. package/src/behaviors/stairs.js +8 -0
  40. package/src/compatibility/fluid-typography.js +18 -0
  41. package/src/compatibility/index.js +1 -0
  42. package/src/foundation/_foundation-core.scss +107 -0
  43. package/src/foundation/_foundation.scss +2 -106
  44. package/src/foundation/_index.scss +1 -0
  45. package/src/helper/_helper.scss +2 -42
  46. package/src/layout-primitives/_index.scss +1 -0
  47. package/src/layout-primitives/_layout-primitives-core.scss +41 -0
  48. package/src/layout-primitives/_layout-primitives.scss +2 -42
  49. package/src/layout-primitives/both-sides/_both-sides-core.scss +31 -0
  50. package/src/layout-primitives/both-sides/_both-sides.scss +2 -30
  51. package/src/layout-primitives/both-sides/_index.scss +1 -0
  52. package/src/layout-primitives/both-sides/react.jsx +1 -0
  53. package/src/layout-primitives/center/_center-core.scss +22 -0
  54. package/src/layout-primitives/center/_center.scss +2 -21
  55. package/src/layout-primitives/center/_index.scss +1 -0
  56. package/src/layout-primitives/center/react.jsx +1 -0
  57. package/src/layout-primitives/cluster/_cluster-core.scss +126 -0
  58. package/src/layout-primitives/cluster/_cluster.scss +2 -125
  59. package/src/layout-primitives/cluster/_index.scss +1 -0
  60. package/src/layout-primitives/cluster/react.jsx +3 -0
  61. package/src/layout-primitives/container/_container-core.scss +18 -0
  62. package/src/layout-primitives/container/_container.scss +2 -17
  63. package/src/layout-primitives/container/_index.scss +1 -0
  64. package/src/layout-primitives/container/react.jsx +1 -0
  65. package/src/layout-primitives/cover/_cover-core.scss +80 -0
  66. package/src/layout-primitives/cover/_cover.scss +2 -79
  67. package/src/layout-primitives/cover/_index.scss +1 -0
  68. package/src/layout-primitives/cover/react.jsx +1 -0
  69. package/src/layout-primitives/decorator/_decorator-core.scss +104 -0
  70. package/src/layout-primitives/decorator/_decorator.scss +2 -103
  71. package/src/layout-primitives/decorator/_index.scss +1 -0
  72. package/src/layout-primitives/decorator/react.jsx +1 -0
  73. package/src/layout-primitives/float/_float-core.scss +29 -0
  74. package/src/layout-primitives/float/_float.scss +2 -28
  75. package/src/layout-primitives/float/_index.scss +1 -0
  76. package/src/layout-primitives/float/react.jsx +1 -0
  77. package/src/layout-primitives/frame/_frame-core.scss +36 -0
  78. package/src/layout-primitives/frame/_frame.scss +2 -35
  79. package/src/layout-primitives/frame/_index.scss +1 -0
  80. package/src/layout-primitives/frame/react.jsx +1 -0
  81. package/src/layout-primitives/gutters/_gutters-core.scss +12 -0
  82. package/src/layout-primitives/gutters/_gutters.scss +2 -11
  83. package/src/layout-primitives/gutters/_index.scss +1 -0
  84. package/src/layout-primitives/gutters/react.jsx +1 -0
  85. package/src/layout-primitives/index.js +2 -20
  86. package/src/layout-primitives/layers/_index.scss +1 -0
  87. package/src/layout-primitives/layers/_layers-core.scss +139 -0
  88. package/src/layout-primitives/layers/_layers.scss +2 -138
  89. package/src/layout-primitives/layers/react.jsx +1 -0
  90. package/src/layout-primitives/marquee/_index.scss +1 -0
  91. package/src/layout-primitives/marquee/_marquee-core.scss +73 -0
  92. package/src/layout-primitives/marquee/_marquee.scss +2 -72
  93. package/src/layout-primitives/marquee/behavior.js +8 -0
  94. package/src/layout-primitives/marquee/react.jsx +3 -0
  95. package/src/layout-primitives/masonry/_index.scss +1 -0
  96. package/src/layout-primitives/masonry/_masonry-core.scss +26 -0
  97. package/src/layout-primitives/masonry/_masonry.scss +2 -25
  98. package/src/layout-primitives/masonry/react.jsx +1 -0
  99. package/src/layout-primitives/reel/_index.scss +1 -0
  100. package/src/layout-primitives/reel/_reel-core.scss +55 -0
  101. package/src/layout-primitives/reel/_reel.scss +2 -54
  102. package/src/layout-primitives/reel/react.jsx +1 -0
  103. package/src/layout-primitives/responsive-grid/_index.scss +1 -0
  104. package/src/layout-primitives/responsive-grid/_responsive-grid-core.scss +249 -0
  105. package/src/layout-primitives/responsive-grid/_responsive-grid.scss +2 -248
  106. package/src/layout-primitives/responsive-grid/react.jsx +4 -0
  107. package/src/layout-primitives/stack/_index.scss +1 -0
  108. package/src/layout-primitives/stack/_stack-core.scss +201 -0
  109. package/src/layout-primitives/stack/_stack.scss +2 -200
  110. package/src/layout-primitives/stack/react.jsx +3 -0
  111. package/src/layout-primitives/switcher/_index.scss +1 -0
  112. package/src/layout-primitives/switcher/_switcher-core.scss +70 -0
  113. package/src/layout-primitives/switcher/_switcher.scss +2 -69
  114. package/src/layout-primitives/switcher/react.jsx +3 -0
  115. package/src/layout-primitives/text/_index.scss +1 -0
  116. package/src/layout-primitives/text/_text-core.scss +169 -0
  117. package/src/layout-primitives/text/_text.scss +2 -168
  118. package/src/layout-primitives/text/react.jsx +1 -0
  119. package/src/layout-primitives/texture/_index.scss +1 -0
  120. package/src/layout-primitives/texture/_texture-core.scss +235 -0
  121. package/src/layout-primitives/texture/_texture.scss +2 -234
  122. package/src/layout-primitives/texture/react.jsx +1 -0
  123. package/src/layout-primitives/vertical-writing/_index.scss +1 -0
  124. package/src/layout-primitives/vertical-writing/_vertical-writing-core.scss +118 -0
  125. package/src/layout-primitives/vertical-writing/_vertical-writing.scss +2 -117
  126. package/src/layout-primitives/vertical-writing/behavior.js +8 -0
  127. package/src/layout-primitives/vertical-writing/react.jsx +3 -0
  128. package/src/layout-primitives/with-sidebar/_index.scss +1 -0
  129. package/src/layout-primitives/with-sidebar/_with-sidebar-core.scss +337 -0
  130. package/src/layout-primitives/with-sidebar/_with-sidebar.scss +2 -336
  131. package/src/layout-primitives/with-sidebar/react.jsx +3 -0
  132. package/src/library.js +653 -219
  133. package/src/register-layout-initializer.js +132 -0
  134. package/src/settings/_html.scss +1 -1
  135. package/src/settings/_index.scss +1 -0
  136. package/src/settings/_root.scss +1 -1
  137. package/src/settings/_settings-core.scss +3 -0
  138. package/src/settings/_settings.scss +3 -3
  139. package/src/variables/_index.scss +1 -0
  140. package/src/variables/_variables-core.scss +78 -0
  141. package/src/variables/_variables.scss +2 -77
  142. package/dist/index.js +0 -1
  143. package/src/index.js +0 -1
  144. /package/src/{helper → behaviors}/_align-content.scss +0 -0
  145. /package/src/{helper → behaviors}/_align-items.scss +0 -0
  146. /package/src/{helper → behaviors}/_align-self.scss +0 -0
  147. /package/src/{helper → behaviors}/_align.scss +0 -0
  148. /package/src/{helper → behaviors}/_auto-phrase.scss +0 -0
  149. /package/src/{helper → behaviors}/_auto-repeat.scss +0 -0
  150. /package/src/{helper → behaviors}/_background-clip.scss +0 -0
  151. /package/src/{helper → behaviors}/_gap.scss +0 -0
  152. /package/src/{helper → behaviors}/_gutters.scss +0 -0
  153. /package/src/{helper → behaviors}/_justify-content.scss +0 -0
  154. /package/src/{helper → behaviors}/_justify-items.scss +0 -0
  155. /package/src/{helper → behaviors}/_justify-self.scss +0 -0
  156. /package/src/{helper → behaviors}/_link-decoration.scss +0 -0
  157. /package/src/{helper → behaviors}/_mix-blend-mode.scss +0 -0
  158. /package/src/{helper → behaviors}/_negative-gap.scss +0 -0
  159. /package/src/{helper → behaviors}/_overflow.scss +0 -0
  160. /package/src/{helper → behaviors}/_padding.scss +0 -0
  161. /package/src/{helper → behaviors}/_position.scss +0 -0
  162. /package/src/{helper → behaviors}/_stairs.scss +0 -0
  163. /package/src/{helper → behaviors}/_text-orientation.scss +0 -0
@@ -1,118 +1,3 @@
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);
1
+ @forward './vertical-writing-core';
5
2
 
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
- --unitone--font-size: 4;
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
- --unitone--font-size: 3;
82
- }
83
-
84
- > h3 {
85
- --unitone--font-size: 2;
86
- }
87
-
88
- > h4 {
89
- --unitone--font-size: 1;
90
- }
91
-
92
- > h5 {
93
- --unitone--font-size: 0;
94
-
95
- & + * {
96
- --unitone--margin-block-start: .5;
97
- }
98
- }
99
-
100
- > h6 {
101
- --unitone--font-size: 0;
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
- }
3
+ @warn "Deprecated Sass entry '@inc2734/unitone-css/src/layout-primitives/vertical-writing/vertical-writing' will be removed in a future release. Use '@inc2734/unitone-css/src/layout-primitives/vertical-writing' instead.";
@@ -0,0 +1,8 @@
1
+ import { verticalsResizeObserver } from '../../library';
2
+ import { registerLayoutInitializer } from '../../register-layout-initializer';
3
+
4
+ registerLayoutInitializer({
5
+ key: 'layout-primitives/vertical-writing',
6
+ selector: '[data-unitone-layout~="vertical-writing"]',
7
+ initialize: verticalsResizeObserver,
8
+ });
@@ -0,0 +1,3 @@
1
+ import './behavior';
2
+
3
+ export { VerticalWriting } from './index';
@@ -0,0 +1 @@
1
+ @forward './with-sidebar-core';
@@ -0,0 +1,337 @@
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
+ }