aboutsummaryrefslogtreecommitdiff
path: root/lib/patterns.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2011-11-17 01:28:42 -0800
committerMark Otto <[email protected]>2011-11-17 01:28:42 -0800
commit4e6275d0fe0880d32633a2c139dad8d3e2745bb6 (patch)
tree575abe4b666c09cf30e542d2e57a159c13bd32bf /lib/patterns.less
parent159c7a7fdae4a3bd929ee9cc76aaa3b509a969dc (diff)
downloadbootstrap-4e6275d0fe0880d32633a2c139dad8d3e2745bb6.tar.xz
bootstrap-4e6275d0fe0880d32633a2c139dad8d3e2745bb6.zip
update property order and do some misc cleanup
Diffstat (limited to 'lib/patterns.less')
-rw-r--r--lib/patterns.less95
1 files changed, 42 insertions, 53 deletions
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: "&darr;";
- 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: "&darr;";
}
.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