I’ve worked with Sass maps before, but only to automate mixins and such. What’s our best way to override one or two of these values? Or will we be copying the whole map into our _variables.scss file and editing it there?
This is compounded by the fact that the above references the $gray- colors, which Sage’s _variables.scss doesn’t have access to since it’s called first in main.scss and those values don’t exist yet.
So this is an interesting problem. I’d love to start updating some of my in-progress projects for Bootstrap Beta, but I’m not sure how best to tackle these basic issues. Anyone with more Sass experience have thoughts?
It seems to me that without this fix the entire Bootstrap color system must be imported into Sage’s _variables.scss in order to override a single color, like the primary color. See extended conversation here:
This is profoundly annoying, but with @ben’s ‘OK’ I can make a PR with the color system copied to _variables.scss and the primary overridden to Sage’s traditional green.
I don’t care for it. Last time I tried Bootstrap 4 was around May and I ended up rolling the project back to Bootstrap 3 because of this type of stuff. At the time the colors weren’t in maps, but it seemed like everything else was - spacers, break points, columns, container widths.
I know it’s probably an “old man yells at cloud” scenario on my part, but I don’t see the benefit here. It seems like being clever just for the sake of being clever.
Other than an intense desire to learn the latest thing and be on top of it, no? But Beta and release are going to be more stable. And that stability means we have to learn new things
Having the colors in a theme-colors map seemed a bit strange at once, but one benefit seems to be that components are only generated in the color variants that you define in this map, and it is easier to add new colors if needed. Also really like the new grid column ordering system.
This is really helping me out. I don’t have to remember to do a background variant, button variant, alert variant, text variant, etc. I just add a color to $theme-colors and recompile. Very nice.
Rather than using explicit .visible-* classes, you make an element visible by simply not hiding it at that screen size. You can combine one .d-*-none class with one .d-*-block class to show an element only on a given interval of screen sizes (e.g. .d-none.d-md-block.d-xl-none shows the element only on medium and large devices).