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

[QUESTION] 3.0.0-beta.2: Do :before and :after work? #1445

Open
mkilling opened this issue Oct 22, 2024 · 0 comments
Open

[QUESTION] 3.0.0-beta.2: Do :before and :after work? #1445

mkilling opened this issue Oct 22, 2024 · 0 comments
Labels
bug Something isn't working css Enhancements/issues with css properties question

Comments

@mkilling
Copy link

mkilling commented Oct 22, 2024

I've been trying unsuccessfully to get :before and :after pseudo selectors to work, but they seem to just be ignored. Can anybody confirm that they work for them with 3.0.0-beta.2?

@override
Widget build(BuildContext context, WidgetRef ref) {
  return Html(
    data: "<ol><li>this</li><li>is</li><li>a</li><li>list</li></ol>",
    style: Style.fromCss('li:before { content: "HELLO"; }', null));
}

Both li:before and li::before do not work.

Update: it also does not work when written this way, however with this version I can see the respective code in lib/src/processing/befores_afters.dart get executed. Still no visible difference though.

@override
Widget build(BuildContext context, WidgetRef ref) {
  return Html(
    data: "<ol><li>this</li><li>is</li><li>a</li><li>list</li></ol>",
    style: { "li": Style(before: "HELLO") },
}
@Sub6Resources Sub6Resources added bug Something isn't working css Enhancements/issues with css properties labels Mar 12, 2025
@Sub6Resources Sub6Resources moved this to Todo in flutter_html Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working css Enhancements/issues with css properties question
Projects
Status: Todo
Development

No branches or pull requests

2 participants