0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Embeds a CSS stylesheet in the document. Covers cascade-layer placement against VB's layers, media-scoped blocks, CSP nonces, render blocking, and why a style block or tokens beat style attributes.
Description
The <style> element holds CSS for the document it sits in. It belongs in the <head>. Its rules join the cascade exactly like a linked stylesheet at the same position, so the usual tools apply: cascade layers, specificity and source order.
For anything reused across pages, prefer a linked stylesheet (<link rel="stylesheet">), which the browser can cache. A <style> block suits page-specific rules, demos and critical CSS.
Later layers win over earlier ones. Themes self-declare @layer bundle-theme, so they sit above every framework layer. Unlayered CSS beats every layer, whatever its specificity. That is how your own <style> block overrides VB without !important.
Override VB: write plain, unlayered rules. They win.
Extend VB at a given level: wrap rules in one of VB's layer names, e.g. @layer native-elements { … }. They then compete normally with VB's own rules in that layer, and themes still apply on top.
Link main.css (which declares the order) before any <style> that names a VB layer. A layer first named in your block would otherwise be created in the wrong position.
VB's conformance check (vb/no-inline-style) flags style="…"attributes, not <style> elements. Inline attributes cannot be layered, overridden by themes, scoped by media queries or reused. Move the rule into a <style> block or stylesheet, and use design tokens for the values.
Prefer a style block with tokens
<!-- Flagged: inline style attribute with a hardcoded colour --><pstyle="color: #555; margin-top: 24px">…</p><!-- Preferred: a rule in a style block, using tokens --><style>.note { color: var(--color-text-muted); margin-block-start: var(--size-l); }</style><pclass="note">…</p>
For per-element values, use a data attribute that CSS reads, or one of the documented layout custom properties (--layout-min, --layout-threshold, --layout-content-min), which the conformance check allows.
Media-Scoped Blocks
The mediaattribute applies the whole block only when the query matches. It is equivalent to wrapping the contents in @media.
A strict Content Security Policy blocks inline styles unless they carry the response's nonce, listed in style-src. Note that a nonce allows a <style> element but never a style=""attribute; that is one more reason to avoid style attributes.
Explicitly hold rendering until the styles are ready. A <style> in the <head> is already render-blocking; the attribute matters mostly for blocks inserted by script.
Never hide content that matters with CSS alone if assistive technology still reads it, or the reverse. Use hidden or VB's .visually-hidden deliberately.
Keep user preferences working: honour prefers-reduced-motion and VB's data-motion-reduced switch, and do not override focus outlines without a visible replacement.
Use colour tokens rather than hardcoded colours, so text keeps its contrast across themes and in dark mode.
CSS content text is announced inconsistently. Do not put essential information in generated content.