i looked at a page and i saw in the html something like that:
<li data-row-index="2">
and in the css:
li[data-row-index="2"]{
font-size: 16px
}
what does the bracket do? i know brackets purpose in java script but not in html and css.
i looked at a page and i saw in the html something like that:
<li data-row-index="2">
and in the css:
li[data-row-index="2"]{
font-size: 16px
}
what does the bracket do? i know brackets purpose in java script but not in html and css.
It’s called an ‘attribute selector’. See this SO answer: https://stackoverflow.com/questions/15604182/why-use-an-attribute-selector-to-match-classes or these docs: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors