-
Curious how to achieve the following in TailwindCSS? ol li::marker { font-weight: bold }
|
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Aug 17, 2022
Replies: 2 comments 1 reply
-
If the rule is to apply globally, you could write that verbatim in your base @tailwind base;
@tailwind component;
@tailwind utility;
@layer base {
ol li:marker {
font-weight: bold;
}
} See this Tailwind Play example Otherwise, if it is styling for a particular
This results in:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
u01jmg3
-
In tailwind 4 I just used marker:font-bold on the ol and it works |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the rule is to apply globally, you could write that verbatim in your base
@layer
:See this Tailwind Play example
Otherwise, if it is styling for a particular
<ol><li/></ol>
element structure:ol li
portion, we can use one of these arbitrary variants:[ol_&]
if applying on to theli
s[&_li]
if applying on to theol
[&_ol_li]
if applying on to some parent container::marker
portion, we can use themarker
variantfont-weight: bold
, we use thefont-bold
utilityThis results in: