Permalink
Browse files

Merge branch 'wip-MDL-44074-master_4' of git://github.com/gjb2048/moodle

  • Loading branch information...
2 parents 0f1e131 + d8037b2 commit 4cb6f806d7a5437c14a14b32b818bfc5579f98e5 @damyon damyon committed Mar 5, 2014
@@ -25,8 +25,11 @@ h4 small { font-size: round(@baseFontSize * 0.85); } // ~12px
}
}
-// YUI's calculation of blocks within a fluid grid. Copied from there grid code.
+// Bootstrap's calculation of blocks within a fluid grid. Copied from their grid code.
.fluid-span (@columns) {
- width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
- *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
+ .fluid-span-full(@columns, @fluidGridColumnWidth, @fluidGridGutterWidth);
+}
+.fluid-span-full (@columns, @columnWidth, @gutterWidth) {
+ width: (@columnWidth * @columns) + (@gutterWidth * (@columns - 1));
+ *width: (@columnWidth * @columns) + (@gutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
}
@@ -105,6 +105,7 @@
}
@media (min-width: 1200px) {
+ // Login page.
.loginbox.twocolumns .loginpanel {
margin-left: 0;
}
@@ -160,6 +161,21 @@
}
}
+ // Core empty block regions.
+ .fluid-span (@columns) {
+ .fluid-span-full(@columns, @fluidGridColumnWidth1200, @fluidGridGutterWidth1200);
+ }
+ .empty-region-side-post.used-region-side-pre, // Post region is empty and pre region is in use.
+ .jsenabled.docked-region-side-post.used-region-side-pre { // All post blocks docked and pre region is in use.
+ #region-main.span8 {
+ /** increase the span size by 1 **/
+ .fluid-span(9);
+ }
+ #block-region-side-pre.span4 {
+ /** decrease the span size by 1 **/
+ .fluid-span(3);
+ }
+ }
}
@media (min-width: 980px) {
@@ -174,6 +190,7 @@
}
@media (min-width: 768px) and (max-width: 979px) {
+ // Login page.
.loginbox.twocolumns .loginpanel {
margin-left: 0;
}
@@ -182,6 +199,21 @@
width: 48.61878453038674%;
*width: 48.56559304102504%;
}
+ // Core empty block regions.
+ .fluid-span (@columns) {
+ .fluid-span-full(@columns, @fluidGridColumnWidth768, @fluidGridGutterWidth768);
+ }
+ .empty-region-side-post.used-region-side-pre, // Post region is empty and pre region is in use.
+ .jsenabled.docked-region-side-post.used-region-side-pre { // All post blocks docked and pre region is in use.
+ #region-main.span8 {
+ /** increase the span size by 1 **/
+ .fluid-span(9);
+ }
+ #block-region-side-pre.span4 {
+ /** decrease the span size by 1 **/
+ .fluid-span(3);
+ }
+ }
}
@media (max-width: 767px) {
@@ -384,7 +416,7 @@
}
}
-@media (max-width: 768px) {
+@media (max-width: 767px) {
// Resize, reflow file-picker on small devices
#filesskin .yui3-panel,
#filesskin .file-picker.fp-generallayout {
@@ -436,16 +468,17 @@
.box-sizing(border-box);
}
- // We need to specify a more specific selector to reset the width for
- // cases when we have content in the side-pre blockregion but not in the
- // side-post blockregion as there are more specific selectors in
- // core.less which take precedence which break responsiveness.
- .empty-region-side-post.used-region-side-pre {
- #block-region-side-pre.span4,
- #region-main.span8.span8 {
- .fluid-span(12);
- }
- }
+ // We need to specify a more specific selector to reset the width for
+ // cases when we have content in the side-pre blockregion but not in the
+ // side-post blockregion as there are more specific selectors in
+ // core.less which take precedence which break responsiveness.
+ .empty-region-side-post.used-region-side-pre, // Post region is empty and pre region is in use.
+ .jsenabled.docked-region-side-post.used-region-side-pre { // All post blocks docked and pre region is in use.
+ #block-region-side-pre.span4,
+ #region-main.span8 {
+ .fluid-span(12);
+ }
+ }
.row-fluid .span12 {
width: 100%;
@@ -481,6 +514,9 @@
// All widths between 1200px and 1600px
@media (min-width: 1200px) and (max-width: 1600px) {
+ .fluid-span (@columns) {
+ .fluid-span-full(@columns, @fluidGridColumnWidth1200, @fluidGridGutterWidth1200);
+ }
// CSS for the course management pages.
#course-category-listings.columns-3 {
background-color:transparent;
@@ -489,8 +525,8 @@
#category-listing,
#course-listing {
.fluid-span(6);
- margin-left: @fluidGridGutterWidth;
- *margin-left: @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%);
+ margin-left: @fluidGridGutterWidth1200;
+ *margin-left: @fluidGridGutterWidth1200 - (.5 / @gridRowWidth * 100 * 1%);
&:first-child {
margin-left: 0;
}
@@ -500,7 +536,6 @@
margin: 1em 0 0;
}
}
-
}
// All widths up to 1199px.
@@ -561,4 +596,4 @@
margin-right: 0;
}
}
-}
+}

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 4cb6f80

Please sign in to comment.