The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Best practices for assigning colors – Bootstrap classes Reply To: Best practices for assigning colors – Bootstrap classes


Thanks for the response Paulie. The question wasn’t really about editing the Bootstrap color classes though. I know that is possible to edit the Bootstrap color classes, but we avoid doing that to maintain consistency in our style guide (which is tangential).

The question was: is using classes explicitly to assign colors to elements a good practice? In our case those classes happen to be Bootstrap’s color classes but it could really be classes used explicitly for assigning colors in any context (e.g., other frameworks, etc.). The approach seems clunky, but I can see some arguments for consistency and scalability with really large sites.

Bootstrap continues to provide these classes in BS4 so somebody must be using them. However, it wasn’t clear to me whether it was a good practice to assign colors this way.