From ec8619a9808b9b6e721334af8e6b5248ccbea8b5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 17 Sep 2011 17:21:43 -0700 Subject: update docs to remove old stuff, update to all new classes; no more backwards compatibility --- lib/patterns.less | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index ce387614e..1ba218c36 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -23,8 +23,6 @@ } // Hover and active states - // h3 for backwards compatibility - h3 a:hover, .brand a:hover, ul .active > a { background-color: #333; @@ -33,12 +31,7 @@ text-decoration: none; } - // Website name - // h3 left for backwards compatibility - h3 { - position: relative; - } - h3 a, + // Website or project name .brand { float: left; display: block; @@ -112,9 +105,7 @@ } // gradient is applied to it's own element because overflow visible is not honored by ie when filter is present -// For backwards compatibility, include .topbar .fill -.topbar-inner, -.topbar .fill { +.topbar-inner { background-color: #222; #gradient > .vertical(#333, #222); @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); @@ -127,8 +118,6 @@ // Topbar Nav // ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity -// For backwards compatibility, leave in .topbar div > ul -.topbar div > ul, .nav { display: block; float: left; @@ -160,28 +149,19 @@ float: right; margin-left: 10px; margin-right: 0; - // backwards compatibility - .menu-dropdown, .dropdown-menu { right: 0; border: 0; } } // Dropdowns within the .nav - // a.menu:hover and li.open .menu for backwards compatibility - a.menu:hover, - li.open .menu, .dropdown-toggle:hover, .dropdown.open .dropdown-toggle { background: #444; background: rgba(255,255,255,.05); } - // .menu-dropdown for backwards compatibility - .menu-dropdown, .dropdown-menu { background-color: #333; - // a.menu for backwards compatibility - a.menu, .dropdown-toggle { color: @white; &.open { @@ -207,22 +187,16 @@ } } -// For backwards compatibility with new dropdowns, redeclare dropdown link padding -.topbar ul .menu-dropdown li a, .topbar ul .dropdown-menu li a { padding: 4px 15px; } // Dropdown Menus // Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns -// li.menu for backwards compatibility -li.menu, .dropdown { position: relative; } // The link that is clicked to toggle the dropdown -// a.menu for backwards compatibility -a.menu:after, .dropdown-toggle:after { width: 0; height: 0; @@ -238,8 +212,6 @@ a.menu:after, .opacity(50); } // The dropdown menu (ul) -// .menu-dropdown for backwards compatibility -.menu-dropdown, .dropdown-menu { background-color: @white; float: left; @@ -300,18 +272,12 @@ a.menu:after, } // Open state for the dropdown -// .open for backwards compatibility -.open, .dropdown.open { - // .menu for backwards compatibility - .menu, .dropdown-toggle { color: @white; background: #ccc; background: rgba(0,0,0,.3); } - // .menu-dropdown for backwards compatibility - .menu-dropdown, .dropdown-menu { display: block; } @@ -360,27 +326,19 @@ a.menu:after, border-bottom-color: transparent; } } - // first one for backwards compatibility - .menu-dropdown, .dropdown-menu { top: 35px; border-width: 1px; .border-radius(0 6px 6px 6px); } - // first one for backwards compatibility - a.menu:after, .dropdown-toggle:after { border-top-color: #999; margin-top: 15px; margin-left: 5px; } - // first one for backwards compatibility - li.open.menu .menu, .open.dropdown .dropdown-toggle { border-color: #999; } - // first one for backwards compatibility - li.open a.menu:after, .dropdown.open .dropdown-toggle:after { border-top-color: #555; } -- cgit v1.2.3 From 6d541a6066d46bff19833707deeca8f41279b180 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Sep 2011 19:06:10 -0700 Subject: pulling out more stuff and fixing file name at top of file --- lib/patterns.less | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 1ba218c36..eae09a596 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -350,7 +350,7 @@ // Basic pill nav .pills { a { - margin: 5px 3px 5px 0; + margin: 5px 3px 5px 0; padding: 0 15px; text-shadow: 0 1px 1px @white; line-height: 30px; @@ -376,7 +376,7 @@ .tab-content > .active, .pill-content > .active { - display:block; + display: block; } @@ -398,8 +398,6 @@ padding: 0 5px; color: @grayLight; } - a { - } .active a { color: @grayDark; } -- cgit v1.2.3 From 4e9849966d0f7b18cd4b8a22f6ef98c6900a2099 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Sep 2011 01:43:14 -0700 Subject: update topbar dropdown arrow to match link and hover colors --- lib/patterns.less | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index eae09a596..ec40641d3 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -205,11 +205,14 @@ text-indent: -99999px; vertical-align: top; margin-top: 8px; - margin-left: 4px; + margin-left: 6px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid @white; - .opacity(50); + .opacity(30); +} +.dropdown:hover .dropdown-toggle:after { + .opacity(100); } // The dropdown menu (ul) .dropdown-menu { -- cgit v1.2.3 From 0a6d8c30db0600ab8d33e14ead0ff120cd03ac9d Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 29 Sep 2011 02:21:02 -0700 Subject: adding button groups and toolbars like a boss --- lib/patterns.less | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index ec40641d3..8add82c16 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -565,6 +565,54 @@ input[type=submit].btn { } } +// Button groups +// ------------- + +// Group multiple button groups together for a toolbar +.btn-toolbar { + .clearfix(); + .btn-group { + float: left; + margin-right: 10px; + } +} + +// Clear the float +.btn-group { + .clearfix(); +} +// Float them, remove border radius, then re-add to first and last elements +.btn-group .btn { + position: relative; + float: left; + margin-left: -1px; + .border-radius(0); + &:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; + } + &:last-child { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + } +} +// On hover/focus/active, bring the proper btn to front +.btn-group .btn:hover, +.btn-group .btn:focus, +.btn-group .btn:active { + z-index: 2; +} + + // CLOSE ICONS // ----------- -- cgit v1.2.3 From 96dd7a2903aa5213ddb364b385660e26396dc670 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 4 Oct 2011 00:20:38 -0700 Subject: update variables to inlude @baseFontSize, @baseFontFamily, @baseLineHeight for easier customization; added placeholder for @primaryButtonColor, but didn't implement --- lib/patterns.less | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 8add82c16..1b27b7184 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -313,7 +313,7 @@ > a { padding: 0 15px; margin-right: 2px; - line-height: @baseline * 2; + line-height: @baseLineHeight * 2; border: 1px solid transparent; .border-radius(4px 4px 0 0); &:hover { @@ -387,7 +387,7 @@ // ----------- .breadcrumb { - margin: 0 0 @baseline; + margin: 0 0 @baseLineHeight; padding: 7px 14px; #gradient > .vertical(#ffffff, #f5f5f5); border: 1px solid #ddd; @@ -424,12 +424,12 @@ p { font-size: 18px; font-weight: 200; - line-height: @baseline * 1.5; + line-height: @baseLineHeight * 1.5; } } footer { - margin-top: @baseline - 1; - padding-top: @baseline - 1; + margin-top: @baseLineHeight - 1; + padding-top: @baseLineHeight - 1; border-top: 1px solid #eee; } @@ -438,11 +438,11 @@ footer { // ------------ .page-header { - margin-bottom: @baseline - 1; + margin-bottom: @baseLineHeight - 1; border-bottom: 1px solid #ddd; .box-shadow(0 1px 0 rgba(255,255,255,.5)); h1 { - margin-bottom: (@baseline / 2) - 1px; + margin-bottom: (@baseLineHeight / 2) - 1px; } } @@ -488,7 +488,7 @@ footer { padding: 5px 14px 6px; text-shadow: 0 1px 1px rgba(255,255,255,.75); color: #333; - font-size: @basefont; + font-size: @baseFontSize; line-height: normal; border: 1px solid #ccc; border-bottom-color: #bbb; @@ -540,14 +540,14 @@ footer { // Button Sizes &.large { - font-size: @basefont + 2px; + font-size: @baseFontSize + 2px; line-height: normal; padding: 9px 14px 9px; .border-radius(6px); } &.small { padding: 7px 9px 7px; - font-size: @basefont - 2px; + font-size: @baseFontSize - 2px; } } // Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons @@ -621,7 +621,7 @@ input[type=submit].btn { color: @black; font-size: 20px; font-weight: bold; - line-height: @baseline * .75; + line-height: @baseLineHeight * .75; text-shadow: 0 1px 0 rgba(255,255,255,1); .opacity(20); &:hover { @@ -639,7 +639,7 @@ input[type=submit].btn { .alert-message { position: relative; padding: 7px 15px; - margin-bottom: @baseline; + margin-bottom: @baseLineHeight; color: @grayDark; .gradientBar(#fceec1, #eedc94); // warning by default text-shadow: 0 1px 0 rgba(255,255,255,.5); @@ -655,7 +655,7 @@ input[type=submit].btn { // Remove extra margin from content h5 { - line-height: @baseline; + line-height: @baseLineHeight; } p { margin-bottom: 0; @@ -715,8 +715,8 @@ input[type=submit].btn { // ---------- .pagination { - height: @baseline * 2; - margin: @baseline 0; + height: @baseLineHeight * 2; + margin: @baseLineHeight 0; ul { float: left; margin: 0; @@ -731,7 +731,7 @@ input[type=submit].btn { a { float: left; padding: 0 14px; - line-height: (@baseline * 2) - 2; + line-height: (@baseLineHeight * 2) - 2; border-right: 1px solid; border-right-color: #ddd; border-right-color: rgba(0,0,0,.15); @@ -972,7 +972,7 @@ input[type=submit].btn { .label { padding: 1px 3px 2px; background-color: @grayLight; - font-size: @basefont * .75; + font-size: @baseFontSize * .75; font-weight: bold; color: @white; text-transform: uppercase; -- cgit v1.2.3 From f61fe3c4746ec09ff64756797fe6314be5f53b30 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Oct 2011 21:13:26 -0700 Subject: refactor fluid layout to be more specific to not interfere with modal content while adding right sidebar option --- lib/patterns.less | 85 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 43 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 1b27b7184..8ceffaa99 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -54,54 +54,53 @@ } // Search Form - form { - float: left; - margin: 5px 0 0 0; + .form-search { position: relative; - .opacity(100); + margin-top: 5px; + margin-bottom: 0; + input { + background-color: #444; + background-color: rgba(255,255,255,.3); + #font > .sans-serif(13px, normal, 1); + padding: 4px 9px; + color: @white; + color: rgba(255,255,255,.75); + border: 1px solid #111; + .border-radius(4px); + @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); + .box-shadow(@shadow); + .transition(none); + + // Placeholder text gets special styles; can't be bundled together though for some reason + &:-moz-placeholder { + color: @grayLighter; + } + &::-webkit-input-placeholder { + color: @grayLighter; + } + // Hover states + &:hover { + background-color: @grayLight; + background-color: rgba(255,255,255,.5); + color: @white; + } + // Focus states (we use .focused since IE8 and down doesn't support :focus) + &:focus, + &.focused { + outline: 0; + background-color: @white; + color: @grayDark; + text-shadow: 0 1px 0 @white; + border: 0; + padding: 5px 10px; + .box-shadow(0 0 3px rgba(0,0,0,.15)); + } + } } // Todo: remove from v2.0 when ready, added for legacy - form.pull-right { + .pull-right { float: right; } - input { - background-color: #444; - background-color: rgba(255,255,255,.3); - #font > .sans-serif(13px, normal, 1); - padding: 4px 9px; - color: @white; - color: rgba(255,255,255,.75); - border: 1px solid #111; - .border-radius(4px); - @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); - .box-shadow(@shadow); - .transition(none); - - // Placeholder text gets special styles; can't be bundled together though for some reason - &:-moz-placeholder { - color: @grayLighter; - } - &::-webkit-input-placeholder { - color: @grayLighter; - } - // Hover states - &:hover { - background-color: @grayLight; - background-color: rgba(255,255,255,.5); - color: @white; - } - // Focus states (we use .focused since IE8 and down doesn't support :focus) - &:focus, - &.focused { - outline: 0; - background-color: @white; - color: @grayDark; - text-shadow: 0 1px 0 @white; - border: 0; - padding: 5px 10px; - .box-shadow(0 0 3px rgba(0,0,0,.15)); - } - } } // gradient is applied to it's own element because overflow visible is not honored by ie when filter is present -- cgit v1.2.3 From 8ba005d38dd7a79ea3e90efb6efc7ac9ebcadc26 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 11 Oct 2011 09:44:51 -0700 Subject: new navbar introduced to replace topbar --- lib/patterns.less | 154 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 68 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 8ceffaa99..a82e2856d 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -3,34 +3,41 @@ * ---------------------------------------------------------------------------- */ -// TOPBAR -// ------ +// NAVBAR (FIXED AND STATIC) +// ------------------------- -// Topbar for Branding and Nav -.topbar { - height: 40px; - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 10000; - overflow: visible; +// Navbar variables +@navBarHeight: 40px; +@navBarBgStart: #333; +@navBarBgEnd: #222; - // Links get text shadow +// Common styles +.navbar { + height: @navBarHeight; + overflow: visible; +} +// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present +.navbar-inner { + background-color: @navBarBgEnd; + #gradient > .vertical(@navBarBgStart, @navBarBgEnd); + @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); + .box-shadow(@shadow); +} +// Text and links +.navbar { + // Links get text-shadow a { color: @grayLight; text-shadow: 0 -1px 0 rgba(0,0,0,.25); } - // Hover and active states .brand a:hover, ul .active > a { - background-color: #333; + background-color: @navBarBgStart; background-color: rgba(255,255,255,.05); color: @white; text-decoration: none; } - // Website or project name .brand { float: left; @@ -42,7 +49,6 @@ font-weight: 200; line-height: 1; } - // Plain text in topbar p { margin: 0; @@ -52,70 +58,82 @@ color: @white; } } +} - // Search Form - .form-search { - position: relative; - margin-top: 5px; - margin-bottom: 0; - input { - background-color: #444; - background-color: rgba(255,255,255,.3); - #font > .sans-serif(13px, normal, 1); - padding: 4px 9px; - color: @white; - color: rgba(255,255,255,.75); - border: 1px solid #111; - .border-radius(4px); - @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); - .box-shadow(@shadow); - .transition(none); +// Navbar search +.navbar-search { + position: relative; + margin-top: 5px; + margin-bottom: 0; + float: left; + input { + background-color: #444; + background-color: rgba(255,255,255,.3); + #font > .sans-serif(13px, normal, 1); + padding: 4px 9px; + color: @white; + color: rgba(255,255,255,.75); + border: 1px solid #111; + .border-radius(4px); + @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); + .box-shadow(@shadow); + .transition(none); - // Placeholder text gets special styles; can't be bundled together though for some reason - &:-moz-placeholder { - color: @grayLighter; - } - &::-webkit-input-placeholder { - color: @grayLighter; - } - // Hover states - &:hover { - background-color: @grayLight; - background-color: rgba(255,255,255,.5); - color: @white; - } - // Focus states (we use .focused since IE8 and down doesn't support :focus) - &:focus, - &.focused { - outline: 0; - background-color: @white; - color: @grayDark; - text-shadow: 0 1px 0 @white; - border: 0; - padding: 5px 10px; - .box-shadow(0 0 3px rgba(0,0,0,.15)); - } + // Placeholder text gets special styles; can't be bundled together though for some reason + &:-moz-placeholder { + color: @grayLighter; + } + &::-webkit-input-placeholder { + color: @grayLighter; + } + // Hover states + &:hover { + background-color: @grayLight; + background-color: rgba(255,255,255,.5); + color: @white; + } + // Focus states (we use .focused since IE8 and down doesn't support :focus) + &:focus, + &.focused { + outline: 0; + background-color: @white; + color: @grayDark; + text-shadow: 0 1px 0 @white; + border: 0; + padding: 5px 10px; + .box-shadow(0 0 3px rgba(0,0,0,.15)); } - } - // Todo: remove from v2.0 when ready, added for legacy - .pull-right { - float: right; } } -// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present -.topbar-inner { - background-color: #222; - #gradient > .vertical(#333, #222); - @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); - .box-shadow(@shadow); + +// Static navbar +.navbar-static { + margin-bottom: @baseLineHeight; +} +.navbar-static .navbar-inner { + margin-left: -20px; + margin-right: -20px; + padding-left: 20px; + padding-right: 20px; + .border-radius(4px); +} + +// Fixed navbar +.navbar-fixed { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10000; } + // NAVIGATION // ---------- -// Topbar Nav +// Nav for navbar and topbar // ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity .nav { display: block; -- cgit v1.2.3 From b6443905411dcdcec54d7eaad2f998a582271728 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 11 Oct 2011 09:52:50 -0700 Subject: update navbar search form --- lib/patterns.less | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index a82e2856d..f2a0b7f0e 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -63,10 +63,10 @@ // Navbar search .navbar-search { position: relative; - margin-top: 5px; + margin-top: 6px; margin-bottom: 0; float: left; - input { + .search-query { background-color: #444; background-color: rgba(255,255,255,.3); #font > .sans-serif(13px, normal, 1); @@ -74,8 +74,7 @@ color: @white; color: rgba(255,255,255,.75); border: 1px solid #111; - .border-radius(4px); - @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); + @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15); .box-shadow(@shadow); .transition(none); -- cgit v1.2.3 From f4fc56b1b3827254dd771536dcb2b711919f3867 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 12 Oct 2011 08:31:16 -0700 Subject: first pass at moving over the new tabs stuff to 2.0 --- lib/patterns.less | 106 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 87 insertions(+), 19 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index f2a0b7f0e..af898a561 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -318,14 +318,14 @@ } } -// Basic Tabs +// Tabs .tabs { - float: left; - width: 100%; - border-bottom: 1px solid #ddd; + border-color: #ddd; + border-style: solid; + border-width: 0 0 1px; > li { position: relative; // For the dropdowns mostly - top: 1px; + margin-bottom: -1px; > a { padding: 0 15px; margin-right: 2px; @@ -338,61 +338,129 @@ border-color: #eee #eee #ddd; } } - &.active > a { - color: @gray; - background-color: @white; - border: 1px solid #ddd; + } + // Active state, and it's :hover to override normal :hover + .active > a, + .active > a:hover { + color: @gray; + background-color: @white; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; + } +} + +.tabbable { + margin-bottom: @baseLineHeight; + + // Tabs on top + .tabs { + margin-bottom: 0; + border-bottom: 0; + } + .tab-content { + padding: 19px; + border: 1px solid #ddd; + } + + // Tabs on bottom + &.tabs-bottom .tabs > li { + margin-top: -1px; + margin-bottom: 0; + } + &.tabs-bottom .tabs > li > a { + .border-radius(0 0 4px 4px); + &:hover { border-bottom-color: transparent; + border-top-color: #ddd; } } + &.tabs-bottom .tabs > .active > a, + &.tabs-bottom .tabs > .active > a:hover { + border-color: transparent #ddd #ddd #ddd; + } + + // Tabs on left + &.tabs-left .tabs { + float: left; + } + &.tabs-left .tabs > li { + float: none; + } + + // Tabs on right + &.tabs-right .tabs { + float: right; + } + &.tabs-right .tabs > li { + float: none; + } +} + + +// Dropdowns in tabs +.tabs { + // first one for backwards compatibility + .menu-dropdown, .dropdown-menu { top: 35px; border-width: 1px; .border-radius(0 6px 6px 6px); } + // first one for backwards compatibility + a.menu:after, .dropdown-toggle:after { border-top-color: #999; margin-top: 15px; margin-left: 5px; } + // first one for backwards compatibility + li.open.menu .menu, .open.dropdown .dropdown-toggle { border-color: #999; } + // first one for backwards compatibility + li.open a.menu:after, .dropdown.open .dropdown-toggle:after { border-top-color: #555; } } -.tab-content { - clear: both; -} -// Basic pill nav +// Pills .pills { a { margin: 5px 3px 5px 0; padding: 0 15px; - text-shadow: 0 1px 1px @white; line-height: 30px; + text-shadow: 0 1px 1px @white; .border-radius(15px); &:hover { - background: @linkColorHover; color: @white; text-decoration: none; text-shadow: 0 1px 1px rgba(0,0,0,.25); + background-color: @linkColorHover; } } .active a { - background: @linkColor; color: @white; text-shadow: 0 1px 1px rgba(0,0,0,.25); + background-color: @linkColor; } } -.tab-content > *, -.pill-content > * { - display: none; +// Stacked pills +.pills-vertical > li { + float: none; } +// Tabbable areas +.tab-content, +.pill-content { +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} .tab-content > .active, .pill-content > .active { display: block; -- cgit v1.2.3 From 3a4760637f3acca9cbd8af2819d163848852a23a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 16 Oct 2011 03:15:17 -0700 Subject: tweak navbar styles for static version to not cause problems on responsive layouts --- lib/patterns.less | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index af898a561..950ac2feb 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -111,8 +111,6 @@ margin-bottom: @baseLineHeight; } .navbar-static .navbar-inner { - margin-left: -20px; - margin-right: -20px; padding-left: 20px; padding-right: 20px; .border-radius(4px); -- cgit v1.2.3 From e7d2218b2043742f21c368d074d97a4bde275730 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 16 Oct 2011 23:04:31 -0700 Subject: few tweaks to responsive stuff, updated docs for grid system (still needs copy editing) --- lib/patterns.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 950ac2feb..f1badc46d 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -520,11 +520,11 @@ footer { // ------------ .page-header { - margin-bottom: @baseLineHeight - 1; - border-bottom: 1px solid #ddd; + margin-bottom: @baseLineHeight * 1.5; + border-bottom: 1px solid #eee; .box-shadow(0 1px 0 rgba(255,255,255,.5)); h1 { - margin-bottom: (@baseLineHeight / 2) - 1px; + margin-bottom: @baseLineHeight * .75; } } -- cgit v1.2.3 From cb13f010e2dd1eb8f37048b5664ff455b60eba05 Mon Sep 17 00:00:00 2001 From: Bulat Shakirzyanov Date: Thu, 27 Oct 2011 18:51:49 -0700 Subject: implement left and right tabs styles --- lib/patterns.less | 72 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 10 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index f1badc46d..1db315831 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -379,19 +379,71 @@ } // Tabs on left - &.tabs-left .tabs { - float: left; - } - &.tabs-left .tabs > li { - float: none; + &.tabs-left { + .clearfix(); + + .tab-content { + float: left; + } + .tabs { + float: left; + + > li { + float: none; + margin-bottom: -1px; + margin-right: -1px; + > a { + margin-right: 0; + margin-bottom: 2px; + .border-radius(4px 0 0 4px); + + &:hover { + border-color: transparent; + border-right-color: #ddd; + } + } + } + + > .active > a, + > .active > a:hover { + border-color: #ddd; + border-right-color: transparent; + } + } } // Tabs on right - &.tabs-right .tabs { - float: right; - } - &.tabs-right .tabs > li { - float: none; + &.tabs-right { + .clearfix(); + + .tab-content { + float: right; + } + .tabs { + float: right; + + > li { + float: none; + margin-bottom: -1px; + margin-left: -1px; + > a { + margin-left: 0; + margin-bottom: 2px; + .border-radius(4px 0 0 4px); + + &:hover { + border-color: transparent; + border-left-color: #ddd; + } + } + } + + > .active > a, + > .active > a:hover { + border-color: #ddd; + border-left-color: transparent; + } + } } } -- cgit v1.2.3 From 31ea00304626ea68b758def41769606d4c049671 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 31 Oct 2011 21:45:46 -0700 Subject: remove alt tab styles for now, too complicated to accomplish both static and tabble; fix up CSS a bit --- lib/patterns.less | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 1db315831..367347e27 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -378,34 +378,48 @@ border-color: transparent #ddd #ddd #ddd; } - // Tabs on left - &.tabs-left { + // Tabs on left and right + &.tabs-left, + &.tabs-right { .clearfix(); + .tabs { + // Give a fixed width to avoid floating .tab-con + width: 100px; + // Unfloat them so they stack + > li { + float: none; + margin-bottom: -1px; + > a { + margin-bottom: 2px; + &:hover { + border-color: transparent; + } + } + } + } + } + // Tabs on left + &.tabs-left { .tab-content { - float: left; + margin-left: 100px; } .tabs { float: left; - > li { - float: none; - margin-bottom: -1px; margin-right: -1px; > a { margin-right: 0; - margin-bottom: 2px; .border-radius(4px 0 0 4px); &:hover { - border-color: transparent; border-right-color: #ddd; } } } - - > .active > a, - > .active > a:hover { + // Active state + .active > a, + .active > a:hover { border-color: #ddd; border-right-color: transparent; } @@ -414,32 +428,25 @@ // Tabs on right &.tabs-right { - .clearfix(); - .tab-content { - float: right; + margin-right: 100px; } .tabs { float: right; - > li { - float: none; - margin-bottom: -1px; margin-left: -1px; > a { margin-left: 0; - margin-bottom: 2px; - .border-radius(4px 0 0 4px); + .border-radius(0 4px 4px 0); &:hover { - border-color: transparent; border-left-color: #ddd; } } } - - > .active > a, - > .active > a:hover { + // Active state + .active > a, + .active > a:hover { border-color: #ddd; border-left-color: transparent; } -- cgit v1.2.3 From 1fb98bed91977b710ae321443d0819939a1a8cc7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 12 Nov 2011 00:46:02 -0800 Subject: updated docs pages (still wip), adding misc css classes, added form styles from 1.4, added github buttons to homepage --- lib/patterns.less | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 367347e27..618b90840 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -1151,3 +1151,13 @@ input[type=submit].btn { } } } + + +// MISC +// ---- +.pull-right { + float: right; +} +.pull-left { + float: left; +} \ No newline at end of file -- cgit v1.2.3 From a0179322854a9d1e2b9363447c9884e40733d04f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 16 Nov 2011 23:58:36 -0800 Subject: start breaking down patterns.less into more distinct files, update docs for forms to use correct classes --- lib/patterns.less | 483 ------------------------------------------------------ 1 file changed, 483 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 618b90840..bc1229bd9 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -301,251 +301,8 @@ } -// Tabs and Pills -.tabs, -.pills { - margin: 0 0 20px; - padding: 0; - list-style: none; - .clearfix(); - > li { - float: left; - > a { - display: block; - } - } -} - -// Tabs -.tabs { - border-color: #ddd; - border-style: solid; - border-width: 0 0 1px; - > li { - position: relative; // For the dropdowns mostly - margin-bottom: -1px; - > a { - padding: 0 15px; - margin-right: 2px; - line-height: @baseLineHeight * 2; - border: 1px solid transparent; - .border-radius(4px 4px 0 0); - &:hover { - text-decoration: none; - background-color: #eee; - border-color: #eee #eee #ddd; - } - } - } - // Active state, and it's :hover to override normal :hover - .active > a, - .active > a:hover { - color: @gray; - background-color: @white; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; - } -} - -.tabbable { - margin-bottom: @baseLineHeight; - - // Tabs on top - .tabs { - margin-bottom: 0; - border-bottom: 0; - } - .tab-content { - padding: 19px; - border: 1px solid #ddd; - } - - // Tabs on bottom - &.tabs-bottom .tabs > li { - margin-top: -1px; - margin-bottom: 0; - } - &.tabs-bottom .tabs > li > a { - .border-radius(0 0 4px 4px); - &:hover { - border-bottom-color: transparent; - border-top-color: #ddd; - } - } - &.tabs-bottom .tabs > .active > a, - &.tabs-bottom .tabs > .active > a:hover { - border-color: transparent #ddd #ddd #ddd; - } - - // Tabs on left and right - &.tabs-left, - &.tabs-right { - .clearfix(); - .tabs { - // Give a fixed width to avoid floating .tab-con - width: 100px; - // Unfloat them so they stack - > li { - float: none; - margin-bottom: -1px; - > a { - margin-bottom: 2px; - &:hover { - border-color: transparent; - } - } - } - } - } - - // Tabs on left - &.tabs-left { - .tab-content { - margin-left: 100px; - } - .tabs { - float: left; - > li { - margin-right: -1px; - > a { - margin-right: 0; - .border-radius(4px 0 0 4px); - - &:hover { - border-right-color: #ddd; - } - } - } - // Active state - .active > a, - .active > a:hover { - border-color: #ddd; - border-right-color: transparent; - } - } - } - - // Tabs on right - &.tabs-right { - .tab-content { - margin-right: 100px; - } - .tabs { - float: right; - > li { - margin-left: -1px; - > a { - margin-left: 0; - .border-radius(0 4px 4px 0); - - &:hover { - border-left-color: #ddd; - } - } - } - // Active state - .active > a, - .active > a:hover { - border-color: #ddd; - border-left-color: transparent; - } - } - } -} - -// Dropdowns in tabs -.tabs { - // first one for backwards compatibility - .menu-dropdown, - .dropdown-menu { - top: 35px; - border-width: 1px; - .border-radius(0 6px 6px 6px); - } - // first one for backwards compatibility - a.menu:after, - .dropdown-toggle:after { - border-top-color: #999; - margin-top: 15px; - margin-left: 5px; - } - // first one for backwards compatibility - li.open.menu .menu, - .open.dropdown .dropdown-toggle { - border-color: #999; - } - // first one for backwards compatibility - li.open a.menu:after, - .dropdown.open .dropdown-toggle:after { - border-top-color: #555; - } -} -// Pills -.pills { - a { - margin: 5px 3px 5px 0; - padding: 0 15px; - line-height: 30px; - text-shadow: 0 1px 1px @white; - .border-radius(15px); - &:hover { - color: @white; - text-decoration: none; - text-shadow: 0 1px 1px rgba(0,0,0,.25); - background-color: @linkColorHover; - } - } - .active a { - color: @white; - text-shadow: 0 1px 1px rgba(0,0,0,.25); - background-color: @linkColor; - } -} - -// Stacked pills -.pills-vertical > li { - float: none; -} - -// Tabbable areas -.tab-content, -.pill-content { -} -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} -.tab-content > .active, -.pill-content > .active { - display: block; -} - - -// BREADCRUMBS -// ----------- - -.breadcrumb { - margin: 0 0 @baseLineHeight; - padding: 7px 14px; - #gradient > .vertical(#ffffff, #f5f5f5); - border: 1px solid #ddd; - .border-radius(3px); - .box-shadow(inset 0 1px 0 @white); - li { - display: inline; - text-shadow: 0 1px 0 @white; - } - .divider { - padding: 0 5px; - color: @grayLight; - } - .active a { - color: @grayDark; - } -} // PAGE HEADERS @@ -852,46 +609,6 @@ input[type=submit].btn { } -// PAGINATION -// ---------- - -.pagination { - height: @baseLineHeight * 2; - margin: @baseLineHeight 0; - ul { - float: left; - margin: 0; - border: 1px solid #ddd; - border: 1px solid rgba(0,0,0,.15); - .border-radius(3px); - .box-shadow(0 1px 2px rgba(0,0,0,.05)); - } - li { - display: inline; - } - a { - float: left; - padding: 0 14px; - line-height: (@baseLineHeight * 2) - 2; - border-right: 1px solid; - border-right-color: #ddd; - border-right-color: rgba(0,0,0,.15); - *border-right-color: #ddd; /* IE6-7 */ - text-decoration: none; - } - a:hover, - .active a { - background-color: lighten(@blue, 45%); - } - .disabled a, - .disabled a:hover { - background-color: transparent; - color: @grayLight; - } - .next a { - border: 0; - } -} // WELLS @@ -913,186 +630,12 @@ input[type=submit].btn { } -// MODALS -// ------ - -.modal-backdrop { - background-color: @black; - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 10000; - // Fade for backdrop - &.fade { opacity: 0; } -} - -.modal-backdrop, .modal-backdrop.fade.in { - .opacity(80); -} - -.modal { - position: fixed; - top: 50%; - left: 50%; - z-index: 11000; - width: 560px; - margin: -250px 0 0 -250px; - background-color: @white; - border: 1px solid #999; - border: 1px solid rgba(0,0,0,.3); - *border: 1px solid #999; /* IE6-7 */ - .border-radius(6px); - .box-shadow(0 3px 7px rgba(0,0,0,0.3)); - .background-clip(padding-box); - .close { margin-top: 7px; } - &.fade { - .transition(e('opacity .3s linear, top .3s ease-out')); - top: -25%; - } - &.fade.in { top: 50%; } -} -.modal-header { - border-bottom: 1px solid #eee; - padding: 5px 15px; -} -.modal-body { - padding: 15px; -} -.modal-footer { - background-color: #f5f5f5; - padding: 14px 15px 15px; - border-top: 1px solid #ddd; - .border-radius(0 0 6px 6px); - .box-shadow(inset 0 1px 0 @white); - .clearfix(); - margin-bottom: 0; - .btn { - float: right; - margin-left: 5px; - } -} - - -// POPOVER ARROWS -// -------------- -#popoverArrow { - .above(@arrowWidth: 5px) { - bottom: 0; - left: 50%; - margin-left: -@arrowWidth; - border-left: @arrowWidth solid transparent; - border-right: @arrowWidth solid transparent; - border-top: @arrowWidth solid @black; - } - .left(@arrowWidth: 5px) { - top: 50%; - right: 0; - margin-top: -@arrowWidth; - border-top: @arrowWidth solid transparent; - border-bottom: @arrowWidth solid transparent; - border-left: @arrowWidth solid @black; - } - .below(@arrowWidth: 5px) { - top: 0; - left: 50%; - margin-left: -@arrowWidth; - border-left: @arrowWidth solid transparent; - border-right: @arrowWidth solid transparent; - border-bottom: @arrowWidth solid @black; - } - .right(@arrowWidth: 5px) { - top: 50%; - left: 0; - margin-top: -@arrowWidth; - border-top: @arrowWidth solid transparent; - border-bottom: @arrowWidth solid transparent; - border-right: @arrowWidth solid @black; - } -} -// TWIPSY -// ------ -.twipsy { - display: block; - position: absolute; - visibility: visible; - padding: 5px; - font-size: 11px; - z-index: 1000; - .opacity(80); - &.fade.in { - .opacity(80); - } - &.above .twipsy-arrow { #popoverArrow > .above(); } - &.left .twipsy-arrow { #popoverArrow > .left(); } - &.below .twipsy-arrow { #popoverArrow > .below(); } - &.right .twipsy-arrow { #popoverArrow > .right(); } -} -.twipsy-inner { - padding: 3px 8px; - background-color: @black; - color: white; - text-align: center; - max-width: 200px; - text-decoration: none; - .border-radius(4px); -} -.twipsy-arrow { - position: absolute; - width: 0; - height: 0; -} -// POPOVERS -// -------- -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1000; - padding: 5px; - display: none; - &.above .arrow { #popoverArrow > .above(); } - &.right .arrow { #popoverArrow > .right(); } - &.below .arrow { #popoverArrow > .below(); } - &.left .arrow { #popoverArrow > .left(); } - .arrow { - position: absolute; - width: 0; - height: 0; - } - .inner { - background-color: @black; - background-color: rgba(0,0,0,.8); - padding: 3px; - overflow: hidden; - width: 280px; - .border-radius(6px); - .box-shadow(0 3px 7px rgba(0,0,0,0.3)); - } - .title { - background-color: #f5f5f5; - padding: 9px 15px; - line-height: 1; - .border-radius(3px 3px 0 0); - border-bottom:1px solid #eee; - } - .content { - background-color: @white; - padding: 14px; - .border-radius(0 0 3px 3px); - .background-clip(padding-box); - p, ul, ol { - margin-bottom: 0; - } - } -} // PATTERN ANIMATIONS @@ -1125,32 +668,6 @@ input[type=submit].btn { } -// MEDIA GRIDS -// ----------- - -.media-grid { - margin-left: -20px; - margin-bottom: 0; - .clearfix(); - li { - display: inline; - } - a { - float: left; - padding: 4px; - margin: 0 0 20px 20px; - border: 1px solid #ddd; - .border-radius(4px); - .box-shadow(0 1px 1px rgba(0,0,0,.075)); - img { - display: block; - } - &:hover { - border-color: @linkColor; - .box-shadow(0 1px 4px rgba(0,105,214,.25)); - } - } -} // MISC -- cgit v1.2.3 From 4e6275d0fe0880d32633a2c139dad8d3e2745bb6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 17 Nov 2011 01:28:42 -0800 Subject: update property order and do some misc cleanup --- lib/patterns.less | 95 ++++++++++++++++++++++++------------------------------- 1 file changed, 42 insertions(+), 53 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index bc1229bd9..2fcc4f2b3 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -33,10 +33,10 @@ // Hover and active states .brand a:hover, ul .active > a { - background-color: @navBarBgStart; - background-color: rgba(255,255,255,.05); color: @white; text-decoration: none; + background-color: @navBarBgStart; + background-color: rgba(255,255,255,.05); } // Website or project name .brand { @@ -44,18 +44,18 @@ display: block; padding: 8px 20px 12px; margin-left: -20px; // negative indent to left-align the text down the page - color: @white; font-size: 20px; font-weight: 200; line-height: 1; + color: @white; } // Plain text in topbar p { margin: 0; line-height: 40px; a:hover { - background-color: transparent; color: @white; + background-color: transparent; } } } @@ -63,16 +63,16 @@ // Navbar search .navbar-search { position: relative; + float: left; margin-top: 6px; margin-bottom: 0; - float: left; .search-query { - background-color: #444; - background-color: rgba(255,255,255,.3); - #font > .sans-serif(13px, normal, 1); padding: 4px 9px; + #font > .sans-serif(13px, normal, 1); color: @white; color: rgba(255,255,255,.75); + background-color: #444; + background-color: rgba(255,255,255,.3); border: 1px solid #111; @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15); .box-shadow(@shadow); @@ -87,20 +87,20 @@ } // Hover states &:hover { + color: @white; background-color: @grayLight; background-color: rgba(255,255,255,.5); - color: @white; } // Focus states (we use .focused since IE8 and down doesn't support :focus) &:focus, &.focused { - outline: 0; - background-color: @white; + padding: 5px 10px; color: @grayDark; text-shadow: 0 1px 0 @white; + background-color: @white; border: 0; - padding: 5px 10px; .box-shadow(0 0 3px rgba(0,0,0,.15)); + outline: 0; } } } @@ -120,8 +120,8 @@ .navbar-fixed { position: fixed; top: 0; - left: 0; right: 0; + left: 0; z-index: 10000; } @@ -133,11 +133,11 @@ // Nav for navbar and topbar // ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity .nav { + position: relative; + left: 0; display: block; float: left; margin: 0 10px 0 0; - position: relative; - left: 0; > li { display: block; float: left; @@ -212,37 +212,36 @@ } // The link that is clicked to toggle the dropdown .dropdown-toggle:after { + display: inline-block; width: 0; height: 0; - display: inline-block; - content: "↓"; - text-indent: -99999px; - vertical-align: top; margin-top: 8px; margin-left: 6px; + text-indent: -99999px; + vertical-align: top; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid @white; .opacity(30); + content: "↓"; } .dropdown:hover .dropdown-toggle:after { .opacity(100); } // The dropdown menu (ul) .dropdown-menu { - background-color: @white; - float: left; - display: none; // None by default, but block on "open" of the menu position: absolute; top: 40px; z-index: 900; + float: left; + display: none; // None by default, but block on "open" of the menu min-width: 160px; max-width: 220px; _width: 160px; + padding: 6px 0; margin-left: 0; // override default ul styles margin-right: 0; - padding: 6px 0; - zoom: 1; // do we need this? + background-color: @white; border-color: #999; border-color: rgba(0,0,0,.2); border-style: solid; @@ -250,6 +249,7 @@ .border-radius(0 0 6px 6px); .box-shadow(0 2px 4px rgba(0,0,0,.2)); .background-clip(padding-box); + zoom: 1; // do we need this? // Unfloat any li's to make them stack li { @@ -279,9 +279,9 @@ text-shadow: 0 1px 0 @white; // Hover state &:hover { - #gradient > .vertical(#eeeeee, #dddddd); color: @grayDark; text-decoration: none; + #gradient > .vertical(#eeeeee, #dddddd); @shadow: inset 0 1px 0 rgba(0,0,0,.025), inset 0 -1px rgba(0,0,0,.025); .box-shadow(@shadow); } @@ -309,9 +309,9 @@ // ------------ .hero-unit { - background-color: #f5f5f5; - margin-bottom: 30px; padding: 60px; + margin-bottom: 30px; + background-color: #f5f5f5; .border-radius(6px); h1 { margin-bottom: 0; @@ -326,8 +326,8 @@ } } footer { - margin-top: @baseLineHeight - 1; padding-top: @baseLineHeight - 1; + margin-top: @baseLineHeight - 1; border-top: 1px solid #eee; } @@ -380,24 +380,24 @@ footer { // Base .btn styles .btn { // Button Base - cursor: pointer; display: inline-block; - #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient padding: 5px 14px 6px; - text-shadow: 0 1px 1px rgba(255,255,255,.75); - color: #333; font-size: @baseFontSize; line-height: normal; + color: #333; + text-shadow: 0 1px 1px rgba(255,255,255,.75); + #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient border: 1px solid #ccc; border-bottom-color: #bbb; .border-radius(4px); @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); .box-shadow(@shadow); + cursor: pointer; &:hover { - background-position: 0 -15px; color: #333; text-decoration: none; + background-position: 0 -15px; } // Focus state for keyboard and accessibility @@ -438,9 +438,9 @@ footer { // Button Sizes &.large { + padding: 9px 14px 9px; font-size: @baseFontSize + 2px; line-height: normal; - padding: 9px 14px 9px; .border-radius(6px); } &.small { @@ -516,10 +516,10 @@ input[type=submit].btn { // ----------- .close { float: right; - color: @black; font-size: 20px; font-weight: bold; line-height: @baseLineHeight * .75; + color: @black; text-shadow: 0 1px 0 rgba(255,255,255,1); .opacity(20); &:hover { @@ -539,8 +539,8 @@ input[type=submit].btn { padding: 7px 15px; margin-bottom: @baseLineHeight; color: @grayDark; - .gradientBar(#fceec1, #eedc94); // warning by default text-shadow: 0 1px 0 rgba(255,255,255,.5); + .gradientBar(#fceec1, #eedc94); // warning by default border-width: 1px; border-style: solid; .border-radius(4px); @@ -569,10 +569,10 @@ input[type=submit].btn { } &.block-message { + padding: 14px; background-image: none; background-color: lighten(#fceec1, 5%); - .reset-filter(); - padding: 14px; + .reset-filter(); // undo gradient for IE9 border-color: #fceec1; .box-shadow(none); ul, p { @@ -615,10 +615,10 @@ input[type=submit].btn { // ----- .well { - background-color: #f5f5f5; - margin-bottom: 20px; - padding: 19px; min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; border: 1px solid #eee; border: 1px solid rgba(0,0,0,.05); .border-radius(4px); @@ -655,11 +655,11 @@ input[type=submit].btn { .label { padding: 1px 3px 2px; - background-color: @grayLight; font-size: @baseFontSize * .75; font-weight: bold; color: @white; text-transform: uppercase; + background-color: @grayLight; .border-radius(3px); &.important { background-color: #c43c35; } &.warning { background-color: @orange; } @@ -667,14 +667,3 @@ input[type=submit].btn { &.notice { background-color: lighten(@blue, 25%); } } - - - -// MISC -// ---- -.pull-right { - float: right; -} -.pull-left { - float: left; -} \ No newline at end of file -- cgit v1.2.3 From b2650859d6c6dcb0665311b6e983d230fee1111f Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 24 Nov 2011 14:43:26 -0800 Subject: update buttons js for button groups --- lib/patterns.less | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 2fcc4f2b3..01b32cd90 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -415,6 +415,7 @@ footer { .transition(.1s linear all); // Active and Disabled states + &.active, &:active { @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05); .box-shadow(@shadow); -- cgit v1.2.3 From 98fddaa3557b1c872f1e585d579ec7e5e989e95d Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Fri, 25 Nov 2011 17:23:14 -0800 Subject: new plugin "collapse" for collapsible lists and "accordion" like support --- lib/patterns.less | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 01b32cd90..1b4c5a941 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -631,14 +631,6 @@ input[type=submit].btn { } - - - - - - - - // PATTERN ANIMATIONS // ------------------ @@ -650,6 +642,21 @@ input[type=submit].btn { } } +.collapse { + position:relative; + overflow:hidden; + &.height { + .transition(height .35s ease); + height: 0; + &.in { height: auto; } + } + &.width { + .transition(width .35s ease); + width: 0; + &.in { width: auto; } + } +} + // LABELS // ------ -- cgit v1.2.3 From 3157de8d1d4b69c0f5152b4a784bd185f76c9ac4 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Fri, 25 Nov 2011 21:34:55 -0800 Subject: clean up comments for better built files --- lib/patterns.less | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 1b4c5a941..15c3c9c06 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -1,6 +1,6 @@ -/* Patterns.less - * Repeatable UI elements outside the base styles provided from the scaffolding - * ---------------------------------------------------------------------------- */ +// Patterns.less +// Repeatable UI elements outside the base styles provided from the scaffolding +// ---------------------------------------------------------------------------- // NAVBAR (FIXED AND STATIC) @@ -643,18 +643,11 @@ input[type=submit].btn { } .collapse { + .transition(height .35s ease); position:relative; overflow:hidden; - &.height { - .transition(height .35s ease); - height: 0; - &.in { height: auto; } - } - &.width { - .transition(width .35s ease); - width: 0; - &.in { width: auto; } - } + height: 0; + &.in { height: auto; } } -- cgit v1.2.3 From 61e84d8762d79befb2d75685705fd4e451a609fe Mon Sep 17 00:00:00 2001 From: Evan Meagher Date: Tue, 29 Nov 2011 23:16:09 -0800 Subject: Add vertical nav divider. --- lib/patterns.less | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 15c3c9c06..a2d512339 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -157,6 +157,15 @@ background-color: #222; background-color: rgba(0,0,0,.5); } + // Dividers (basically a vertical hr) + .divider { + height: 40px; + width: 1px; + margin: 0 5px; + overflow: hidden; + background-color: #222; + border-right: 1px solid #444; + } // Secondary (floated right) nav in topbar &.secondary-nav { -- cgit v1.2.3 From b12b71bf7ca76437a532122d8efff59506b61530 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 9 Dec 2011 11:32:07 -0800 Subject: updated to include sub nav and pip nav, new docs updates, topbar nav refinements for media queried settings --- lib/patterns.less | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 15c3c9c06..cd2fdc01e 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -13,7 +13,6 @@ // Common styles .navbar { - height: @navBarHeight; overflow: visible; } // gradient is applied to it's own element because overflow visible is not honored by ie when filter is present @@ -303,8 +302,6 @@ - - // PAGE HEADERS // ------------ -- cgit v1.2.3 From 8a7abc7493a07935d4d91b2cc56a82523fd53970 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 21 Dec 2011 16:00:50 -0600 Subject: docs updates, forms updated to include error states and more examples, remove text-shadow from gradientbar mixin to fix bug --- lib/patterns.less | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 558f3ca45..ec717e030 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -575,6 +575,12 @@ input[type=submit].btn { .box-shadow(0 1px 0 rgba(255,255,255,.25)); } + &.error, + &.success, + &.info { + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + } + &.block-message { padding: 14px; background-image: none; -- cgit v1.2.3 From 20aecb983838422c7b43e20960b10d4d79fefaa3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 21 Dec 2011 16:22:20 -0600 Subject: updated all docs to jQuery 1.7, move all docs JS to application.js, and move dropdowns css to dedicated file --- lib/patterns.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index ec717e030..44c427adf 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -401,7 +401,7 @@ footer { cursor: pointer; &:hover { - color: #333; + color: @grayDark; text-decoration: none; background-position: 0 -15px; } @@ -414,6 +414,7 @@ footer { // Primary Button Type &.primary { color: @white; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); .gradientBar(@blue, @blueDark) } -- cgit v1.2.3 From 058f47b33b3978bbb484e521e7fc14c6ebadc161 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 26 Dec 2011 17:25:25 -0600 Subject: clean up some comments and fix a bug with buttons in navbar by removing too generic of a link color --- lib/patterns.less | 103 ++---------------------------------------------------- 1 file changed, 3 insertions(+), 100 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 44c427adf..25934d80a 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -24,11 +24,6 @@ } // Text and links .navbar { - // Links get text-shadow - a { - color: @grayLight; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } // Hover and active states .brand a:hover, ul .active > a { @@ -146,7 +141,9 @@ float: none; padding: 10px 10px 11px; line-height: 19px; + color: @grayLight; text-decoration: none; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); &:hover { color: @white; text-decoration: none; @@ -213,101 +210,6 @@ padding: 4px 15px; } -// Dropdown Menus -// Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns -.dropdown { - position: relative; -} -// The link that is clicked to toggle the dropdown -.dropdown-toggle:after { - display: inline-block; - width: 0; - height: 0; - margin-top: 8px; - margin-left: 6px; - text-indent: -99999px; - vertical-align: top; - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-top: 4px solid @white; - .opacity(30); - content: "↓"; -} -.dropdown:hover .dropdown-toggle:after { - .opacity(100); -} -// The dropdown menu (ul) -.dropdown-menu { - position: absolute; - top: 40px; - z-index: 900; - float: left; - display: none; // None by default, but block on "open" of the menu - min-width: 160px; - max-width: 220px; - _width: 160px; - padding: 6px 0; - margin-left: 0; // override default ul styles - margin-right: 0; - background-color: @white; - border-color: #999; - border-color: rgba(0,0,0,.2); - border-style: solid; - border-width: 0 1px 1px; - .border-radius(0 0 6px 6px); - .box-shadow(0 2px 4px rgba(0,0,0,.2)); - .background-clip(padding-box); - zoom: 1; // do we need this? - - // Unfloat any li's to make them stack - li { - float: none; - display: block; - background-color: none; - } - // Dividers (basically an hr) within the dropdown - .divider { - height: 1px; - margin: 5px 0; - overflow: hidden; - background-color: #eee; - border-bottom: 1px solid @white; - } -} - -.topbar .dropdown-menu, .dropdown-menu { - // Links within the dropdown menu - a { - display: block; - padding: 4px 15px; - clear: both; - font-weight: normal; - line-height: 18px; - color: @gray; - text-shadow: 0 1px 0 @white; - // Hover state - &:hover { - color: @grayDark; - text-decoration: none; - #gradient > .vertical(#eeeeee, #dddddd); - @shadow: inset 0 1px 0 rgba(0,0,0,.025), inset 0 -1px rgba(0,0,0,.025); - .box-shadow(@shadow); - } - } -} - -// Open state for the dropdown -.dropdown.open { - .dropdown-toggle { - color: @white; - background: #ccc; - background: rgba(0,0,0,.3); - } - .dropdown-menu { - display: block; - } -} - @@ -493,6 +395,7 @@ input[type=submit].btn { float: left; margin-left: -1px; .border-radius(0); + // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match &:first-child { margin-left: 0; -webkit-border-top-left-radius: 4px; -- cgit v1.2.3 From 324246e4f964437a2dfa7efbd2d1b6b039369b2c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 27 Dec 2011 12:39:39 -0600 Subject: remove negative margin from .brand in docs, update navbar to support buttons up thurr --- lib/patterns.less | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 25934d80a..d48d65e48 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -52,6 +52,10 @@ background-color: transparent; } } + // Buttons in navbar + .btn { + margin-top: 5px; // make buttons vertically centered in navbar + } } // Navbar search -- cgit v1.2.3 From 704d713aadbfcd27e39226cb0d1b2243d52dde0a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 27 Dec 2011 17:39:34 -0600 Subject: border radius on large button toolbar --- lib/patterns.less | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index d48d65e48..7c9ee7e48 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -417,6 +417,24 @@ input[type=submit].btn { -moz-border-radius-bottomright: 4px; border-bottom-right-radius: 4px; } + // Reset corners for large buttons + &.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; + } + &.large:last-child { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; + } } // On hover/focus/active, bring the proper btn to front .btn-group .btn:hover, -- cgit v1.2.3 From 20add59de3f2b69aaa9c9b325dab20b13c75eaa1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 5 Jan 2012 10:01:42 -0800 Subject: breaking out patterns.less even more, removing unnecessary div from checkbox and radio lists--now just labels and inputs --- lib/patterns.less | 565 ------------------------------------------------------ 1 file changed, 565 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 7c9ee7e48..72c3e8ec5 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -3,220 +3,6 @@ // ---------------------------------------------------------------------------- -// NAVBAR (FIXED AND STATIC) -// ------------------------- - -// Navbar variables -@navBarHeight: 40px; -@navBarBgStart: #333; -@navBarBgEnd: #222; - -// Common styles -.navbar { - overflow: visible; -} -// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present -.navbar-inner { - background-color: @navBarBgEnd; - #gradient > .vertical(@navBarBgStart, @navBarBgEnd); - @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); - .box-shadow(@shadow); -} -// Text and links -.navbar { - // Hover and active states - .brand a:hover, - ul .active > a { - color: @white; - text-decoration: none; - background-color: @navBarBgStart; - background-color: rgba(255,255,255,.05); - } - // Website or project name - .brand { - float: left; - display: block; - padding: 8px 20px 12px; - margin-left: -20px; // negative indent to left-align the text down the page - font-size: 20px; - font-weight: 200; - line-height: 1; - color: @white; - } - // Plain text in topbar - p { - margin: 0; - line-height: 40px; - a:hover { - color: @white; - background-color: transparent; - } - } - // Buttons in navbar - .btn { - margin-top: 5px; // make buttons vertically centered in navbar - } -} - -// Navbar search -.navbar-search { - position: relative; - float: left; - margin-top: 6px; - margin-bottom: 0; - .search-query { - padding: 4px 9px; - #font > .sans-serif(13px, normal, 1); - color: @white; - color: rgba(255,255,255,.75); - background-color: #444; - background-color: rgba(255,255,255,.3); - border: 1px solid #111; - @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15); - .box-shadow(@shadow); - .transition(none); - - // Placeholder text gets special styles; can't be bundled together though for some reason - &:-moz-placeholder { - color: @grayLighter; - } - &::-webkit-input-placeholder { - color: @grayLighter; - } - // Hover states - &:hover { - color: @white; - background-color: @grayLight; - background-color: rgba(255,255,255,.5); - } - // Focus states (we use .focused since IE8 and down doesn't support :focus) - &:focus, - &.focused { - padding: 5px 10px; - color: @grayDark; - text-shadow: 0 1px 0 @white; - background-color: @white; - border: 0; - .box-shadow(0 0 3px rgba(0,0,0,.15)); - outline: 0; - } - } -} - - -// Static navbar -.navbar-static { - margin-bottom: @baseLineHeight; -} -.navbar-static .navbar-inner { - padding-left: 20px; - padding-right: 20px; - .border-radius(4px); -} - -// Fixed navbar -.navbar-fixed { - position: fixed; - top: 0; - right: 0; - left: 0; - z-index: 10000; -} - - - -// NAVIGATION -// ---------- - -// Nav for navbar and topbar -// ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity -.nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; - > li { - display: block; - float: left; - } - a { - display: block; - float: none; - padding: 10px 10px 11px; - line-height: 19px; - color: @grayLight; - text-decoration: none; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - &:hover { - color: @white; - text-decoration: none; - } - } - .active > a { - background-color: #222; - background-color: rgba(0,0,0,.5); - } - // Dividers (basically a vertical hr) - .divider { - height: 40px; - width: 1px; - margin: 0 5px; - overflow: hidden; - background-color: #222; - border-right: 1px solid #444; - } - - // Secondary (floated right) nav in topbar - &.secondary-nav { - float: right; - margin-left: 10px; - margin-right: 0; - .dropdown-menu { - right: 0; - border: 0; - } - } - // Dropdowns within the .nav - .dropdown-toggle:hover, - .dropdown.open .dropdown-toggle { - background: #444; - background: rgba(255,255,255,.05); - } - .dropdown-menu { - background-color: #333; - .dropdown-toggle { - color: @white; - &.open { - background: #444; - background: rgba(255,255,255,.05); - } - } - li a { - color: #999; - text-shadow: 0 1px 0 rgba(0,0,0,.5); - &:hover { - #gradient > .vertical(#292929,#191919); - color: @white; - } - } - .active a { - color: @white; - } - .divider { - background-color: #222; - border-color: #444; - } - } -} - -.topbar ul .dropdown-menu li a { - padding: 4px 15px; -} - - - - // PAGE HEADERS // ------------ @@ -255,354 +41,3 @@ footer { margin-bottom: @baseLineHeight * .75; } } - - -// BUTTON STYLES -// ------------- - -// Shared colors for buttons and alerts -.btn, -.alert-message { - // Set text color - &.danger, - &.danger:hover, - &.error, - &.error:hover, - &.success, - &.success:hover, - &.info, - &.info:hover { - color: @white - } - // Danger and error appear as red - &.danger, - &.error { - .gradientBar(#ee5f5b, #c43c35); - } - // Success appears as green - &.success { - .gradientBar(#62c462, #57a957); - } - // Info appears as a neutral blue - &.info { - .gradientBar(#5bc0de, #339bb9); - } -} - -// Base .btn styles -.btn { - // Button Base - display: inline-block; - padding: 5px 14px 6px; - font-size: @baseFontSize; - line-height: normal; - color: #333; - text-shadow: 0 1px 1px rgba(255,255,255,.75); - #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient - border: 1px solid #ccc; - border-bottom-color: #bbb; - .border-radius(4px); - @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); - cursor: pointer; - - &:hover { - color: @grayDark; - text-decoration: none; - background-position: 0 -15px; - } - - // Focus state for keyboard and accessibility - &:focus { - outline: 1px dotted #666; - } - - // Primary Button Type - &.primary { - color: @white; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - .gradientBar(@blue, @blueDark) - } - - // Transitions - .transition(.1s linear all); - - // Active and Disabled states - &.active, - &:active { - @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); - } - &.disabled { - cursor: default; - background-image: none; - .reset-filter(); - .opacity(65); - .box-shadow(none); - } - &[disabled] { - // disabled pseudo can't be included with .disabled - // def because IE8 and below will drop it ;_; - cursor: default; - background-image: none; - .reset-filter(); - .opacity(65); - .box-shadow(none); - } - - // Button Sizes - &.large { - padding: 9px 14px 9px; - font-size: @baseFontSize + 2px; - line-height: normal; - .border-radius(6px); - } - &.small { - padding: 7px 9px 7px; - font-size: @baseFontSize - 2px; - } -} -// Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons -:root .alert-message, -:root .btn { - border-radius: 0 \0; -} - -// Help Firefox not be a jerk about adding extra padding to buttons -button.btn, -input[type=submit].btn { - &::-moz-focus-inner { - padding: 0; - border: 0; - } -} - -// Button groups -// ------------- - -// Group multiple button groups together for a toolbar -.btn-toolbar { - .clearfix(); - .btn-group { - float: left; - margin-right: 10px; - } -} - -// Clear the float -.btn-group { - .clearfix(); -} -// Float them, remove border radius, then re-add to first and last elements -.btn-group .btn { - position: relative; - float: left; - margin-left: -1px; - .border-radius(0); - // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match - &:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; - } - &:last-child { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; - } - // Reset corners for large buttons - &.large:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 6px; - -moz-border-radius-topleft: 6px; - border-top-left-radius: 6px; - -webkit-border-bottom-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - border-bottom-left-radius: 6px; - } - &.large:last-child { - -webkit-border-top-right-radius: 6px; - -moz-border-radius-topright: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - -moz-border-radius-bottomright: 6px; - border-bottom-right-radius: 6px; - } -} -// On hover/focus/active, bring the proper btn to front -.btn-group .btn:hover, -.btn-group .btn:focus, -.btn-group .btn:active { - z-index: 2; -} - - - -// CLOSE ICONS -// ----------- -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: @baseLineHeight * .75; - color: @black; - text-shadow: 0 1px 0 rgba(255,255,255,1); - .opacity(20); - &:hover { - color: @black; - text-decoration: none; - .opacity(40); - } -} - - -// ERROR STYLES -// ------------ - -// Base alert styles -.alert-message { - position: relative; - padding: 7px 15px; - margin-bottom: @baseLineHeight; - color: @grayDark; - text-shadow: 0 1px 0 rgba(255,255,255,.5); - .gradientBar(#fceec1, #eedc94); // warning by default - border-width: 1px; - border-style: solid; - .border-radius(4px); - .box-shadow(inset 0 1px 0 rgba(255,255,255,.25)); - - // Adjust close icon - .close { - *margin-top: 3px; /* IE7 spacing */ - } - - // Remove extra margin from content - h5 { - line-height: @baseLineHeight; - } - p { - margin-bottom: 0; - } - div { - margin-top: 5px; - margin-bottom: 2px; - line-height: 28px; - } - .btn { - // Provide actions with buttons - .box-shadow(0 1px 0 rgba(255,255,255,.25)); - } - - &.error, - &.success, - &.info { - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - - &.block-message { - padding: 14px; - background-image: none; - background-color: lighten(#fceec1, 5%); - .reset-filter(); // undo gradient for IE9 - border-color: #fceec1; - .box-shadow(none); - ul, p { - margin-right: 30px; - } - ul { - margin-bottom: 0; - } - li { - color: @grayDark; - } - .alert-actions { - margin-top: 5px; - } - &.error, - &.success, - &.info { - color: @grayDark; - text-shadow: 0 1px 0 rgba(255,255,255,.5); - } - &.error { - background-color: lighten(#f56a66, 25%); - border-color: lighten(#f56a66, 20%); - } - &.success { - background-color: lighten(#62c462, 30%); - border-color: lighten(#62c462, 25%); - } - &.info { - background-color: lighten(#6bd0ee, 25%); - border-color: lighten(#6bd0ee, 20%); - } - } -} - - - - -// WELLS -// ----- - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #eee; - border: 1px solid rgba(0,0,0,.05); - .border-radius(4px); - .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); - blockquote { - border-color: #ddd; - border-color: rgba(0,0,0,.15); - } -} - - -// PATTERN ANIMATIONS -// ------------------ - -.fade { - .transition(opacity .15s linear); - opacity: 0; - &.in { - opacity: 1; - } -} - -.collapse { - .transition(height .35s ease); - position:relative; - overflow:hidden; - height: 0; - &.in { height: auto; } -} - - -// LABELS -// ------ - -.label { - padding: 1px 3px 2px; - font-size: @baseFontSize * .75; - font-weight: bold; - color: @white; - text-transform: uppercase; - background-color: @grayLight; - .border-radius(3px); - &.important { background-color: #c43c35; } - &.warning { background-color: @orange; } - &.success { background-color: @green; } - &.notice { background-color: lighten(@blue, 25%); } -} - -- cgit v1.2.3 From 23e5fc2133dd748ba4a7df52b598a24a2915811a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 5 Jan 2012 14:11:41 -0800 Subject: Tweak the docs and address the new forms list of controls: radios and checkboxes are now hanging controls to wrap text properly --- lib/patterns.less | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 72c3e8ec5..7a039ce26 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -28,16 +28,3 @@ footer { margin-top: @baseLineHeight - 1; border-top: 1px solid #eee; } - - -// PAGE HEADERS -// ------------ - -.page-header { - margin-bottom: @baseLineHeight * 1.5; - border-bottom: 1px solid #eee; - .box-shadow(0 1px 0 rgba(255,255,255,.5)); - h1 { - margin-bottom: @baseLineHeight * .75; - } -} -- cgit v1.2.3 From ef4e3bc0f7549e327c45792884a264faab402400 Mon Sep 17 00:00:00 2001 From: Linmiao Xu Date: Thu, 26 Jan 2012 15:51:11 -0800 Subject: Move hero-unit css out of pattern.less and include it. Fixes #1185. --- lib/patterns.less | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less index 7a039ce26..d94b921e4 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -6,23 +6,6 @@ // PAGE HEADERS // ------------ -.hero-unit { - padding: 60px; - margin-bottom: 30px; - background-color: #f5f5f5; - .border-radius(6px); - h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; - } - p { - font-size: 18px; - font-weight: 200; - line-height: @baseLineHeight * 1.5; - } -} footer { padding-top: @baseLineHeight - 1; margin-top: @baseLineHeight - 1; -- cgit v1.2.3 From dc2deb9a1b1995bbabee91bfd579d9b466fe78f2 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 26 Jan 2012 21:48:46 -0800 Subject: moving structure around + more work on builder... --- lib/patterns.less | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 lib/patterns.less (limited to 'lib/patterns.less') diff --git a/lib/patterns.less b/lib/patterns.less deleted file mode 100644 index d94b921e4..000000000 --- a/lib/patterns.less +++ /dev/null @@ -1,13 +0,0 @@ -// Patterns.less -// Repeatable UI elements outside the base styles provided from the scaffolding -// ---------------------------------------------------------------------------- - - -// PAGE HEADERS -// ------------ - -footer { - padding-top: @baseLineHeight - 1; - margin-top: @baseLineHeight - 1; - border-top: 1px solid #eee; -} -- cgit v1.2.3