]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Reorganize utilities into more separate files under a `/scss/utilities/` directory 18537/head
authorChris Rebert <code@chrisrebert.com>
Fri, 11 Dec 2015 03:43:28 +0000 (19:43 -0800)
committerChris Rebert <code@chrisrebert.com>
Thu, 24 Dec 2015 04:01:17 +0000 (21:01 -0700)
[skip sauce]
[skip validator]

scss/_utilities.scss
scss/bootstrap.scss
scss/utilities/_background.scss [moved from scss/_utilities-background.scss with 100% similarity]
scss/utilities/_center-block.scss [new file with mode: 0644]
scss/utilities/_clearfix.scss [new file with mode: 0644]
scss/utilities/_pulls.scss [new file with mode: 0644]
scss/utilities/_screenreaders.scss [new file with mode: 0644]
scss/utilities/_spacing.scss [moved from scss/_utilities-spacing.scss with 100% similarity]
scss/utilities/_text.scss [new file with mode: 0644]
scss/utilities/_visibility.scss [moved from scss/_utilities-responsive.scss with 87% similarity]

index 520666ec1de8daa9d423d54dba7e13614f03adcc..c0df1222fa39fb7a20f2233240c5f4d8823360da 100644 (file)
@@ -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";
index 2ea6f902deaa53531639066e1159c659c86cc0d2..bbcf35b64983a9112967ef6b22c108684faf01fa 100644 (file)
@@ -51,6 +51,3 @@
 
 // Utility classes
 @import "utilities";
-@import "utilities-background";
-@import "utilities-spacing";
-@import "utilities-responsive";
diff --git a/scss/utilities/_center-block.scss b/scss/utilities/_center-block.scss
new file mode 100644 (file)
index 0000000..0c98666
--- /dev/null
@@ -0,0 +1,3 @@
+.center-block {
+  @include center-block();
+}
diff --git a/scss/utilities/_clearfix.scss b/scss/utilities/_clearfix.scss
new file mode 100644 (file)
index 0000000..e92522a
--- /dev/null
@@ -0,0 +1,3 @@
+.clearfix {
+  @include clearfix();
+}
diff --git a/scss/utilities/_pulls.scss b/scss/utilities/_pulls.scss
new file mode 100644 (file)
index 0000000..7fec56c
--- /dev/null
@@ -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;
+    }
+  }
+}
diff --git a/scss/utilities/_screenreaders.scss b/scss/utilities/_screenreaders.scss
new file mode 100644 (file)
index 0000000..9f26fde
--- /dev/null
@@ -0,0 +1,11 @@
+//
+// Screenreaders
+//
+
+.sr-only {
+  @include sr-only();
+}
+
+.sr-only-focusable {
+  @include sr-only-focusable();
+}
diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss
new file mode 100644 (file)
index 0000000..f3a0c98
--- /dev/null
@@ -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();
+}
similarity index 87%
rename from scss/_utilities-responsive.scss
rename to scss/utilities/_visibility.scss
index 0470dc5bfd5f242df674b02c211d4f23cecad018..cdb142869802d3838360ee7b26086784cd2e701c 100644 (file)
@@ -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) {