From 058f47b33b3978bbb484e521e7fc14c6ebadc161 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 26 Dec 2011 17:25:25 -0600 Subject: [PATCH] clean up some comments and fix a bug with buttons in navbar by removing too generic of a link color --- bootstrap.css | 106 ++-------------------------------------------- bootstrap.min.css | 11 +---- docs/index.html | 1 + lib/patterns.less | 103 ++------------------------------------------ 4 files changed, 8 insertions(+), 213 deletions(-) diff --git a/bootstrap.css b/bootstrap.css index 5e22415ddd..ff21bc836c 100644 --- a/bootstrap.css +++ b/bootstrap.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: Mon Dec 26 16:47:02 CST 2011 + * Date: Mon Dec 26 17:12:29 CST 2011 */ html, body { margin: 0; @@ -1191,10 +1191,6 @@ table { -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); } -.navbar a { - color: #bfbfbf; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} .navbar .brand a:hover, .navbar ul .active > a { color: #ffffff; text-decoration: none; @@ -1300,7 +1296,9 @@ table { float: none; padding: 10px 10px 11px; line-height: 19px; + color: #bfbfbf; text-decoration: none; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .nav a:hover { color: #ffffff; @@ -1368,104 +1366,6 @@ table { .topbar ul .dropdown-menu li a { padding: 4px 15px; } -.dropdown { - position: relative; -} -.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 #ffffff; - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; - content: "↓"; -} -.dropdown:hover .dropdown-toggle:after { - filter: alpha(opacity=100); - -moz-opacity: 1; - opacity: 1; -} -.dropdown-menu { - position: absolute; - top: 40px; - z-index: 900; - float: left; - display: none; - min-width: 160px; - max-width: 220px; - _width: 160px; - padding: 6px 0; - margin-left: 0; - margin-right: 0; - background-color: #ffffff; - border-color: #999; - border-color: rgba(0, 0, 0, 0.2); - border-style: solid; - border-width: 0 1px 1px; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; - zoom: 1; -} -.dropdown-menu li { - float: none; - display: block; - background-color: none; -} -.dropdown-menu .divider { - height: 1px; - margin: 5px 0; - overflow: hidden; - background-color: #eee; - border-bottom: 1px solid #ffffff; -} -.topbar .dropdown-menu a, .dropdown-menu a { - display: block; - padding: 4px 15px; - clear: both; - font-weight: normal; - line-height: 18px; - color: #808080; - text-shadow: 0 1px 0 #ffffff; -} -.topbar .dropdown-menu a:hover, .dropdown-menu a:hover { - color: #404040; - text-decoration: none; - background-color: #dddddd; - background-image: -khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd)); - background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); - background-image: -ms-linear-gradient(top, #eeeeee, #dddddd); - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd)); - background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); - background-image: -o-linear-gradient(top, #eeeeee, #dddddd); - background-image: linear-gradient(top, #eeeeee, #dddddd); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0); - -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025); -} -.dropdown.open .dropdown-toggle { - color: #ffffff; - background: #ccc; - background: rgba(0, 0, 0, 0.3); -} -.dropdown.open .dropdown-menu { - display: block; -} .hero-unit { padding: 60px; margin-bottom: 30px; diff --git a/bootstrap.min.css b/bootstrap.min.css index aa277ddb8c..711e8a37ee 100644 --- a/bootstrap.min.css +++ b/bootstrap.min.css @@ -173,7 +173,6 @@ tbody tr:last-child th,tbody tr:last-child td{border-bottom:0;} .striped-table tbody tr:nth-child(odd) td,.striped-table tbody tr:nth-child(odd) th{background-color:#f9f9f9;} .navbar{overflow:visible;} .navbar-inner{background-color:#222222;background-color:#222222;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} -.navbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} .navbar .brand a:hover,.navbar ul .active>a{color:#ffffff;text-decoration:none;background-color:#333333;background-color:rgba(255, 255, 255, 0.05);} .navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;} .navbar p{margin:0;line-height:40px;}.navbar p a:hover{color:#ffffff;background-color:transparent;} @@ -185,7 +184,7 @@ tbody tr:last-child th,tbody tr:last-child td{border-bottom:0;} .navbar-static .navbar-inner{padding-left:20px;padding-right:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .navbar-fixed{position:fixed;top:0;right:0;left:0;z-index:10000;} .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}.nav>li{display:block;float:left;} -.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.nav a:hover{color:#ffffff;text-decoration:none;} +.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;color:#bfbfbf;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.nav a:hover{color:#ffffff;text-decoration:none;} .nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);} .nav .divider{height:40px;width:1px;margin:0 5px;overflow:hidden;background-color:#222;border-right:1px solid #444;} .nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.nav.secondary-nav .dropdown-menu{right:0;border:0;} @@ -195,14 +194,6 @@ tbody tr:last-child th,tbody tr:last-child td{border-bottom:0;} .nav .dropdown-menu .active a{color:#ffffff;} .nav .dropdown-menu .divider{background-color:#222;border-color:#444;} .topbar ul .dropdown-menu li a{padding:4px 15px;} -.dropdown{position:relative;} -.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 #ffffff;filter:alpha(opacity=30);-moz-opacity:0.3;opacity:0.3;content:"↓";} -.dropdown:hover .dropdown-toggle:after{filter:alpha(opacity=100);-moz-opacity:1;opacity:1;} -.dropdown-menu{position:absolute;top:40px;z-index:900;float:left;display:none;min-width:160px;max-width:220px;_width:160px;padding:6px 0;margin-left:0;margin-right:0;background-color:#ffffff;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;zoom:1;}.dropdown-menu li{float:none;display:block;background-color:none;} -.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;} -.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover{color:#404040;text-decoration:none;background-color:#dddddd;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);} -.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);} -.dropdown.open .dropdown-menu{display:block;} .hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-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{padding-top:17px;margin-top:17px;border-top:1px solid #eee;} diff --git a/docs/index.html b/docs/index.html index 0d340fa1ab..735fe7ae73 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,6 +41,7 @@
  • Javascript plugins
  • Using LESS
  • + Button diff --git a/lib/patterns.less b/lib/patterns.less index 44c427adf5..25934d80a8 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;