@iyulab/modern-app 0.28.1 → 0.28.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.28.2] - 2026-09-27
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Long route screens keep the bottom gutter again.** Since 0.23.0 the `main-content` wrapper was
|
|
8
|
+
fixed to the height of the content area, so a screen taller than that overflowed the wrapper and
|
|
9
|
+
the scroll container dropped its bottom padding: scrolled to the end, the content sat flush on the
|
|
10
|
+
bottom edge. The wrapper now passes the height down *and* grows with the content
|
|
11
|
+
(`display: grid; min-height: 100%` — the same rule as `u-outlet`). Screens that fill the area
|
|
12
|
+
(`height: 100%`) are unchanged; with app notices shown, a filling screen gets the height below
|
|
13
|
+
them. If you worked around this with `u-sidebar-layout::part(main-content) { … }`, you can remove it.
|
|
14
|
+
⚠ Do not set `align-content` on `::part(main-content)` — the height hand-down relies on its default.
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
- The layout reference now says that `part="main"` already has a 32px gutter and is the scroll
|
|
19
|
+
container — route screens should not add their own outer padding — and how to change it.
|
|
20
|
+
|
|
3
21
|
## [0.28.1] - 2026-09-24
|
|
4
22
|
|
|
5
23
|
### Fixed
|
|
@@ -206,7 +206,7 @@ var O = class extends i {
|
|
|
206
206
|
<div class="main" part="main" scrollable tabindex="-1" @keydown=${this._handleMainKeydown}>
|
|
207
207
|
<u-progress-bar part="progress"></u-progress-bar>
|
|
208
208
|
|
|
209
|
-
<div class="main-content" part="main-content" ?inert=${this.hasOverlay}>
|
|
209
|
+
<div class="main-content ${this.hasNotice ? "has-notice" : ""}" part="main-content" ?inert=${this.hasOverlay}>
|
|
210
210
|
<div class="notices ${this.hasNotice ? "" : "empty"}" part="notices">
|
|
211
211
|
<slot name="notice" @slotchange=${this.handleNoticeSlotChange}></slot>
|
|
212
212
|
</div>
|
|
@@ -207,8 +207,30 @@ var t = e`
|
|
|
207
207
|
outline: none;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
/*
|
|
211
|
+
* 라우트 본문을 감싸는 래퍼. 동시에 두 가지여야 한다:
|
|
212
|
+
* ⑴ 높이를 «물려준다» — 자손(아웃렛 → 화면)의 height: 100% 가 여기서 풀린다.
|
|
213
|
+
* ⑵ 넘치는 화면과 «함께 자란다» — .main 은 스크롤 영역의 끝 padding 을 in-flow
|
|
214
|
+
* 자식(= 이 래퍼) 뒤에 붙이므로, 래퍼가 화면보다 작게 고정되면 화면이 래퍼 밖으로
|
|
215
|
+
* 넘치고 스크롤 끝의 아래 거터가 사라진다.
|
|
216
|
+
* height: 100% 는 ⑴만, min-height: 100% 단독은 ⑵만 준다(백분율 높이는 부모의 «height»
|
|
217
|
+
* 가 명시됐을 때만 풀린다 — 최솟값은 그 조건이 아니다). grid 만 둘을 함께 준다: 그리드
|
|
218
|
+
* 항목의 기본 stretch 는 백분율 해석이 아니라 «영역 채우기» 라 ⑴이 성립하고, 트랙 높이가
|
|
219
|
+
* auto 라 ⑵대로 자란다. 아웃렛(:where(u-outlet))이 같은 규칙을 쓴다.
|
|
220
|
+
* ⚠align-content 를 선언하지 말 것 — 규칙이 기본값 normal(= auto 트랙 늘리기)에 기댄다.
|
|
221
|
+
*/
|
|
210
222
|
.main-content {
|
|
211
|
-
|
|
223
|
+
display: grid;
|
|
224
|
+
min-height: 100%;
|
|
225
|
+
}
|
|
226
|
+
/*
|
|
227
|
+
* 공지가 있으면 그 행은 내용 높이로 묶는다. 늘리기는 max 크기가 auto 인 트랙에만
|
|
228
|
+
* 적용되므로 max-content 행은 늘어나지 않고, 남는 높이는 뒤따르는 본문 행이 받는다.
|
|
229
|
+
* 공지가 없으면(.notices 가 display: none) 이 규칙도 없어야 한다 — 있으면 본문의 첫
|
|
230
|
+
* 자식이 이 행에 앉아 채우기를 잃는다.
|
|
231
|
+
*/
|
|
232
|
+
.main-content.has-notice {
|
|
233
|
+
grid-template-rows: max-content;
|
|
212
234
|
}
|
|
213
235
|
|
|
214
236
|
/*
|
|
@@ -343,8 +365,11 @@ var t = e`
|
|
|
343
365
|
padding: 0;
|
|
344
366
|
overflow: visible;
|
|
345
367
|
}
|
|
368
|
+
/* 인쇄는 쪽 나눔이 흐름을 따라야 하므로 grid 를 풀고 높이를 내용에 맡긴다
|
|
369
|
+
(아웃렛의 인쇄 규칙과 같은 이유 — grid 상자 안 끝 블록 여백이 쪽 경계를 넘는다). */
|
|
346
370
|
.main-content {
|
|
347
|
-
|
|
371
|
+
display: block;
|
|
372
|
+
min-height: 0;
|
|
348
373
|
}
|
|
349
374
|
:host(:state(overlay)) .main-content {
|
|
350
375
|
display: none;
|
package/package.json
CHANGED
|
@@ -260,7 +260,7 @@ Parts available for `styles` overrides on the root layout:
|
|
|
260
260
|
| `sidebar-main` | Scrollable main nav area |
|
|
261
261
|
| `sidebar-footer` | Pinned footer area |
|
|
262
262
|
| `main` | Main content area (the scroll container) |
|
|
263
|
-
| `main-content` | Wrapper holding route content inside `main` — the shell puts `inert` here while the overlay is open |
|
|
263
|
+
| `main-content` | Wrapper holding route content inside `main` — passes the height down and grows with long content (see [Route content area](#route-content-area)); the shell puts `inert` here while the overlay is open |
|
|
264
264
|
| `progress` | Top progress bar |
|
|
265
265
|
| `overlay` | Route-independent overlay panel above `main` |
|
|
266
266
|
| `overlay-close` | Overlay's close button |
|
|
@@ -287,6 +287,38 @@ the console. Give that container a height — for screen only, so printing is no
|
|
|
287
287
|
}
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
+
## Route content area
|
|
291
|
+
|
|
292
|
+
`part="main"` is the **scroll container** for route content, and it already has a **32px gutter**
|
|
293
|
+
(`padding: var(--u-space-3xl, 32px)`) on every side. **Route screens should not add their own outer
|
|
294
|
+
padding** to `:host` — the gutters add up (32 + 16 = 48px), and they start to differ from screen
|
|
295
|
+
to screen.
|
|
296
|
+
|
|
297
|
+
To change or remove the gutter, override `main` — either through `layout.styles` or the part:
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
layout: { type: 'sidebar', styles: { main: { padding: '0' } } } // full-bleed
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
```css
|
|
304
|
+
u-sidebar-layout::part(main) { padding: 24px; }
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
⚠ `layout.styles` values are inline styles, so they also apply on print media (see [Printing](#printing));
|
|
308
|
+
use `::part(main)` inside `@media screen` if the change is for the screen only.
|
|
309
|
+
|
|
310
|
+
Inside it, `part="main-content"` wraps the route content and does two things at once:
|
|
311
|
+
|
|
312
|
+
- **passes the height down** — a screen that fills the area (`height: 100%`, or a layout such as
|
|
313
|
+
`u-master-detail-layout`) resolves against the area minus its gutters;
|
|
314
|
+
- **grows with long content** — a screen taller than the area scrolls inside `main` and keeps the
|
|
315
|
+
bottom gutter at the end of the scroll.
|
|
316
|
+
|
|
317
|
+
App notices (`slot="notice"`) sit at the top of this wrapper at their own height; a filling screen
|
|
318
|
+
gets the height that remains below them.
|
|
319
|
+
|
|
320
|
+
⚠ Do not set `align-content` on `::part(main-content)` — the height hand-down relies on its default.
|
|
321
|
+
|
|
290
322
|
## Printing
|
|
291
323
|
|
|
292
324
|
On print media the shell drops its app chrome and lets the content flow across pages: the
|