Imagine I have the following code snippet in my index.html file, and I am utilizing Bootstrap:
<head>
bootstrap stylesheet
main.css stylesheet
...
<button class="btn btn-primary">Button</button
The class "btn-primary" is used to style the button blue.
Now, I want to change all my primary buttons to be red instead.
Should I directly modify the Bootstrap class or create my own custom class in main.css?
btn-primary{ background: red; }
OR
btn-red{ background: red; } //applying this class to the specific button
My only concern here is about following best practices.
Both approaches will achieve the desired result.
I simply wish to know if using Bootstrap's classes in this way is considered a frowned-upon practice. What do you think?