mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Reorganize utilities into more separate files under a /scss/utilities/
directory
[skip sauce] [skip validator]
This commit is contained in:
parent
1e8743ec89
commit
7aabd49364
@ -1,95 +1,8 @@
|
||||
//
|
||||
// Floats
|
||||
//
|
||||
|
||||
.clearfix {
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
.center-block {
|
||||
@include center-block();
|
||||
}
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.pull-#{$breakpoint}-left {
|
||||
@include pull-left();
|
||||
}
|
||||
.pull-#{$breakpoint}-right {
|
||||
@include pull-right();
|
||||
}
|
||||
.pull-#{$breakpoint}-none {
|
||||
float: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Screenreaders
|
||||
//
|
||||
|
||||
.sr-only {
|
||||
@include sr-only();
|
||||
}
|
||||
|
||||
.sr-only-focusable {
|
||||
@include sr-only-focusable();
|
||||
}
|
||||
|
||||
.invisible {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.text-hide {
|
||||
@include text-hide();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Text
|
||||
//
|
||||
|
||||
// Alignment
|
||||
|
||||
.text-justify { text-align: justify !important; }
|
||||
.text-nowrap { white-space: nowrap !important; }
|
||||
.text-truncate { @include text-truncate; }
|
||||
|
||||
// Responsive alignment
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.text-#{$breakpoint}-left { text-align: left !important; }
|
||||
.text-#{$breakpoint}-right { text-align: right !important; }
|
||||
.text-#{$breakpoint}-center { text-align: center !important; }
|
||||
}
|
||||
}
|
||||
|
||||
// Transformation
|
||||
|
||||
.text-lowercase { text-transform: lowercase !important; }
|
||||
.text-uppercase { text-transform: uppercase !important; }
|
||||
.text-capitalize { text-transform: capitalize !important; }
|
||||
|
||||
// Weight and italics
|
||||
|
||||
.font-weight-normal { font-weight: normal; }
|
||||
.font-weight-bold { font-weight: bold; }
|
||||
.font-italic { font-style: italic; }
|
||||
|
||||
// Contextual colors
|
||||
|
||||
.text-muted {
|
||||
color: $text-muted;
|
||||
}
|
||||
|
||||
@include text-emphasis-variant('.text-primary', $brand-primary);
|
||||
|
||||
@include text-emphasis-variant('.text-success', $brand-success);
|
||||
|
||||
@include text-emphasis-variant('.text-info', $brand-info);
|
||||
|
||||
@include text-emphasis-variant('.text-warning', $brand-warning);
|
||||
|
||||
@include text-emphasis-variant('.text-danger', $brand-danger);
|
||||
@import "utilities/background";
|
||||
@import "utilities/center-block";
|
||||
@import "utilities/clearfix";
|
||||
@import "utilities/pulls";
|
||||
@import "utilities/screenreaders";
|
||||
@import "utilities/spacing";
|
||||
@import "utilities/text";
|
||||
@import "utilities/visibility";
|
||||
|
3
scss/bootstrap.scss
vendored
3
scss/bootstrap.scss
vendored
@ -51,6 +51,3 @@
|
||||
|
||||
// Utility classes
|
||||
@import "utilities";
|
||||
@import "utilities-background";
|
||||
@import "utilities-spacing";
|
||||
@import "utilities-responsive";
|
||||
|
3
scss/utilities/_center-block.scss
Normal file
3
scss/utilities/_center-block.scss
Normal file
@ -0,0 +1,3 @@
|
||||
.center-block {
|
||||
@include center-block();
|
||||
}
|
3
scss/utilities/_clearfix.scss
Normal file
3
scss/utilities/_clearfix.scss
Normal file
@ -0,0 +1,3 @@
|
||||
.clearfix {
|
||||
@include clearfix();
|
||||
}
|
13
scss/utilities/_pulls.scss
Normal file
13
scss/utilities/_pulls.scss
Normal file
@ -0,0 +1,13 @@
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.pull-#{$breakpoint}-left {
|
||||
@include pull-left();
|
||||
}
|
||||
.pull-#{$breakpoint}-right {
|
||||
@include pull-right();
|
||||
}
|
||||
.pull-#{$breakpoint}-none {
|
||||
float: none !important;
|
||||
}
|
||||
}
|
||||
}
|
11
scss/utilities/_screenreaders.scss
Normal file
11
scss/utilities/_screenreaders.scss
Normal file
@ -0,0 +1,11 @@
|
||||
//
|
||||
// Screenreaders
|
||||
//
|
||||
|
||||
.sr-only {
|
||||
@include sr-only();
|
||||
}
|
||||
|
||||
.sr-only-focusable {
|
||||
@include sr-only-focusable();
|
||||
}
|
53
scss/utilities/_text.scss
Normal file
53
scss/utilities/_text.scss
Normal file
@ -0,0 +1,53 @@
|
||||
//
|
||||
// Text
|
||||
//
|
||||
|
||||
// Alignment
|
||||
|
||||
.text-justify { text-align: justify !important; }
|
||||
.text-nowrap { white-space: nowrap !important; }
|
||||
.text-truncate { @include text-truncate; }
|
||||
|
||||
// Responsive alignment
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.text-#{$breakpoint}-left { text-align: left !important; }
|
||||
.text-#{$breakpoint}-right { text-align: right !important; }
|
||||
.text-#{$breakpoint}-center { text-align: center !important; }
|
||||
}
|
||||
}
|
||||
|
||||
// Transformation
|
||||
|
||||
.text-lowercase { text-transform: lowercase !important; }
|
||||
.text-uppercase { text-transform: uppercase !important; }
|
||||
.text-capitalize { text-transform: capitalize !important; }
|
||||
|
||||
// Weight and italics
|
||||
|
||||
.font-weight-normal { font-weight: normal; }
|
||||
.font-weight-bold { font-weight: bold; }
|
||||
.font-italic { font-style: italic; }
|
||||
|
||||
// Contextual colors
|
||||
|
||||
.text-muted {
|
||||
color: $text-muted;
|
||||
}
|
||||
|
||||
@include text-emphasis-variant('.text-primary', $brand-primary);
|
||||
|
||||
@include text-emphasis-variant('.text-success', $brand-success);
|
||||
|
||||
@include text-emphasis-variant('.text-info', $brand-info);
|
||||
|
||||
@include text-emphasis-variant('.text-warning', $brand-warning);
|
||||
|
||||
@include text-emphasis-variant('.text-danger', $brand-danger);
|
||||
|
||||
// Misc
|
||||
|
||||
.text-hide {
|
||||
@include text-hide();
|
||||
}
|
@ -1,7 +1,13 @@
|
||||
//
|
||||
// Responsive utilities
|
||||
// Visibility utilities
|
||||
//
|
||||
|
||||
.invisible {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
// Responsive visibility utilities
|
||||
|
||||
@each $bp in map-keys($grid-breakpoints) {
|
||||
.hidden-#{$bp}-up {
|
||||
@include media-breakpoint-up($bp) {
|
Loading…
x
Reference in New Issue
Block a user