Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.13.0 Style::new() function error #152

Open
arthasyou opened this issue Dec 15, 2023 · 1 comment
Open

v0.13.0 Style::new() function error #152

arthasyou opened this issue Dec 15, 2023 · 1 comment

Comments

@arthasyou
Copy link

I follow the example as bellow
use stylist::Style;

let style = Style::new("background-color: red;")?;

the error is:

the trait bound StyleSource: From<&str> is not satisfied
the trait From<Sheet> is implemented for StyleSource
required for &str to implement Into<StyleSource>
required for StyleSource to implement TryFrom<&str>

@WorldSEnder
Copy link
Collaborator

WorldSEnder commented Dec 26, 2023

The example shown in the "Runtime Style" section of the README depends on enabling the parser feature. I suppose this should be made clear. Prefer the macros generally, due to lower runtime overhead.

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

No branches or pull requests

2 participants