Now a days I am using sass but I don't understand why should I use !important to apply the style.

It doesn't work until I give !important I have to use 2 time !important specially when I want to set nav menu bar in mobile responsive to hide or show the content? Can you guys tell me what is the reason behind this? Here is my github project link. https://github.com/sabuz796/startupLand/tree/main
GitHub
GitHub - sabuz796/startupLand
Contribute to sabuz796/startupLand development by creating an account on GitHub.
3 Replies
Wolle
Wolle11mo ago
You can use the dev-tools to inspect the element you want to style. There you see which style tops which and what rules apply. The rest is specifishity (https://specifishity.com/)
Mannix
Mannix11mo ago
make a new scss file and move all styling from style.scss except the imports and then import that file before responsive.scss in style.scss basicaly the media queries are loosing because they are higher in the compiled css file that is why you need to use important
Sabuz
Sabuz11mo ago
Thanks a lot
Want results from more Discord servers?
Add your server
More Posts