From d5e42cf81a5b0a680d59e3dc5ebdc45652b7b4e9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 21:54:11 -0700 Subject: [PATCH 1/5] tweak readonly, disabled, and uneditable form elements --- bootstrap-1.2.0.css | 29 +++++++++++--------- bootstrap-1.2.0.min.css | 8 +++--- docs/index.html | 42 ++++++++++++++++------------- lib/forms.less | 59 +++++++++++++++++++++++++++++------------ 4 files changed, 86 insertions(+), 52 deletions(-) diff --git a/bootstrap-1.2.0.css b/bootstrap-1.2.0.css index 7a848a247c..543aa4d167 100644 --- a/bootstrap-1.2.0.css +++ b/bootstrap-1.2.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Fri Sep 2 20:59:16 PDT 2011 + * Date: Fri Sep 2 21:53:08 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -707,12 +707,12 @@ textarea { height: auto; } .uneditable-input { - background-color: #eee; + background-color: #fff; display: block; - border-color: #ccc; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + border-color: #eee; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); } :-moz-placeholder { color: #bfbfbf; @@ -728,7 +728,7 @@ input, select, textarea { -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); } -input:focus, textarea:focus { +input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(82, 168, 236, 0.8); -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); @@ -800,14 +800,17 @@ select.xxlarge { width: 530px; } textarea.xxlarge { - overflow-y: scroll; + overflow-y: auto; } -input[readonly]:focus, textarea[readonly]:focus, input.disabled { - background: #f5f5f5; +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + background-color: #f5f5f5; border-color: #ddd; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + cursor: not-allowed; } .actions { background: #f5f5f5; diff --git a/bootstrap-1.2.0.min.css b/bootstrap-1.2.0.min.css index e085351756..e7b9966424 100644 --- a/bootstrap-1.2.0.min.css +++ b/bootstrap-1.2.0.min.css @@ -112,11 +112,11 @@ input[type=file]{background-color:#fff;padding:initial;border:initial;line-heigh input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;} select,input[type=file]{height:27px;line-height:27px;} textarea{height:auto;} -.uneditable-input{background-color:#eee;display:block;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);} +.uneditable-input{background-color:#fff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);} :-moz-placeholder{color:#bfbfbf;} ::-webkit-input-placeholder{color:#bfbfbf;} input,select,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);} -input:focus,textarea:focus{outline:none;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);} +input:focus,select:focus,textarea:focus{outline:none;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);} form div.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.error>label,form div.error span.help-inline,form div.error span.help-block{color:#9d261d;} form div.error input,form div.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form div.error input:focus,form div.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);} form div.error .input-prepend span.add-on,form div.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;} @@ -126,8 +126,8 @@ form div.error .input-prepend span.add-on,form div.error .input-append span.add- .input-large,input.large,textarea.large,select.large{width:210px;} .input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;} .input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;} -textarea.xxlarge{overflow-y:scroll;} -input[readonly]:focus,textarea[readonly]:focus,input.disabled{background:#f5f5f5;border-color:#ddd;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +textarea.xxlarge{overflow-y:auto;} +input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} .actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;} .help-inline,.help-block{font-size:12px;line-height:18px;color:#bfbfbf;} .help-inline{padding-left:5px;*position:relative;*top:-5px;} diff --git a/docs/index.html b/docs/index.html index d2e0366118..35cb88d610 100644 --- a/docs/index.html +++ b/docs/index.html @@ -621,7 +621,7 @@
Example form legend
- +
@@ -651,19 +651,25 @@
- +
- Some Value Here + Some value here
- +
+
+ +
+ +
+
- +
Small snippet of help text @@ -673,7 +679,7 @@
Example form legend
- +
@ @@ -682,7 +688,7 @@
- +
@@ -691,7 +697,7 @@
- +
@@ -700,7 +706,7 @@
- +
@@ -709,7 +715,7 @@
Example form legend
- +
  • @@ -743,7 +749,7 @@
- +
@@ -758,14 +764,14 @@
- + Block of help text to describe the field above if need be.
- +
  • @@ -784,7 +790,7 @@
-   +  
@@ -803,7 +809,7 @@
Example form legend
- +
@@ -824,14 +830,14 @@
Example form legend
- +
Small snippet of help text
- +
  • @@ -854,7 +860,7 @@
-   +  
diff --git a/lib/forms.less b/lib/forms.less index a16844ab1e..5f8a09693e 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -113,11 +113,13 @@ textarea { height: auto; } +// For text that needs to appear as an input but should not be an input .uneditable-input { - background-color: #eee; + background-color: #fff; display: block; - border-color: #ccc; - .box-shadow(inset 0 1px 2px rgba(0,0,0,.075)); + border-color: #eee; + .box-shadow(inset 0 1px 2px rgba(0,0,0,.025)); + cursor: not-allowed; } // Placeholder text gets special styles; can't be bundled together though for some reason @@ -130,12 +132,14 @@ textarea { // Focus states input, -select, textarea { +select, +textarea { @transition: border linear .2s, box-shadow linear .2s; .transition(@transition); .box-shadow(inset 0 1px 3px rgba(0,0,0,.1)); } input:focus, +select:focus, textarea:focus { outline: none; border-color: rgba(82,168,236,.8); @@ -175,35 +179,56 @@ form div.error { } // Form element sizes -.input-mini, input.mini, textarea.mini, select.mini { +.input-mini, +input.mini, +textarea.mini, +select.mini { width: 60px; } -.input-small, input.small, textarea.small, select.small { +.input-small, +input.small, +textarea.small, +select.small { width: 90px; } -.input-medium, input.medium, textarea.medium, select.medium { +.input-medium, +input.medium, +textarea.medium, +select.medium { width: 150px; } -.input-large, input.large, textarea.large, select.large { +.input-large, +input.large, +textarea.large, +select.large { width: 210px; } -.input-xlarge, input.xlarge, textarea.xlarge, select.xlarge { +.input-xlarge, +input.xlarge, +textarea.xlarge, +select.xlarge { width: 270px; } -.input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge { +.input-xxlarge, +input.xxlarge, +textarea.xxlarge, +select.xxlarge { width: 530px; } textarea.xxlarge { - overflow-y: scroll; + overflow-y: auto; } -// Turn off focus for disabled (read-only) form elements -input[readonly]:focus, -textarea[readonly]:focus, -input.disabled { - background: #f5f5f5; +// Disabled and read-only inputs +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + background-color: #f5f5f5; border-color: #ddd; - .box-shadow(none); + cursor: not-allowed; } // Actions (the buttons) From 5c3f0e32e6940e9e9482f8eaf6864c75dab3dacf Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 22:08:38 -0700 Subject: [PATCH 2/5] updated container mixin to be fixed-container instead so we can keep the .container in scaffolding while removing the repeated code --- bootstrap-1.2.0.css | 23 +++++++++++++++++------ bootstrap-1.2.0.min.css | 9 +++++---- lib/preboot.less | 5 +++-- lib/scaffolding.less | 4 +--- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/bootstrap-1.2.0.css b/bootstrap-1.2.0.css index 543aa4d167..b2bcc20b33 100644 --- a/bootstrap-1.2.0.css +++ b/bootstrap-1.2.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Fri Sep 2 21:53:08 PDT 2011 + * Date: Fri Sep 2 22:08:17 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -185,17 +185,18 @@ textarea { margin-left: auto; margin-right: auto; } -.container { +.fixed-container { width: 940px; - margin: 0 auto; + margin-left: auto; + margin-left: auto; zoom: 1; margin-bottom: 18px; } -.container:before, .container:after { +.fixed-container:before, .fixed-container:after { display: table; content: ""; } -.container:after { +.fixed-container:after { clear: both; } .btn.danger, @@ -395,7 +396,16 @@ body { .container { width: 940px; margin-left: auto; - margin-right: auto; + margin-left: auto; + zoom: 1; + margin-bottom: 18px; +} +.container:before, .container:after { + display: table; + content: ""; +} +.container:after { + clear: both; } .container-fluid { padding-left: 20px; @@ -713,6 +723,7 @@ textarea { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; } :-moz-placeholder { color: #bfbfbf; diff --git a/bootstrap-1.2.0.min.css b/bootstrap-1.2.0.min.css index e7b9966424..a294e905e7 100644 --- a/bootstrap-1.2.0.min.css +++ b/bootstrap-1.2.0.min.css @@ -22,8 +22,8 @@ textarea{overflow:auto;vertical-align:top;} .clearfix{zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} .clearfix:after{clear:both;} .center-block{display:block;margin-left:auto;margin-right:auto;} -.container{width:940px;margin:0 auto;zoom:1;margin-bottom:18px;}.container:before,.container:after{display:table;content:"";} -.container:after{clear:both;} +.fixed-container{width:940px;margin-left:auto;margin-left:auto;zoom:1;margin-bottom:18px;}.fixed-container:before,.fixed-container:after{display:table;content:"";} +.fixed-container:after{clear:both;} .btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;} .btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} .btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} @@ -65,7 +65,8 @@ textarea{overflow:auto;vertical-align:top;} .row .offset-two-thirds{margin-left:660px;} html,body{background-color:#fff;} body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#808080;} -.container{width:940px;margin-left:auto;margin-right:auto;} +.container{width:940px;margin-left:auto;margin-left:auto;zoom:1;margin-bottom:18px;}.container:before,.container:after{display:table;content:"";} +.container:after{clear:both;} .container-fluid{padding-left:20px;padding-right:20px;zoom:1;margin-bottom:18px;}.container-fluid:before,.container-fluid:after{display:table;content:"";} .container-fluid:after{clear:both;} .container-fluid>.sidebar{float:left;width:220px;} @@ -112,7 +113,7 @@ input[type=file]{background-color:#fff;padding:initial;border:initial;line-heigh input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;} select,input[type=file]{height:27px;line-height:27px;} textarea{height:auto;} -.uneditable-input{background-color:#fff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);} +.uneditable-input{background-color:#fff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} :-moz-placeholder{color:#bfbfbf;} ::-webkit-input-placeholder{color:#bfbfbf;} input,select,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);} diff --git a/lib/preboot.less b/lib/preboot.less index d840ad1a61..adbbc676ea 100644 --- a/lib/preboot.less +++ b/lib/preboot.less @@ -121,9 +121,10 @@ } // Grid System -.container { +.fixed-container { width: @siteWidth; - margin: 0 auto; + margin-left: auto; + margin-left: auto; .clearfix(); } .columns(@columnSpan: 1) { diff --git a/lib/scaffolding.less b/lib/scaffolding.less index b7c44e652a..10af26c16d 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -73,9 +73,7 @@ body { // Container (centered, fixed-width layouts) .container { - width: @siteWidth; - margin-left: auto; - margin-right: auto; + .fixed-container(); } // Fluid layouts (left aligned, with sidebar, min- & max-width content) From 162534139170e3416cb33a5b5c5093d4a2a5e8f0 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 22:09:12 -0700 Subject: [PATCH 3/5] fix repeated margin-left --- bootstrap-1.2.0.css | 6 +++--- bootstrap-1.2.0.min.css | 4 ++-- lib/preboot.less | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bootstrap-1.2.0.css b/bootstrap-1.2.0.css index b2bcc20b33..b502d7fa76 100644 --- a/bootstrap-1.2.0.css +++ b/bootstrap-1.2.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Fri Sep 2 22:08:17 PDT 2011 + * Date: Fri Sep 2 22:09:02 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -188,7 +188,7 @@ textarea { .fixed-container { width: 940px; margin-left: auto; - margin-left: auto; + margin-right: auto; zoom: 1; margin-bottom: 18px; } @@ -396,7 +396,7 @@ body { .container { width: 940px; margin-left: auto; - margin-left: auto; + margin-right: auto; zoom: 1; margin-bottom: 18px; } diff --git a/bootstrap-1.2.0.min.css b/bootstrap-1.2.0.min.css index a294e905e7..d823c6bef3 100644 --- a/bootstrap-1.2.0.min.css +++ b/bootstrap-1.2.0.min.css @@ -22,7 +22,7 @@ textarea{overflow:auto;vertical-align:top;} .clearfix{zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} .clearfix:after{clear:both;} .center-block{display:block;margin-left:auto;margin-right:auto;} -.fixed-container{width:940px;margin-left:auto;margin-left:auto;zoom:1;margin-bottom:18px;}.fixed-container:before,.fixed-container:after{display:table;content:"";} +.fixed-container{width:940px;margin-left:auto;margin-right:auto;zoom:1;margin-bottom:18px;}.fixed-container:before,.fixed-container:after{display:table;content:"";} .fixed-container:after{clear:both;} .btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;} .btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} @@ -65,7 +65,7 @@ textarea{overflow:auto;vertical-align:top;} .row .offset-two-thirds{margin-left:660px;} html,body{background-color:#fff;} body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#808080;} -.container{width:940px;margin-left:auto;margin-left:auto;zoom:1;margin-bottom:18px;}.container:before,.container:after{display:table;content:"";} +.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;margin-bottom:18px;}.container:before,.container:after{display:table;content:"";} .container:after{clear:both;} .container-fluid{padding-left:20px;padding-right:20px;zoom:1;margin-bottom:18px;}.container-fluid:before,.container-fluid:after{display:table;content:"";} .container-fluid:after{clear:both;} diff --git a/lib/preboot.less b/lib/preboot.less index adbbc676ea..3cf9241928 100644 --- a/lib/preboot.less +++ b/lib/preboot.less @@ -124,7 +124,7 @@ .fixed-container { width: @siteWidth; margin-left: auto; - margin-left: auto; + margin-right: auto; .clearfix(); } .columns(@columnSpan: 1) { From 4dbd2334bd8156b7621e11c19a411db1308821d8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 23:01:38 -0700 Subject: [PATCH 4/5] updated hero example, added fluid example, resolved issue with tabs and fluid nav --- bootstrap-1.2.0.css | 14 +++++- bootstrap-1.2.0.min.css | 7 ++- examples/fluid.html | 103 ++++++++++++++++++++++++++++++++++++++++ examples/hero.html | 5 ++ lib/patterns.less | 8 +++- lib/scaffolding.less | 9 ++++ 6 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 examples/fluid.html diff --git a/bootstrap-1.2.0.css b/bootstrap-1.2.0.css index 7c286fc542..a4f671ebf3 100644 --- a/bootstrap-1.2.0.css +++ b/bootstrap-1.2.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Fri Sep 2 22:09:40 PDT 2011 + * Date: Fri Sep 2 22:56:14 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -445,6 +445,12 @@ a:hover { color: #0050a3; text-decoration: underline; } +.pull-right { + float: right; +} +.pull-left { + float: left; +} /* Typography.less * Headings, body text, lists, code, and more for a versatile and durable typography system * ---------------------------------------------------------------------------------------- */ @@ -1159,6 +1165,10 @@ table .headerSortUp.purple, table .headerSortDown.purple { font-weight: 200; line-height: 1; } +.topbar p { + margin: 0; + line-height: 40px; +} .topbar form { float: left; margin: 5px 0 0 0; @@ -1460,6 +1470,7 @@ a.menu:after, .dropdown-toggle:after { display: block; } .tabs { + float: left; width: 100%; border-bottom: 1px solid #ddd; } @@ -1524,7 +1535,6 @@ a.menu:after, .dropdown-toggle:after { } .hero-unit { background-color: #f5f5f5; - margin-top: 60px; margin-bottom: 30px; padding: 60px; -webkit-border-radius: 6px; diff --git a/bootstrap-1.2.0.min.css b/bootstrap-1.2.0.min.css index 832a39dcd1..a238cc6d3e 100644 --- a/bootstrap-1.2.0.min.css +++ b/bootstrap-1.2.0.min.css @@ -74,6 +74,8 @@ body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size: .hide{display:none;} .show{display:block;} a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#0050a3;text-decoration:underline;} +.pull-right{float:right;} +.pull-left{float:left;} p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;} h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;} h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;} @@ -181,6 +183,7 @@ table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0 .topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} .topbar a:hover,.topbar ul .active a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;} .topbar h3{position:relative;}.topbar h3 a{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;} +.topbar p{margin:0;line-height:40px;} .topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;} .topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#fff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;} .topbar input::-webkit-input-placeholder{color:#e6e6e6;} @@ -206,14 +209,14 @@ a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;conten .tabs,.pills{margin:0 0 20px;padding:0;list-style:none;zoom:1;margin-bottom:18px;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";} .tabs:after,.pills:after{clear:both;} .tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;} -.tabs{width:100%;border-bottom:1px solid #ddd;}.tabs>li{position:relative;top:1px;}.tabs>li>a{margin-right:2px;padding:0 15px;line-height:35px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{background-color:#eee;border-bottom:1px solid #ddd;text-decoration:none;} +.tabs{float:left;width:100%;border-bottom:1px solid #ddd;}.tabs>li{position:relative;top:1px;}.tabs>li>a{margin-right:2px;padding:0 15px;line-height:35px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{background-color:#eee;border-bottom:1px solid #ddd;text-decoration:none;} .tabs>li.active>a{background-color:#fff;padding:0 14px;border:1px solid #ddd;border-bottom:0;color:#808080;} .tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} .tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;} .tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;} .pills a{margin:5px 3px 5px 0;padding:0 15px;text-shadow:0 1px 1px #fff;line-height:30px;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{background:#0050a3;color:#fff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);} .pills .active a{background:#0069d6;color:#fff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);} -.hero-unit{background-color:#f5f5f5;margin-top:60px;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} +.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} .hero-unit p{font-size:18px;font-weight:200;line-height:27px;} footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;} .page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;} diff --git a/examples/fluid.html b/examples/fluid.html new file mode 100644 index 0000000000..63ffc75ef9 --- /dev/null +++ b/examples/fluid.html @@ -0,0 +1,103 @@ + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + +
+
+
+

Project name

+ +

Logged in as username

+
+
+
+ +
+ +
+ +
+

Hello, world!

+

Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

+

Learn more »

+
+ +
+
+

Heading

+

Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

+

View details »

+
+
+

Heading

+

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

+

View details »

+
+
+

Heading

+

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

+

View details »

+
+
+
+

© Company 2011

+
+
+
+ + + \ No newline at end of file diff --git a/examples/hero.html b/examples/hero.html index ef773c5d01..2255454c6d 100644 --- a/examples/hero.html +++ b/examples/hero.html @@ -13,6 +13,11 @@ + diff --git a/lib/patterns.less b/lib/patterns.less index 57e682da84..eccda9359a 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -46,6 +46,12 @@ } } + // Plain text in topbar + p { + margin: 0; + line-height: 40px; + } + // Search Form form { float: left; @@ -312,6 +318,7 @@ a.menu:after, // Basic Tabs .tabs { + float: left; width: 100%; border-bottom: 1px solid #ddd; > li { @@ -385,7 +392,6 @@ a.menu:after, .hero-unit { background-color: #f5f5f5; - margin-top: 60px; margin-bottom: 30px; padding: 60px; .border-radius(6px); diff --git a/lib/scaffolding.less b/lib/scaffolding.less index 5f4734b996..845c4d3553 100644 --- a/lib/scaffolding.less +++ b/lib/scaffolding.less @@ -101,6 +101,7 @@ body { display: block; } + // BASE STYLES // ----------- @@ -115,3 +116,11 @@ a { text-decoration: underline; } } + +// Quick floats +.pull-right { + float: right; +} +.pull-left { + float: left; +} From 168551cd4f2139bbd050864c4231baa7e7b796dc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 23:09:59 -0700 Subject: [PATCH 5/5] adding link support to regular text in the topbar --- bootstrap-1.2.0.css | 5 ++++- bootstrap-1.2.0.min.css | 2 +- examples/fluid.html | 2 +- lib/patterns.less | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bootstrap-1.2.0.css b/bootstrap-1.2.0.css index a4f671ebf3..1280c51487 100644 --- a/bootstrap-1.2.0.css +++ b/bootstrap-1.2.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Fri Sep 2 22:56:14 PDT 2011 + * Date: Fri Sep 2 23:08:36 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -1169,6 +1169,9 @@ table .headerSortUp.purple, table .headerSortDown.purple { margin: 0; line-height: 40px; } +.topbar p a:hover { + background-color: transparent; +} .topbar form { float: left; margin: 5px 0 0 0; diff --git a/bootstrap-1.2.0.min.css b/bootstrap-1.2.0.min.css index a238cc6d3e..8968aba963 100644 --- a/bootstrap-1.2.0.min.css +++ b/bootstrap-1.2.0.min.css @@ -183,7 +183,7 @@ table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0 .topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} .topbar a:hover,.topbar ul .active a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;} .topbar h3{position:relative;}.topbar h3 a{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;} -.topbar p{margin:0;line-height:40px;} +.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;} .topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;} .topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#fff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;} .topbar input::-webkit-input-placeholder{color:#e6e6e6;} diff --git a/examples/fluid.html b/examples/fluid.html index 63ffc75ef9..7e9fed0c38 100644 --- a/examples/fluid.html +++ b/examples/fluid.html @@ -37,7 +37,7 @@
  • About
  • Contact
  • -

    Logged in as username

    +

    Logged in as username

    diff --git a/lib/patterns.less b/lib/patterns.less index eccda9359a..72ca3b559a 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -50,6 +50,9 @@ p { margin: 0; line-height: 40px; + a:hover { + background-color: transparent; + } } // Search Form