From the course: Bootstrap 4 with Sass

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using maps to add colors

Using maps to add colors - Bootstrap Tutorial

From the course: Bootstrap 4 with Sass

Start my 1-month free trial

Using maps to add colors

- [Instructor] Most people know that Bootstrap uses its own version of named colors, like primary, secondary, success and so on and so forth, to define how different elements are drawn. So, for example, when you want to use a button you usually use btn and then btn-primary if you want the color to be, in this case, blue. And although we can modify the names of the colors we can also add additional colors because these are expressed in this section in the variables, that scss file, as maps. So you can see here that the named colors are actually creating reference to the colors in Bootstrap. So we can actually add another color in here and give it our own name. However, I would suggest that you spend most of your time first modifying the existing colors. But occasionally, I really want something that is in addition to say primary and secondary and sometimes these names don't exactly make a lot of sense. So I don't have something that I necessarily want to call success and may have sort…

Contents