Skip to content

SCSS to generate display helper classes #4

Open
@chimericdream

Description

@chimericdream

Note: Once Bootstrap 4.0 is finalized, this feature should follow the same convention they use for their responsive display utilities.

In case the branch is deleted after the release, the file in question is bootstrap/scss/utilities/_display.scss
v4-dev branch of _utilities.scss

Reference
twbs/bootstrap#18410 (comment)
twbs/bootstrap#20004

@if $enable-flex {
    .d-flex {display: flex;}
}
.d-block {display: block;}
.d-inline {display: inline;}
.d-inline-block {display: inline-block;}

@each $breakpoint in map-keys($grid-breakpoints) {
    @include media-breakpoint-up($breakpoint) {
        @if $enable-flex {
            .d-flex-#{$breakpoint} {display: flex;}
        }
        .d-block-#{$breakpoint} {display: block;}
        .d-inline-#{$breakpoint} {display: inline;}
        .d-inline-block-#{$breakpoint} {display: inline-block;}
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions