From 6b578ec8de0865c6c5b3e12c7824037a7d422789 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 26 Sep 2012 08:59:57 -0700 Subject: [PATCH] move mixins that generate css to utilities.less with different class names, but the same mixins --- docs/assets/css/bootstrap-responsive.css | 28 ------------ docs/assets/css/bootstrap.css | 56 ++++++++++++------------ less/mixins.less | 6 +-- less/utilities.less | 26 +++++++++-- 4 files changed, 54 insertions(+), 62 deletions(-) diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index 671cdd3c7c..d749708d2d 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -8,34 +8,6 @@ * Designed and built with all the love in the world @twitter by @mdo and @fat. */ -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - .hidden { display: none; visibility: hidden; diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 357b7a410b..f39fe47719 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -125,34 +125,6 @@ textarea { vertical-align: top; } -.clearfix:before, -.clearfix:after { - display: table; - line-height: 0; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 30px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -5703,6 +5675,17 @@ a.badge:hover { color: inherit; } +.clear:before, +.clear:after { + display: table; + line-height: 0; + content: ""; +} + +.clear:after { + clear: both; +} + .pull-right { float: right; } @@ -5723,6 +5706,23 @@ a.badge:hover { visibility: hidden; } +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + .affix { position: fixed; } + +.control-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} diff --git a/less/mixins.less b/less/mixins.less index e5493359cc..f3b3148a90 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -9,7 +9,7 @@ // Clearfix // -------- // For clearing floats like a boss h5bp.com/q -.clearfix { +.clearfix() { &:before, &:after { display: table; @@ -77,7 +77,7 @@ // CSS image replacement // ------------------------- // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 -.hide-text { +.hide-text() { font: 0/0 a; color: transparent; text-shadow: none; @@ -125,7 +125,7 @@ // -------------------------------------------------- // Block level inputs -.input-block-level { +.input-block-level() { display: block; width: 100%; min-height: @inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border) diff --git a/less/utilities.less b/less/utilities.less index 314b4ffdb4..3224732551 100644 --- a/less/utilities.less +++ b/less/utilities.less @@ -3,7 +3,12 @@ // -------------------------------------------------- -// Quick floats +// Floats +// ------------------------- + +.clear { + .clearfix(); +} .pull-right { float: right; } @@ -11,20 +16,35 @@ float: left; } + // Toggling content +// ------------------------- + .hide { display: none; } .show { display: block; } - -// Visibility .invisible { visibility: hidden; } +.text-hide { + .hide-text(); +} + // For Affix plugin +// ------------------------- + .affix { position: fixed; } + + +// Forms +// ------------------------- + +.control-block-level { + .input-block-level(); +}