s&box/field-guide
tag

#ui

12 items (12 fixes)

fixes
26.07
"Building an s&box HUD"

One ScreenPanel host, static UIState for modals, self-closing panels, toast stack — BuildHash every flag the markup reads.

26.07
"Editing .razor safely (shell/emoji mojibake)"

Razor HUD emoji and dashes die under Get-Content/Set-Content — edit with byte-safe UTF-8 APIs or a real editor.

26.07
"Flex-grow track with a percentage-width child causes a layout feedback loop"

A flex-grow slider track holding a normal-flow fill child sized by width:N% balloons wider as the value increases — take the fill out of flow with position:absolute.

26.07
"My s&box UI won't update / is frozen"

BuildHash() is the only re-render trigger — hash everything the markup reads, including collection contents and flags.

26.07
"New .razor.scss files are not applied until the editor restarts"

A newly created .razor.scss file is not picked up by a running editor session — the panel component works but is unstyled until the next restart.

26.07
"PanelComponent uses OnTreeBuilt, not OnAfterTreeRender"

OnAfterTreeRender(bool) is a Panel hook — on a PanelComponent it fails with CS0115; use parameterless OnTreeBuilt() or OnTreeFirstBuilt().

26.07
"Roboto Mono is the engine's monospace font"

s&box ships Roboto Mono (all weights) — JetBrains Mono and Consolas only resolve on dev machines with those system fonts.

26.07
"Runtime textures for UI panels must be assigned from C#"

SCSS background-image only resolves asset paths — runtime Texture objects must be assigned via Panel.Style.BackgroundImage in OnTreeBuilt.

26.07
"TextEntry.OnTextEdited needs an explicit-type block lambda"

An untyped or expression-bodied lambda on TextEntry.OnTextEdited fails with CS8917 or CS0029 — use an explicit param type plus a block body.

26.07
"The Razor @namespace trap"

Razor classes get a RootNamespace/folder-derived namespace — declare @namespace and global using or C# can't find your panels.

26.07
"Too many font-size declarations corrupt UI text rendering"

Many selectors declaring font-size in one SCSS file can make text render as solid filled rectangles — carry hierarchy via font-weight/color instead.

26.07
"Whitespace next to a Razor tag or expression boundary collapses to nothing"

Literal spaces adjacent to a tag or @-expression boundary vanish in Razor markup — use a single interpolated string or CSS margin instead.