Skip to content
This repository was archived by the owner on Mar 30, 2023. It is now read-only.
This repository was archived by the owner on Mar 30, 2023. It is now read-only.

Issue with variable overrides #43

@ahsan-sabir

Description

@ahsan-sabir

Overriding some variable default only affect that variable, and does not affect other variables using that variable.

For example here's a snippet from _variables.scss

$primary:       $blue !default;
.
.
.
$link-color:    theme-color("primary") !default;

Now if I override the variable $primary then it will not reflect in $link-color.

This will not work

@import "bootstrap/scss/functions"; // Required
@import "bootstrap/scss/variables"; // Required
@import "bootstrap/scss/mixins"; // Required

//
// Override Bootstrap here
//
$primary: red;

Direct override will work

@import "bootstrap/scss/functions"; // Required
@import "bootstrap/scss/variables"; // Required
@import "bootstrap/scss/mixins"; // Required

//
// Override Bootstrap here
//
$primary: red;
$link-color: red; // All other elements using $primary will still appear $blue

Screen Shot 2021-02-11 at 7 41 12 PM

Issue appears to be inherent in bootstrap, and not with this starter template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions