1

I have a global variable defined for the list and is referenced in my html

ol>li::before, ul>li::before {
color: #FFFFFF;
content: '\00A7';
display: inline-block;  
position: absolute;
}

I am trying to override this in my html as I have to remove just this line:

content: '\00A7';

If I simply use it in my local file it doesn't override. Any suggestions on how do I fix this?

1
  • 1
    you can try ol>li::before, ul>li::before {content: initial !important!} Commented Apr 17, 2020 at 2:43

1 Answer 1

3

you have three ways to achieve it.

  1. add !important after your own css in your css file
ol>li::before, ul>li::before {
content: '\00A7' !important;
} 
  1. add the css after the global css in your html
<link rel="stylesheet" href="global.css">
<link rel="stylesheet" href="my.css">
  1. add a tag in your html element
<ol my-tag>
...
</ol>
ol[my-tag]>li::before{
    // your own css
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.