When adding a border to my navigation menu, I initially thought using the Bootstrap .border
class would be the best approach.
However, upon examining the code generated by this class, I noticed that it uses an !important declaration on the color property of the border within the .border
class. Specifically, I was utilizing the .border-bottom
class to apply a border to the bottom of my navigation.
Below is an example of the code produced when using the class:
.border-bottom {
border-bottom: 1px solid #dee2e6!important;
}
This implies that if I wish to change the color of this border class, I must override the color value using another !important
. This led me to question why this approach is used.
Should I stick with the .border
class and override the color using another !important
in a custom stylesheet? Or is the .border
class not suitable for my desired outcome (for instance, I prefer a red border instead of the current white/grey shade)?