Skip to main content

base_css

Function base_css 

Source
pub fn base_css() -> &'static str
Expand description

Base structural stylesheet for the viewer HTML preview.

This contains ALL HTML element rules and viewer component rules. It references CSS custom properties (set by the theme token files) with safe fallback values so it works even if a variable is not defined.

Theme files (.css in assets/themes/html_viever/) provide ONLY CSS custom property declarations (--var: value) — no structural rules.

Injection order in the final <style> block:

  1. inline_bg_style — instant background colour flash-prevention
  2. base_css() — this file: all structure, via CSS custom properties
  3. css — the active theme file: only token overrides
  4. table_resize_css — separate <style> block (interactive table/slider/anchor rules)