Skip to content

Conversation

tneotia
Copy link
Contributor

@tneotia tneotia commented May 3, 2021

Fixes #303

Users can do

Html(
   style: Style.getFromThemeData(ThemeData.of(context))..addAll(/*other styles*/),
),

To make h1-h6 and other text elements behave more in line with Flutter styles rather than CSS styles.

@erickok
Copy link
Contributor

erickok commented May 3, 2021

I like this approach. Would just rename the method to Style.fromThemeData(...).

And similarily we can maybe do a Style.fromCss(...) which would allow you to pass in a css string?

@tneotia
Copy link
Contributor Author

tneotia commented May 3, 2021

Would just rename the method to Style.fromThemeData(...).

Done.

And similarily we can maybe do a Style.fromCss(...) which would allow you to pass in a css string?

Nice idea, I added this in #655 since it has the upgraded CSS parsing.

@erickok erickok merged commit e32e68a into Sub6Resources:master May 3, 2021
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.

Honouring the app's theme

2 participants