When applying a border to my navigation, I thought it would be best practice to make use of the Bootstrap .border
class.
But looking into the code that will render using this class, it appears to be using an !important value on the color value of the border property inside the .border
class. In this case I was making use of the .border-bottom
class to add a border to the bottom of my navigation.
This is what the rendered code would look like when using the class:
.border-bottom {
border-bottom: 1px solid #dee2e6!important;
}
This means if I want to edit the color of this border class, I am required to override the color value with another !important
value. I was wondering, why is this done like this?
Should I still use the .border
class for achieving this purpose and override using another !important
in a custom stylehsheet? Or is the .border
class not meant for achieving the purpose I am trying to achieve (e.g. I would like a red border instead of whatever white/grey-ish color this is)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…