Specificity issue with nested list styles
-
When a list block is nested inside another list block with an EditorsKit style, the inner list style (or lack thereof) may not apply. I have a “default” style list inside a “dashed” style list, and my “default” list items still have a dash because the CSS is too permissive.
This could be fixed by applying the
::before
style to only the direct descendants of the list block that has a style, e.g.:where(ul, ol).is-style-dashed > li::before { ... }
In the meantime, if anyone else runs into this, I’ve used the following to fix my “default” style list items:
:is(ul, ol)[class*="is-style"] .is-style-default > li {
list-style-type: disc !important;
}
:is(ul, ol)[class*="is-style"] .is-style-default > li::before {
display: none;
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.