flutter_html
flutter_html copied to clipboard
[QUESTION] 3.0.0-beta.2: Do :before and :after work?
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") },
}