|
54 | 54 | } |
55 | 55 |
|
56 | 56 | // Content shadow: fixed-position pseudo spanning the full viewport height. |
57 | | - // Width matches column 2 (content-width + 2*spacing) — the shadow tightly |
58 | | - // wraps the padded column. The real padding-inline on body children creates |
| 57 | + // Width matches column 2 (--nc-column-width) — the shadow tightly wraps |
| 58 | + // the padded column. The real padding-inline on body children creates |
59 | 59 | // the visual gap between content and shadow edge. |
60 | 60 | // The clamp() formula handles visibility: shadow shows when there's at |
61 | 61 | // least spacing of clearance on each side between shadow and viewport edge, |
|
68 | 68 | left: 50%; |
69 | 69 | transform: translateX(-50%); |
70 | 70 | width: clamp(0px, |
71 | | - #{string.unquote('calc((100% - var(#{$prefix}content-width) - 4 * var(#{$prefix}spacing)) * 9999)')}, |
72 | | - #{string.unquote('calc(var(#{$prefix}content-width) + 2 * var(#{$prefix}spacing))')} |
| 71 | + #{string.unquote('calc((100% - var(#{$prefix}column-width) - 2 * var(#{$prefix}spacing)) * 9999)')}, |
| 72 | + var(#{$prefix}column-width) |
73 | 73 | ); |
74 | 74 | box-shadow: var(#{$prefix}content-shadow); |
75 | 75 | pointer-events: none; |
|
78 | 78 |
|
79 | 79 | } |
80 | 80 |
|
81 | | -// Break out to shadow/column edge (content-width + 2*spacing). |
| 81 | +// Break out to shadow/column edge (--nc-column-width). |
82 | 82 | // Uses the same shadow-visibility condition as the body::before pseudo: |
83 | 83 | // when shadow is visible, caps at column width (shadow boundary); |
84 | 84 | // when shadow is hidden (narrow viewport), goes full width. |
|
91 | 91 | grid-column: 1 / -1; |
92 | 92 | width: 100%; |
93 | 93 | max-width: clamp( |
94 | | - #{string.unquote('calc(var(#{$prefix}content-width) + 2 * var(#{$prefix}spacing))')}, |
95 | | - #{string.unquote('calc((100% - var(#{$prefix}content-width) - 4 * var(#{$prefix}spacing)) * -9999)')}, |
| 94 | + var(#{$prefix}column-width), |
| 95 | + #{string.unquote('calc((100% - var(#{$prefix}column-width) - 2 * var(#{$prefix}spacing)) * -9999)')}, |
96 | 96 | 100% |
97 | 97 | ); |
98 | 98 | margin-inline: auto; |
|
0 commit comments