Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
you can't make something visible that doesn't exist. not with css. but with lsd maybe?
-
kiki352922y@helloworld style="visibility: initial !important; display: block !important"
stop. your advances are futile. -
kiki352922y@helloworld it's all fun and all but you forgot who you're messing with.
https://jsfiddle.net/h2dLg51q/
jokes aside, the only thing that _sometimes_ can override !important styles is user agent stylesheet. This works for accessibility purposes, so if my stylesheet says font-size of everything should be 18px, no dumb corporate manager can enforce their “dEsIgN” with fine print being 6px.
But this doesn't count, as it will only work for your browser, and with that kind of solution you might as well be writing JS in Tampermonkey.
What you insisted on, that [style] somehow overrides something, is wrong because [style] is a mere attribute selector, no different from a class selector in concept. It just has more specificity, but inline styles (if we're not talking about UA stylesheets) are the most specific of them all. -
@kiki [style] applied on an external sheet can override any inline styles unless the inline style has !important applied then you are fucked. So you are right but I am to a certain extent.
-
kiki352922y@helloworld quit being defensive. You challenged me to a CSS competition saying “no you can't”. I made my turn with inline visibility. Then you made yours with display property. Then I made mine with inline important display property.
After that, you claimed that [style] overrides all inline styles. This is where you were wrong. I demonstrated it wasn't the case with my jsfiddle.
You're not “right to a certain extent”. We weren't discussing specificity in general. I made my turn with inline !important, and you told me that [style] overrides it for that specific case.
You lost. Sorry. -
I do like the double layers here: either the CSS part triggers discussion, or the god part does. Genius.
-
@kiki Chill out! It was a bit of fun who cares . [style] does override inline styles if !important is not applied to inline style.
-
kiki352922y@helloworld I like to be comically serious and competitive about unimportant things so I can feel guilty
This is done by my brain without my consent
I can reveal the face of god using only CSS.
random