As someone who dabbles in both web design and development, I typically enjoy crafting my own CSS rather than relying on frameworks. However, in a recent project, my client requested that I code the HTML & CSS using Bootstrap 4 to assist their development team.
After agreeing to the client's request, I found myself facing some uncertainties regarding best practices when working with Bootstrap. For instance, if I wanted to incorporate a left border with a unique non-theme color to a .navbar-text, I had questions:
- Should I create a new class specifically for this customization or simply override the existing .navbar-text class? Normally, I stick to BEM methodology and opt for creating a new class, but I'm unsure if it might cause confusion given the circumstances.
- Considering that I am already implementing a CSS rule for the border, should I also utilize Bootstrap utility classes for additional styling on the element? If I want to include some left padding, would it be better to apply the pl-2 class or specify padding-left: 0.5rem in my CSS rule?
In order to optimize ease of collaboration with their development team, I seek guidance on the most suitable approach to take. Any suggestions or insights would be greatly valued.