]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move grid flex classes to utils instead maybe?
authorMark Otto <markdotto@gmail.com>
Thu, 7 Jan 2016 00:01:00 +0000 (16:01 -0800)
committerMark Otto <markdotto@gmail.com>
Sat, 6 Feb 2016 08:52:53 +0000 (00:52 -0800)
scss/_grid.scss
scss/utilities/_flex.scss [new file with mode: 0644]

index de5b8fc4d7e94d0190a9baafe9b306070bf2bd17..78a0d91a92c32661a5e522fe5ff2dc75b5088535 100644 (file)
 
   @include make-grid-columns();
 }
-
-
-// Flex variation
-//
-// Custom styles for additional flex alignment options.
-
-@if $enable-flex and $enable-grid-classes {
-
-  // Flex column reordering
-
-  @each $breakpoint in map-keys($grid-breakpoints) {
-    @include media-breakpoint-up($breakpoint) {
-      .col-#{$breakpoint}-first { order: -1; }
-      .col-#{$breakpoint}-last  { order: 1; }
-    }
-  }
-
-  // Alignment for every column in row
-
-  @each $breakpoint in map-keys($grid-breakpoints) {
-    @include media-breakpoint-up($breakpoint) {
-      .row-#{$breakpoint}-top    { align-items: flex-start; }
-      .row-#{$breakpoint}-center { align-items: center; }
-      .row-#{$breakpoint}-bottom { align-items: flex-end; }
-    }
-  }
-
-  // Alignment per column
-
-  @each $breakpoint in map-keys($grid-breakpoints) {
-    @include media-breakpoint-up($breakpoint) {
-      .col-#{$breakpoint}-top    { align-self: flex-start; }
-      .col-#{$breakpoint}-center { align-self: center; }
-      .col-#{$breakpoint}-bottom { align-self: flex-end; }
-    }
-  }
-}
diff --git a/scss/utilities/_flex.scss b/scss/utilities/_flex.scss
new file mode 100644 (file)
index 0000000..3bcf372
--- /dev/null
@@ -0,0 +1,35 @@
+// Flex variation
+//
+// Custom styles for additional flex alignment options.
+
+@if $enable-flex and $enable-grid-classes {
+
+  // Flex column reordering
+
+  @each $breakpoint in map-keys($grid-breakpoints) {
+    @include media-breakpoint-up($breakpoint) {
+      .flex-#{$breakpoint}-first { order: -1; }
+      .flex-#{$breakpoint}-last  { order: 1; }
+    }
+  }
+
+  // Alignment for every column in row
+
+  @each $breakpoint in map-keys($grid-breakpoints) {
+    @include media-breakpoint-up($breakpoint) {
+      .flex-all-#{$breakpoint}-top    { align-items: flex-start; }
+      .flex-all-#{$breakpoint}-center { align-items: center; }
+      .flex-all-#{$breakpoint}-bottom { align-items: flex-end; }
+    }
+  }
+
+  // Alignment per column
+
+  @each $breakpoint in map-keys($grid-breakpoints) {
+    @include media-breakpoint-up($breakpoint) {
+      .flex-#{$breakpoint}-top    { align-self: flex-start; }
+      .flex-#{$breakpoint}-center { align-self: center; }
+      .flex-#{$breakpoint}-bottom { align-self: flex-end; }
+    }
+  }
+}