Skip to content

feat: add CssStrategy enum for external and inline css#51

Merged
mohamedmansour merged 2 commits into
mainfrom
feature/css-options
Feb 24, 2026
Merged

feat: add CssStrategy enum for external and inline css#51
mohamedmansour merged 2 commits into
mainfrom
feature/css-options

Conversation

@mohamedmansour

@mohamedmansour mohamedmansour commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Introduce CssStrategy to control how component stylesheets are emitted during parsing:

  • External (default): emits <link> tags referencing .css files
  • Inline: embeds CSS content in <style> tags within shadow DOM

The strategy is set on HtmlParser via set_css_strategy() and affects process_component_template output. The webui-cli exposes this as --css <external|inline> on the build command.

Also feature-gates walkdir/filesystem methods behind the 'fs' feature so webui-parser compiles for crates without filesystem dependencies.

…very

Introduce CssStrategy to control how component stylesheets are
emitted during parsing:

- External (default): emits <link> tags referencing .css files
- Inline: embeds CSS content in <style> tags within shadow DOM

The strategy is set on HtmlParser via set_css_strategy() and
affects process_component_template output. The webui-cli exposes
this as --css <external|inline> on the build command.

Also feature-gates walkdir/filesystem methods behind the 'fs'
feature so webui-parser compiles for wasm32 without filesystem
dependencies.
@mohamedmansour mohamedmansour requested a review from a team February 24, 2026 20:32
@mohamedmansour mohamedmansour changed the title feat: add CssStrategy enum for external and inline component CSS deli… feat: add CssStrategy enum for external and inline css Feb 24, 2026
@mohamedmansour mohamedmansour merged commit aa932dd into main Feb 24, 2026
5 checks passed
@mohamedmansour mohamedmansour deleted the feature/css-options branch February 24, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants