Skip to content

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

Open
@mkilling

Description

@mkilling

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") },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcssEnhancements/issues with css propertiesquestion

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions