Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/guides/host-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ covered frame `stage-cover` (the covered rectangles in frame coordinates) and
`stage-inset-top` (plus `stage-inset-bottom` for `foot` overlays at the stage's
bottom) so renderers keep content clear of overlays. You can restyle chips
individually with `--ph-pane-chip-bg`, `--ph-pane-chip-border`,
`--ph-pane-chip-radius`, `--ph-pane-chip-fg`, and `--ph-pane-chip-name`, or set
`--ph-pane-chip-radius`, `--ph-pane-chip-fg`, and `--ph-pane-chip-name`. Header
bands take `--pj-pane-band-bg`, `--pj-pane-band-fg`, and `--pj-pane-band-rule`,
and line their labels up with your layout through `--pj-pane-band-inset` (10px),
or `--pj-pane-band-inset-start` and `--pj-pane-band-inset-end` separately (set
them on `.ph-pane-label` or `.ph-swipe-label` to inset one side). Set
`paneLabels: 'hidden'` when your host names revisions elsewhere; either way, the
labels still name each pane for assistive technology.

Expand Down
8 changes: 6 additions & 2 deletions packages/host/core/src/stage/labels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ export const paneChipClearance = chipTop + chipHeight + chipTop
* renderer's content: the band surface with a divider rule, in the token set's shared surface scale. Band and frame
* sit inside one pane card (`paneCard`), whose single edge is the outline of both. `hidden` keeps the band only for
* assistive technology: it takes no space and still names its pane. A host restyles it with `--pj-pane-band-bg`,
* `--pj-pane-band-fg` and `--pj-pane-band-rule`, as the default UI does to match its own bands.
* `--pj-pane-band-fg` and `--pj-pane-band-rule`, as the default UI does to match its own bands, and lines its label up
* with its own layout with `--pj-pane-band-inset` (10px), or `--pj-pane-band-inset-start` and `-end` apart.
*/
export function PaneBand({
side,
Expand Down Expand Up @@ -247,7 +248,10 @@ export function PaneBand({
// The card's top edge is the band's other pixel.
height: paneGeometry.band - 1,
margin: 0,
padding: '0 10px',
padding: 0,
// A host lines the label up with its own layout through these, without overriding the band's style.
paddingInlineStart: 'var(--pj-pane-band-inset-start, var(--pj-pane-band-inset, 10px))',
paddingInlineEnd: 'var(--pj-pane-band-inset-end, var(--pj-pane-band-inset, 10px))',
fontSize: '0.8em',
fontWeight: 600,
lineHeight: 1.5,
Expand Down
Loading