Practic BUI (Base UI) - v1.0.0
    Preparing search index...

    Function themeCssApplyEdits

    • Applies property edits to a theme while keeping its contract:

      • a scaffold becomes an active rule in place when it gains a declaration, keeping its runtime variables as comments;
      • a template rule turns back into its scaffold when it loses its last declaration or its entry is null;
      • any other rule stays (empty) when it loses its last declaration, and is deleted when its entry is null;
      • a selector the theme lacks is inserted at the end of its part's selectors, or after the leading :root blocks.

      Untouched nodes keep their exact text.

      Parameters

      • theme: ThemeCss

        Parsed theme to edit.

      • edits: ThemeCssEdits

        Values to set per selector.

      • OptionaltemplateSelectors: ReadonlySet<string>

        Selectors that have a scaffold in _template.css; when omitted, every existing selector is treated as one.

      Returns ThemeCss

      A new theme; the input is not modified.