Search the Community
Showing results for tags '!important'.
-
Hi, in some code of w3schools, I found that there is !important attribute. But I didn't understand it's using. Guys, please help me to understand it. Thank you in advance.
- 13 replies
-
- !important
- important
-
(and 1 more)
Tagged with:
-
I've Been Analyzing W3.CSS When I Found A Strange Thing. I Found That !important Rule Is Used More 90 Times In This Framework,The Problem Here Is That !important Is Paralyzing The Ability To Manipulate Some Of Those Elements Who Carries Some Of The w3-* Classes Using Javascript,For Example: .w3-deep-purple,.w3-hover-deep-purple:hover { color:#fff !important; background-color:#673ab7 !important; } As You Can See,I Can't Manipulate Any Element Which Carries The .w3-deep-purple Class Because The !important Rule Has Disabled Style Manipulation Using JavaScript,This Means That The Following Code Is Useless: function changeFontColor() { document.getElementsByClassName("w3-deep-purple")[0].style.color="orange"; } Although This Code Is 100% Valid,But This Just Won't Work Because Of !important. I Suggest Removing This Rule From The Future Versions Of W3.CSS In Order To Give The Ability To The Developer To Add More Interactivity To His Projects.
- 3 replies
-
- w3.css
- !important
-
(and 1 more)
Tagged with: