Installation
All native-DOM scroll owners share one Beehexa scrollbar appearance, including framework Table bodies, Tree/list holders, drawers and native popup portals. Import the explicit application-wide module once beside the source tokens:
import '@beehexa/design-tokens/css';
import '@beehexa/design-tokens/css/scrollbars';
Keep bh-scroll-region on actual application-created overflow owners as an
ownership marker, not an enclosing presentation wrapper. Native framework
holders need no consumer class or internal-node patch: importing the module
opts their native-DOM bars into the same appearance, including offscreen native
measurement probes. The recipe changes no overflow, height, forced gutter,
events or virtual geometry. Layout supplies the actual bound and overflow:auto
where needed; never force an empty bar to make the recipe visible.
<!-- Existing application layout owns the bounded height and overflow:auto. -->
<section class="inspection-pane bh-scroll-region" aria-label="Inspection results">
<!-- The complete logical pane content, including its horizontal extent. -->
</section>
Use one scroll owner per logical pane with a continuous track across all its
scrolling content. A resizable pane’s frame and slot wrappers must not accidentally
become additional scroll owners. Non-scrolling flex/grid ancestors need shrinkable
geometry (min-width: 0 / min-height: 0) where appropriate. Keep headers outside
the owner only when they are intentionally fixed; do not split a pane into multiple
scrolling strips just to style its bar. Independently scrolling editors or lists
are deliberate child viewports, not a reason to put overflow: auto on every
wrapper. Verify both long and short content, both axes together, resize and mobile
layouts; short content must not acquire an empty scrollbar.
The recipe does not change scroll-behavior, overscroll-behavior, touch action,
wheel handling or keyboard handling. Continuous appearance means shared paint and
continuous ownership, not a smooth-scroll animation requirement. Preserve normal
page scroll chaining; do not add default overscroll-behavior: contain. Never hide
bars with scrollbar-width: none, WebKit display: none, zero dimensions or legacy
MS hiding rules; the kit’s overlay lists and Scroll area are the only exception
(Usage, D35). Keep scroll-only content out of drag/pan gesture ownership.
Native ownership and supported virtual adapters
Ant Table bodies, Tree holders, panels, lists, drawers and document owners use
the same native-DOM appearance. The old direct-child scrollbar-color:auto
appearance exemption is removed. Native component internals still own bounds,
scrolling, keyboard/wheel/touch and header/body synchronization. In particular,
native measurement probes see the same themed scrollbar width as Table bodies.
Do not apply an application overflow utility to native roots or replace their
scroll mechanism simply to style it.
AntD4 caches the native fixed-header gutter and sticky offsets only at Table
mount. The existing provider/root-font observer reconciles that gutter with the
body’s actual physical width after reader-root or forced-colors changes; a media
listener shares its existing lifecycle. There is no new table observer, scroll
engine, wrapper, remount or guessed platform width. The source adapter corrects
only the existing gutter column and its cached fixed-header offset. Native ping
classes identify horizontal overflow; smaller/overlay gutters also compensate
the native sticky constraint when all columns fit. Both directions preserve
native body geometry, scrolling and sort/action hitboxes. The evidenced inline
column width requires one scoped !important; forced-colors paint stays native.
AntD4’s normal cells consume paddingContentVerticalLG, but fixed empty/expanded
wrappers negate padding for both axes. These source aliases intentionally differ
in the block axis. The adapter aligns only the normal wrapper’s block margins to
the cell role, removing measured false empty overflow without hiding bars,
clipping content or changing native small/middle, inline or scrolling geometry.
Browser scrollbar pseudo-elements cannot paint virtual scrollbar divs. The
AntD4 source adapter therefore maps rc-virtual-list, Tree and TreeSelect bars
to these same roles. AntD4’s vc-virtual-list/ScrollBar.js exposes no public
scrollbar style/size prop and hardcodes inline8px width, translucent thumb and
99px radius. The adapter’s narrowly scoped !important declarations override
only those evidenced inline inputs, never display, thumb top/height or drag
handlers. Native hover and moving classes retain native lifecycle.
Monaco uses beehexaEditorOptions(locale, observedRootFontSize) for native
scrollbar/slider sizes and arrow/shadow options, plus its official
scrollbarSlider theme colors for normal/hover/active. Its API has no track
or radius theme input; paint-only source CSS is scoped to the existing
renderer surface for those gaps. All read-only/editable/diff callers reuse
the root observer; model identity, selection, undo, scroll and disposal stay
native. Forced-colors mode retains system DOM paint and a visible native
virtual-list thumb. Do not copy these recipes into consumers.
Change a retained viewer’s display language with Monaco’s setModelLanguage on
its existing model. Replacing the model also replaces its native view subtree;
language changes are not a reason to discard retained editor/model identity.
Monaco Diff Overview is a separate two-lane change map, not another scrollbar.
Monaco fixes that map at 30px and gives its viewport marker the full map width,
without a public marker-width option. Source narrows only the visible marker to
scrollbar.width, aligns it to the inline end and applies the same normal,
hover and pressed thumb roles and radius. One scoped !important overrides
the native inline marker width. Both map lanes and their change markers remain;
native marker top/height, pointer delegation, wheel navigation and synchronized
original/modified scrolling are unchanged. Do not disable renderOverviewRuler
or hide a real editor/modal scrollbar to make their widths appear equal.
For monaco-editor-vue3 DiffEditor, bind the Source
useBeehexaMonacoDiffOptions(computedOptions) mount callback as documented in
the editor companion. Unlike its code
editor, that native Vue wrapper does not watch options after mount. Merely
passing a computed options prop leaves native scrollbar sizes stale when the
reader root changes. Update the retained instance; never remount it to resize.
Source roles and Ant Design Vue 4 evidence
These are reusable semantic roles, not an application palette. The installed Ant
Design Vue 4 source es/table/style/index.js, in the Table token factory under
Virtual Scroll Bar, defines:
| Ant role | Ant value | Beehexa source role |
|---|---|---|
tableScrollThumbSize |
8 |
scrollbar.width → space.100 → 0.5rem (nominal 8px) |
tableScrollThumbBg |
colorTextPlaceholder |
scrollbar.thumb → color.text.subtlest |
tableScrollThumbBgHover |
colorTextHeading |
scrollbar.thumbHover → color.text |
tableScrollBg |
colorSplit |
scrollbar.track → color.border |
The Beehexa createAntDesignVueTheme factory already maps those three Ant colors
to the listed semantic roles. Ant’s es/table/style/sticky.js uses
tableScrollThumbBgHover for both &:hover and &-active and a borderRadius: 100
pill. Accordingly scrollbar.thumbActive aliases the hover role and
scrollbar.radius aliases radius.full, not a copied application number.
scrollbar.corner aliases the track to join both axes without a color seam.
The same roles feed native DOM, Ant virtual bars and Monaco; ownership stays native.
Both-axis thickness uses the same scrollbar.width. Do not introduce
per-consumer widths, separate horizontal/vertical recipes or token overrides to
match a local palette. All colors resolve their existing semantic aliases through
light and dark mode. Vietnamese uses the same geometry and colors; no locale-only
scrollbar override is needed. Keep the native reader root size; 0.5rem is nominal
8px, not a hardcoded root-font mandate.
Verification
Use the built/packed imports, never copied generated CSS. Compare actual Revisions Tree and Content side by side, and Settings Members/Profile Admin plus Invitations native Table body vertical/horizontal tracks and corners. Cover short/long/empty data, tree expansion/collapse,1/2-axis overflow, resize, normal/nested/fullscreen, light/dark, reader roots16/20 and relevant desktop/mobile allocations. In WebKit-pseudo-element engines inspect both token-sized axes, arrow omission and actual thumb hover/active/corner paint; in standards-only engines check the supported thin metric/colors. Verify native Table header/body column alignment and preserved pagination. Exercise wheel/keyboard/touch and virtual thumb drag, forced colors, and long-to-short transitions without a second owner, hidden columns or fake empty scrollbar. Source/build alone is not visual proof.
The package payload checker requires the typed css/scrollbars export, resolves a
strict side-effect import from a real extracted tarball and compares its CSS bytes
against src/styles/scrollbars.css. The complete active rule is discoverable as
en/components/scrollbar/code through @beehexa/design-rules.