Hacker News new | past | comments | ask | show | jobs | submit login

>> !important really was a mistake and should only be used to counteract other uses of !important you don't have control over.

That's mainly when I use it. Mostly to override colors Bootstrap CSS has defined with it.

For example a nav background color set in the Bootstrap file "/scss/mixins/_background-variant.scss":

.bg-light { background-color: #f8f9fa!important; }

By default I use that, but I also let users select a CSS file to override that with a color they chose from a list of "themes" I've made.

My themes only change a small bit of what Bootstrap CSS has described in their themes. It wouldn't make any sense for me to do anything more than that because it works works and it's easy for me to implement the change.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: