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
-
aram688ysaves my neck every time but its a lazy way for fixing css try to change the orignal if you could find it
-
@aram it depends... If it is a library, the last thing you wanna do is to modify the original code. If the css is a custom code (maybe some other dev) it is ok to modify it, just make sure you didn't broke anything :)
-
elgamine2838yI feel ya ! but you had a deadline to meet ! and at the end of the day, that's what's
!important
Another messy trick I use to avoid !important: .hack.hack.hack.hack
and call it a day B) -
tahnik389918yIt's bad if it's unnecessary. It can be useful in couple of cases like where you are overriding a Bootstrap class.
-
Feels like I'm putting a pillow on my websites face.
"Shh, shh, you will be a green box and we will all be a happy happy family" -
navi6798yI sometimes do it when client asks for creating different themes and they think it is just changing some colours.
-
620hun83708yYou can override framework CSS by putting your own sheet after the original. Unless they used !important, in which case you're doomed. And that's essentially the problem, !important screws up the cascading nature of CSS.
-
Need to override CSS? Find an ID that wraps it or mention body before the class. Many ways to go about it before resorting to important
Related Rants
-
BrianValente33I'll start implementing this in my apps too.
-
nmunro15How I've decided to answer the "can you hack" question from here on in... "Can you show me how to hack this a...
-
nikolatesla13Friend: So you're a programmer? You must be good in hacking WiFis and sht. Me: Uhm.. Friend: Can you hack my...
I used !important in my CSS
undefined
wk19
hack