Skip to content

Is it possible to add condition for each bootstrap component file include? #804

@trk

Description

@trk

What I mean ?

If you add variables to "_variables.scss" file like :

$use-navbar: true !default;
$use-navbar-default: true !default;
$use-navbar-inverse: true !default;

and usage inside "_navbar.scss" file should be like :

@if $use-navbar == true {
     // Create navbar css terms.... 
}
@if $use-navbar-default == true {
     // Create default-navbar css terms.... 
}
@if $use-navbar-inverse == true {
     // Create inverse-navbar css terms.... 
}

Bootstrap users can overwrite to default settings by importing custom "_variables.scss" file before importing "_bootstrap.scsss" file like:

// Import Custom Bootstrap Variables
@import "theme/my_custom_bootstrap_variables";
// Import Bootstrap
@import "bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap";

And if we don't need extra navbars or other things "Common CSS, Components, JavaScript components" files, we can quickly disable them bye setting options "true < to > false" and we can apply bootstrap updates quickly via bower and other tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions