Skip to content

question about future of theme-colors #23126

Closed

Description

@wojtask9

bootstrap v4.beta1 is around the corner so I would ask what is the future of theme-colors?

Currently all themeable components iterate over theme-colors map.
It is possible that in future (v4 lifetime) there will be for example separate maps for components (example alert-theme, table-theme, buttons-theme, etc)?

And what about "color-levels"? Currently they are hardcoded.
@include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6));
Is there a chance that after beta1 things will be more customizable?

Activity

  1. added
    cssSass sources or compiled CSS
    v4v4, the frozen docs on gh-pages
    on Jul 20, 2017
  2. mdo commented on Jul 20, 2017

    @mdo
    Member

    Goal is for every color to have their own Sass map for 100 to 900 levels. We'll likely have variables for all those, too. There are currently no plans to provide different maps unique to each component.

    What else are you thinking about for easier customization?

  3. wojtask9 commented on Jul 20, 2017

    @wojtask9
    ContributorAuthor

    Maybe something misunderstood about color-levels.
    For example how to make alerts border darker than default?
    Currently there isn't any way to achieve this (see https://github.com/twbs/bootstrap/blob/v4-dev/scss/_alert.scss#L46) without modify sources.
    Another example are buttons.
    How to make border color other than background-color (https://github.com/twbs/bootstrap/blob/v4-dev/scss/_buttons.scss#L55).

    Currently when we updating bsv4 sources we replace lines mentioned above using simple regexp to something similar:

    @include alert-variant(theme-color-level($color, $alert-bg-color-lvl), theme-color-level($color, $alert-border-color-lvl), theme-color-level($color, $alert-color-lvl));

    It's not ideal solution but works.

  4. mdo commented on Oct 1, 2017

    @mdo
    Member

    Closing for #23418.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cssSass sources or compiled CSSv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions