From d5e42cf81a5b0a680d59e3dc5ebdc45652b7b4e9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 21:54:11 -0700 Subject: tweak readonly, disabled, and uneditable form elements --- lib/forms.less | 59 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 17 deletions(-) (limited to 'lib') diff --git a/lib/forms.less b/lib/forms.less index a16844ab1..5f8a09693 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) -- cgit v1.2.3 From 5c3f0e32e6940e9e9482f8eaf6864c75dab3dacf Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 22:08:38 -0700 Subject: updated container mixin to be fixed-container instead so we can keep the .container in scaffolding while removing the repeated code --- lib/preboot.less | 5 +++-- lib/scaffolding.less | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/preboot.less b/lib/preboot.less index d840ad1a6..adbbc676e 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 b7c44e652..10af26c16 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) -- cgit v1.2.3 From 162534139170e3416cb33a5b5c5093d4a2a5e8f0 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 22:09:12 -0700 Subject: fix repeated margin-left --- lib/preboot.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/preboot.less b/lib/preboot.less index adbbc676e..3cf924192 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) { -- cgit v1.2.3 From 4dbd2334bd8156b7621e11c19a411db1308821d8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 23:01:38 -0700 Subject: updated hero example, added fluid example, resolved issue with tabs and fluid nav --- lib/patterns.less | 8 +++++++- lib/scaffolding.less | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/patterns.less b/lib/patterns.less index 57e682da8..eccda9359 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 5f4734b99..845c4d355 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; +} -- cgit v1.2.3 From 168551cd4f2139bbd050864c4231baa7e7b796dc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Sep 2011 23:09:59 -0700 Subject: adding link support to regular text in the topbar --- lib/patterns.less | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/patterns.less b/lib/patterns.less index eccda9359..72ca3b559 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 -- cgit v1.2.3