Skip to content

Split colors from _variables.scss#33368

Closed
mdo wants to merge 2 commits intomainfrom
split-vars-colors
Closed

Split colors from _variables.scss#33368
mdo wants to merge 2 commits intomainfrom
split-vars-colors

Conversation

@mdo
Copy link
Member

@mdo mdo commented Mar 15, 2021

This PR introduces a new Sass partial, _colors.scss, to help improve the structure of our code base given Sass's limitations around re-assigning variables. This should allow folks to use our own color variables in their customization more easily. Arguably this could be considered a breaking change, so we'll want to be careful about this.


TBD if we break out further variables... if we wanted to, some ideas could include:

  • _settings.scss to house our $enable- options, escaped characters, and variable prefix.
  • _grid.scss to house our breakpoints, containers, and more.
  • _type.scss for all typography

Not 100% final on anything, but potentially worth discussing while we're evaluating this.

@ffoodd
Copy link
Member

ffoodd commented Mar 18, 2021

Looks promising, did you checked that override was indeed easier?

@mdo mdo closed this Jun 24, 2021
@mdo mdo deleted the split-vars-colors branch June 24, 2021 01:20
@a-kriya
Copy link
Contributor

a-kriya commented May 13, 2022

This change would've been helpful when simply wanting to refer to the existing palette rather than extending the color-map:

image

So I currently copy the palette which is imported before the overrides, followed by bootstrap/scss/variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants