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... --- less/accordion.less | 30 +++ less/alerts.less | 69 ++++++ less/bootstrap.less | 63 +++++ less/breadcrumbs.less | 22 ++ less/button-groups.less | 121 ++++++++++ less/buttons.less | 151 ++++++++++++ less/carousel.less | 114 +++++++++ less/close.less | 18 ++ less/code.less | 44 ++++ less/component-animations.less | 18 ++ less/dropdowns.less | 110 +++++++++ less/forms.less | 514 +++++++++++++++++++++++++++++++++++++++++ less/grid.less | 41 ++++ less/hero-unit.less | 20 ++ less/labels.less | 16 ++ less/layouts.less | 43 ++++ less/mixins.less | 360 +++++++++++++++++++++++++++++ less/modals.less | 65 ++++++ less/navbar.less | 251 ++++++++++++++++++++ less/navs.less | 338 +++++++++++++++++++++++++++ less/pager.less | 25 ++ less/pagination.less | 54 +++++ less/patterns.less | 13 ++ less/popovers.less | 49 ++++ less/print.less | 18 ++ less/progress-bars.less | 99 ++++++++ less/reset.less | 126 ++++++++++ less/responsive.less | 268 +++++++++++++++++++++ less/scaffolding.less | 29 +++ less/sprites.less | 121 ++++++++++ less/tables.less | 138 +++++++++++ less/thumbnails.less | 33 +++ less/tooltip.less | 35 +++ less/type.less | 206 +++++++++++++++++ less/utilities.less | 23 ++ less/variables.less | 90 ++++++++ less/wells.less | 17 ++ 37 files changed, 3752 insertions(+) create mode 100644 less/accordion.less create mode 100644 less/alerts.less create mode 100644 less/bootstrap.less create mode 100644 less/breadcrumbs.less create mode 100644 less/button-groups.less create mode 100644 less/buttons.less create mode 100644 less/carousel.less create mode 100644 less/close.less create mode 100644 less/code.less create mode 100644 less/component-animations.less create mode 100644 less/dropdowns.less create mode 100644 less/forms.less create mode 100644 less/grid.less create mode 100644 less/hero-unit.less create mode 100644 less/labels.less create mode 100644 less/layouts.less create mode 100644 less/mixins.less create mode 100644 less/modals.less create mode 100644 less/navbar.less create mode 100644 less/navs.less create mode 100644 less/pager.less create mode 100644 less/pagination.less create mode 100644 less/patterns.less create mode 100644 less/popovers.less create mode 100644 less/print.less create mode 100644 less/progress-bars.less create mode 100644 less/reset.less create mode 100644 less/responsive.less create mode 100644 less/scaffolding.less create mode 100644 less/sprites.less create mode 100644 less/tables.less create mode 100644 less/thumbnails.less create mode 100644 less/tooltip.less create mode 100644 less/type.less create mode 100644 less/utilities.less create mode 100644 less/variables.less create mode 100644 less/wells.less (limited to 'less') diff --git a/less/accordion.less b/less/accordion.less new file mode 100644 index 000000000..1ebd5b1a1 --- /dev/null +++ b/less/accordion.less @@ -0,0 +1,30 @@ +// ACCORDION +// --------- + + +// Parent container +.accordion { + margin-bottom: @baseLineHeight; +} + +// Group == heading + body +.accordion-group { + background-color: #f5f5f5; + .border-radius(4px); +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-body { + margin-bottom: 2px; +} + +// Inner needs the styles because you can't animate properly with any styles on the element +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} diff --git a/less/alerts.less b/less/alerts.less new file mode 100644 index 000000000..23c17e704 --- /dev/null +++ b/less/alerts.less @@ -0,0 +1,69 @@ +// ALERT STYLES +// ------------ + +// Base alert styles +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: @baseLineHeight; + text-shadow: 0 1px 0 rgba(255,255,255,.5); + background-color: @warningBackground; + border: 1px solid @warningBorder; + .border-radius(4px); +} +.alert, +.alert-heading { + color: @warningText; +} + +// Adjust close link position +.alert .close { + position: relative; + right: -21px; + line-height: 18px; +} + +// Alternate styles +// ---------------- + +.alert-success { + background-color: @successBackground; + border-color: @successBorder; +} +.alert-success, +.alert-success .alert-heading { + color: @successText; +} +.alert-danger, +.alert-error { + background-color: @errorBackground; + border-color: @errorBorder; +} +.alert-danger, +.alert-error, +.alert-danger .alert-heading, +.alert-error .alert-heading { + color: @errorText; +} +.alert-info { + background-color: @infoBackground; + border-color: @infoBorder; +} +.alert-info, +.alert-info .alert-heading { + color: @infoText; +} + + +// Block alerts +// ------------------------ +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} diff --git a/less/bootstrap.less b/less/bootstrap.less new file mode 100644 index 000000000..bc9f84373 --- /dev/null +++ b/less/bootstrap.less @@ -0,0 +1,63 @@ +/*! + * Bootstrap @VERSION + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Date: @DATE + */ + +// CSS Reset +@import "reset.less"; + +// Core variables and mixins +@import "variables.less"; // Modify this for custom colors, font-sizes, etc +@import "mixins.less"; + +// Grid system and page structure +@import "scaffolding.less"; +@import "grid.less"; +@import "layouts.less"; + +// Base CSS +@import "type.less"; +@import "code.less"; +@import "forms.less"; +@import "tables.less"; + +// Components: common +@import "sprites.less"; +@import "dropdowns.less"; +@import "wells.less"; +@import "component-animations.less"; +@import "close.less"; + +// Components: Nav +@import "navs.less"; +@import "navbar.less"; +@import "breadcrumbs.less"; +@import "pagination.less"; +@import "pager.less"; + +// Components: Popovers +@import "modals.less"; +@import "tooltip.less"; +@import "popovers.less"; + +// Components: Buttons & Alerts +@import "buttons.less"; +@import "button-groups.less"; +@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less + +// Components: Misc +@import "thumbnails.less"; +@import "labels.less"; +@import "progress-bars.less"; +@import "accordion.less"; +@import "carousel.less"; +@import "hero-unit.less"; + +// Utility classes +@import "utilities.less"; // Has to be last to override when necessary diff --git a/less/breadcrumbs.less b/less/breadcrumbs.less new file mode 100644 index 000000000..19b8081e1 --- /dev/null +++ b/less/breadcrumbs.less @@ -0,0 +1,22 @@ +// BREADCRUMBS +// ----------- + +.breadcrumb { + padding: 7px 14px; + margin: 0 0 @baseLineHeight; + #gradient > .vertical(@white, #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; + } +} diff --git a/less/button-groups.less b/less/button-groups.less new file mode 100644 index 000000000..5fb0a8e97 --- /dev/null +++ b/less/button-groups.less @@ -0,0 +1,121 @@ +// BUTTON GROUPS +// ------------- + + +// Make the div behave like a button +.btn-group { + position: relative; + .clearfix(); // clears the floated buttons +} + +// Space out series of button groups +.btn-group + .btn-group { + margin-left: 5px; +} + +// Optional: Group multiple button groups together for a toolbar +.btn-toolbar { + .btn-group { + display: inline-block; + } +} + +// 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 +.btn-group .btn: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; +} +.btn-group .btn:last-child, +.btn-group .dropdown-toggle { + -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 +.btn-group .btn.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; +} +.btn-group .btn.large:last-child, +.btn-group .large.dropdown-toggle { + -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; +} + + +// Split button dropdowns +// ---------------------- + +// Give the line between buttons some depth +.btn-group .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + @shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); +} + +// Reposition menu on open and round all corners +.btn-group.open .dropdown-menu { + display: block; + margin-top: 1px; + .border-radius(5px); +} +.btn-group.open .dropdown-toggle { + background-image: none; + @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); +} + +// Reposition the caret +.btn .caret { + margin-top: 6px; + margin-left: 0; +} + +// Account for other colors +.primary, +.danger, +.info, +.success { + .caret { + border-top-color: @white; + .opacity(75); + } +} + +// Small button dropdowns +.btn.small .caret { + margin-top: 4px; +} + diff --git a/less/buttons.less b/less/buttons.less new file mode 100644 index 000000000..d7f533783 --- /dev/null +++ b/less/buttons.less @@ -0,0 +1,151 @@ +// BUTTON STYLES +// ------------- + + +// Colors +// ------ + +.btn { + // Set text color + &.primary, + &.primary:hover, + &.danger, + &.danger:hover, + &.success, + &.success:hover, + &.info, + &.info:hover { + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + color: @white + } + &.primary { + .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 15)); + } + // Danger and error appear as red + &.danger { + .buttonBackground(#ee5f5b, #c43c35); + } + // Success appears as green + &.success { + .buttonBackground(#62c462, #57a957); + } + // Info appears as a neutral blue + &.info { + .buttonBackground(#5bc0de, #339bb9); + } +} + + +// Mixin for generating button backgrounds +// --------------------------------------- +.buttonBackground(@startColor, @endColor) { + // gradientBar will set the background to a pleasing blend of these, to support IE<=9 + .gradientBar(@startColor, @endColor); + + // in these cases the gradient won't cover the background, so we override + &:hover, &:active, &.active, &.disabled { + background-color: @endColor; + } + + // called out separately because IE8 would ignore otherwise + &[disabled] { + background-color: @endColor; + } + + // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves + &:active, + &.active { + background-color: darken(@endColor, 10%) e("\9"); + } +} + + +// Base styles +// ----------- + +.btn { + // Button Base + display: inline-block; + padding: 4px 10px 4px; + font-size: @baseFontSize; + line-height: @baseLineHeight; + color: @grayDark; + text-shadow: 0 1px 1px rgba(255,255,255,.75); + #gradient > .vertical-three-colors(@white, @white, 25%, darken(@white, 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-color: darken(@white, 10%); + background-position: 0 -15px; + + // transition is only when going to hover, otherwise the background + // behind the gradient (there for IE<=9 fallback) gets mismatched + .transition(background-position .1s linear); + } + + // Focus state for keyboard and accessibility + &:focus { + outline: 1px dotted #666; + } + + // Active and Disabled states + &.active, + &:active { + background-image: none; + @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); + background-color: darken(@white, 10%); + background-color: darken(@white, 15%) e("\9"); + } + &.disabled { + cursor: default; + background-image: none; + background-color: darken(@white, 10%); + .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; + background-color: darken(@white, 10%); + .opacity(65); + .box-shadow(none); + } + + // Button Sizes + &.large { + padding: 9px 14px 9px; + font-size: @baseFontSize + 2px; + line-height: normal; + .border-radius(5px); + } + &.large .icon { + margin-top: 1px; + } + &.small { + padding: 5px 9px 5px; + font-size: @baseFontSize - 2px; + line-height: @baseLineHeight - 2px; + } + &.small .icon { + margin-top: -2px; + } +} + +// 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; + } +} diff --git a/less/carousel.less b/less/carousel.less new file mode 100644 index 000000000..254a9f60c --- /dev/null +++ b/less/carousel.less @@ -0,0 +1,114 @@ +// CAROUSEL +// -------- + +.carousel { + position: relative; + line-height: 1; +} + +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} + +.carousel { + + .item { + display: none; + position: relative; + .transition(.6s ease-in-out left); + } + + // Account for jankitude on images + .item > img { + display: block; + line-height: 1; + } + + .active, + .next, + .prev { display: block; } + + .active { + left: 0; + } + + .next, + .prev { + position: absolute; + top: 0; + width: 100%; + } + + .next { + left: 100%; + } + .prev { + left: -100%; + } + .next.left, + .prev.right { + left: 0; + } + + .active.left { + left: -100%; + } + .active.right { + left: 100%; + } + +} + +// Left/right controls for nav +// --------------------------- + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: @white; + text-align: center; + background: @grayDarker; + border: 3px solid @white; + .border-radius(23px); + .opacity(50); + .transition(all .2s linear); + + // Reposition the right one + &.right { + left: auto; + right: 15px; + } + + // Hover state + &:hover { + color: @white; + text-decoration: none; + .opacity(90); + } +} + +// Caption for text below images +// ----------------------------- + +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 10px 15px 5px; + background: @grayDark; + background: rgba(0,0,0,.75); +} +.carousel-caption h4, +.carousel-caption p { + color: @white; +} diff --git a/less/close.less b/less/close.less new file mode 100644 index 000000000..a0e5edba1 --- /dev/null +++ b/less/close.less @@ -0,0 +1,18 @@ +// CLOSE ICONS +// ----------- + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: @baseLineHeight; + color: @black; + text-shadow: 0 1px 0 rgba(255,255,255,1); + .opacity(20); + &:hover { + color: @black; + text-decoration: none; + .opacity(40); + cursor: pointer; + } +} diff --git a/less/code.less b/less/code.less new file mode 100644 index 000000000..0cc3db857 --- /dev/null +++ b/less/code.less @@ -0,0 +1,44 @@ +// Code.less +// Code typography styles for the and
 elements
+// --------------------------------------------------------
+
+// Inline and block code styles
+code,
+pre {
+  padding: 0 3px 2px;
+  #font > #family > .monospace;
+  font-size: @baseFontSize - 1;
+  color: @grayDark;
+  .border-radius(3px);
+}
+code {
+  padding: 3px 4px;
+  color: #d14;
+  background-color: #f7f7f9;
+  border: 1px solid #e1e1e8;
+}
+pre {
+  display: block;
+  padding: (@baseLineHeight - 1) / 2;
+  margin: 0 0 @baseLineHeight / 2;
+  font-size: 12px;
+  line-height: @baseLineHeight;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc; // fallback for IE7-8
+  border: 1px solid rgba(0,0,0,.15);
+  .border-radius(4px);
+  white-space: pre;
+  white-space: pre-wrap;
+  word-break: break-all;
+
+  // Make prettyprint styles more spaced out for readability
+  &.prettyprint {
+    margin-bottom: @baseLineHeight;
+  }
+
+  // Account for some code outputs that place code tags in pre tags
+  code {
+    padding: 0;
+    background-color: transparent;
+  }
+}
diff --git a/less/component-animations.less b/less/component-animations.less
new file mode 100644
index 000000000..4f2a4fd11
--- /dev/null
+++ b/less/component-animations.less
@@ -0,0 +1,18 @@
+// COMPONENT 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; }
+}
diff --git a/less/dropdowns.less b/less/dropdowns.less
new file mode 100644
index 000000000..06114b254
--- /dev/null
+++ b/less/dropdowns.less
@@ -0,0 +1,110 @@
+// 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; +} +// Dropdown arrow/caret +.caret { + display: inline-block; + width: 0; + height: 0; + text-indent: -99999px; + vertical-align: top; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid @black; + .opacity(30); + content: "\2193"; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; + *margin-top: 7px; +} +.dropdown:hover .caret, +.open.dropdown .caret { + .opacity(100); +} +// The dropdown menu (ul) +.dropdown-menu { + position: absolute; + top: 100%; + z-index: @zindexDropdown; + float: left; + display: none; // none by default, but block on "open" of the menu + min-width: 160px; + max-width: 220px; + _width: 160px; + padding: 4px 0; + margin: 0; // override default ul + list-style: none; + background-color: @white; + border-color: #ccc; + border-color: rgba(0,0,0,.2); + border-style: solid; + border-width: 1px; + .border-radius(0 0 5px 5px); + .box-shadow(0 5px 10px rgba(0,0,0,.2)); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + zoom: 1; // do we need this? + *border-right-width: 2px; + *border-bottom-width: 2px; + + // Allow for dropdowns to go bottom up (aka, dropup-menu) + &.bottom-up { + top: auto; + bottom: 100%; + margin-bottom: 2px; + } + + // Dividers (basically an hr) within the dropdown + .divider { + height: 1px; + margin: 5px 1px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid @white; + } + + // Links within the dropdown menu + a { + display: block; + padding: 3px 15px; + clear: both; + font-weight: normal; + line-height: 18px; + color: @gray; + white-space: nowrap; + } +} + +// Hover state +.dropdown-menu li > a:hover, +.dropdown-menu .active > a, +.dropdown-menu .active > a:hover { + color: @white; + text-decoration: none; + background-color: @linkColor; +} + +// Open state for the dropdown +.dropdown.open { + .dropdown-toggle { + color: @white; + background: #ccc; + background: rgba(0,0,0,.3); + } + .dropdown-menu { + display: block; + } +} + +// Typeahead +.typeahead { + margin-top: 2px; // give it some space to breathe + .border-radius(4px); +} diff --git a/less/forms.less b/less/forms.less new file mode 100644 index 000000000..9e2e1dc1b --- /dev/null +++ b/less/forms.less @@ -0,0 +1,514 @@ +// Forms.less +// Base styles for various input types, form layouts, and states +// ------------------------------------------------------------- + + +// GENERAL STYLES +// -------------- + +// Make all forms have space below them +form { + margin: 0 0 @baseLineHeight; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +// Groups of fields with labels on top (legends) +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: @baseLineHeight * 1.5; + font-size: @baseFontSize * 1.5; + line-height: @baseLineHeight * 2; + color: @grayDark; + border: 0; + border-bottom: 1px solid #eee; +} + +// Set font for forms +label, +input, +button, +select, +textarea { + #font > .sans-serif(@baseFontSize,normal,@baseLineHeight); +} + +// Identify controls by their labels +label { + display: block; + margin-bottom: 5px; + color: @grayDark; +} + +// Inputs, Textareas, Selects +input, +textarea, +select, +.uneditable-input { + display: inline-block; + width: 210px; + height: @baseLineHeight; + padding: 4px; + margin-bottom: 9px; + font-size: @baseFontSize; + line-height: @baseLineHeight; + color: @gray; + border: 1px solid #ccc; + .border-radius(3px); +} +.uneditable-textarea { + width: auto; + height: auto; +} + +// Inputs within a label +label input, +label textarea, +label select { + display: block; +} + +// Mini reset for unique input types +input[type=image], +input[type=checkbox], +input[type=radio] { + width: auto; + height: auto; + padding: 0; + margin: 3px 0; + *margin-top: 0; /* IE7 */ + line-height: normal; + border: none; + cursor: pointer; + .border-radius(0); +} + +// Reset the file input to browser defaults +input[type=file] { + padding: initial; + line-height: initial; + border: initial; + background-color: @white; + background-color: initial; + .box-shadow(none); +} + +// Help out input buttons +input[type=button], +input[type=reset], +input[type=submit] { + width: auto; + height: auto; +} + +// Set the height of select and file controls to match text inputs +select, +input[type=file] { + height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ + *margin-top: 4px; /* For IE7, add top margin to align select with labels */ + line-height: 28px; +} + +// Chrome on Linux and Mobile Safari need background-color +select { + width: 220px; // default input width + 10px of padding that doesn't get applied + background-color: @white; +} + +// Make multiple select elements height not fixed +select[multiple], +select[size] { + height: auto; +} + +// Remove shadow from image inputs +input[type=image] { + .box-shadow(none); +} + +// Make textarea height behave +textarea { + height: auto; +} + +// Hidden inputs +input[type=hidden] { + display: none; +} + + + +// CHECKBOXES & RADIOS +// ------------------- + +// Indent the labels to position radios/checkboxes as hanging +.radio, +.checkbox { + padding-left: 18px; +} +.radio input[type=radio], +.checkbox input[type=checkbox] { + float: left; + margin-left: -18px; +} + +// Move the options list down to align with labels +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; // has to be padding because margin collaspes +} + +// Radios and checkboxes on same line +.radio.inline, +.checkbox.inline { + display: inline-block; + margin-bottom: 0; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; // space out consecutive inline controls +} + + + +// FOCUS STATE +// ----------- + +input, +textarea { + .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); + @transition: border linear .2s, box-shadow linear .2s; + .transition(@transition); +} +input:focus, +textarea:focus { + border-color: rgba(82,168,236,.8); + @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + .box-shadow(@shadow); + outline: 0; +} +input[type=file]:focus, +input[type=checkbox]:focus, +select:focus { + .box-shadow(none); // override for file inputs + outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline +} + + + +// INPUT SIZES +// ----------- + +// General classes for quick sizes +.input-mini { width: 60px; } +.input-small { width: 90px; } +.input-medium { width: 150px; } +.input-large { width: 210px; } +.input-xlarge { width: 270px; } +.input-xxlarge { width: 530px; } + +// Grid style input sizes +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input { + float: none; + margin-left: 0; +} + +// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border +.inputColumns(@columnSpan: 1) { + width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10; +} +input, +textarea, +.uneditable-input { + // Default columns + &.span1 { .inputColumns(1); } + &.span2 { .inputColumns(2); } + &.span3 { .inputColumns(3); } + &.span4 { .inputColumns(4); } + &.span5 { .inputColumns(5); } + &.span6 { .inputColumns(6); } + &.span7 { .inputColumns(7); } + &.span8 { .inputColumns(8); } + &.span9 { .inputColumns(9); } + &.span10 { .inputColumns(10); } + &.span11 { .inputColumns(11); } + &.span12 { .inputColumns(12); } +} + +.selectColumns(@columnSpan: 1) { + width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) + 10; +} +select { + &.span1 { .selectColumns(1); } + &.span2 { .selectColumns(2); } + &.span3 { .selectColumns(3); } + &.span4 { .selectColumns(4); } + &.span5 { .selectColumns(5); } + &.span6 { .selectColumns(6); } + &.span7 { .selectColumns(7); } + &.span8 { .selectColumns(8); } + &.span9 { .selectColumns(9); } + &.span10 { .selectColumns(10); } + &.span11 { .selectColumns(11); } + &.span12 { .selectColumns(12); } +} + + + +// DISABLED STATE +// -------------- + +// Disabled and read-only inputs +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + background-color: #f5f5f5; + border-color: #ddd; + cursor: not-allowed; +} + + + + +// FORM FIELD FEEDBACK STATES +// -------------------------- + +// Mixin for form field states +.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) { + // Set the text color + > label, + .help-block, + .help-inline { + color: @textColor; + } + // Style inputs accordingly + input, + select, + textarea { + color: @textColor; + border-color: @borderColor; + &:focus { + border-color: darken(@borderColor, 10%); + .box-shadow(0 0 6px lighten(@borderColor, 20%)); + } + } + // Give a small background color for input-prepend/-append + .input-prepend .add-on, + .input-append .add-on { + color: @textColor; + background-color: @backgroundColor; + border-color: @textColor; + } +} +// Warning +.control-group.warning { + .formFieldState(@warningText, @warningText, @warningBackground); +} +// Error +.control-group.error { + .formFieldState(@errorText, @errorText, @errorBackground); +} +// Success +.control-group.success { + .formFieldState(@successText, @successText, @successBackground); +} + +// HTML5 invalid states +// Shares styles with the .control-group.error above +input:focus:required:invalid, +textarea:focus:required:invalid, +select:focus:required:invalid { + color: #b94a48; + border-color: #ee5f5b; + &:focus { + border-color: darken(#ee5f5b, 10%); + .box-shadow(0 0 6px lighten(#ee5f5b, 20%)); + } +} + + + +// FORM ACTIONS +// ------------ + +.form-actions { + padding: (@baseLineHeight - 1) 20px @baseLineHeight; + margin-top: @baseLineHeight; + margin-bottom: @baseLineHeight; + background-color: #f5f5f5; + border-top: 1px solid #ddd; +} + +// For text that needs to appear as an input but should not be an input +.uneditable-input { + display: block; + background-color: @white; + border-color: #eee; + .box-shadow(inset 0 1px 2px rgba(0,0,0,.025)); + cursor: not-allowed; +} + +// Placeholder text gets special styles; can't be bundled together though for some reason +.placeholder(@grayLight); + + + +// HELP TEXT +// --------- + +.help-block { + margin-top: 5px; + margin-bottom: 0; + color: @grayLight; +} + +.help-inline { + display: inline-block; + margin-bottom: 9px; + vertical-align: middle; + padding-left: 5px; +} + + + +// INPUT GROUPS +// ------------ + +// Allow us to put symbols and text within the input field for a cleaner look +.input-prepend, +.input-append { + margin-bottom: 5px; + .clearfix(); // Clear the float to prevent wrapping + input, + .uneditable-input { + .border-radius(0 3px 3px 0); + } + .uneditable-input { + border-left-color: #ccc; + } + .add-on { + float: left; + display: block; + width: auto; + min-width: 16px; + height: @baseLineHeight; + margin-right: -1px; + padding: 4px 4px 4px 5px; + font-weight: normal; + line-height: @baseLineHeight; + color: @grayLight; + text-align: center; + text-shadow: 0 1px 0 @white; + background-color: #f5f5f5; + border: 1px solid #ccc; + .border-radius(3px 0 0 3px); + } + .active { + background-color: lighten(@green, 30); + border-color: @green; + } +} +.input-prepend { + .add-on { + *margin-top: 1px; /* IE6-7 */ + } +} +.input-append { + input, + .uneditable-input { + float: left; + .border-radius(3px 0 0 3px); + } + .uneditable-input { + border-right-color: #ccc; + } + .add-on { + margin-right: 0; + margin-left: -1px; + .border-radius(0 3px 3px 0); + } +} + + + +// SEARCH FORM +// ----------- + +.search-query { + padding-left: 14px; + padding-right: 14px; + margin-bottom: 0; // remove the default margin on all inputs + .border-radius(14px); +} + + + +// HORIZONTAL & VERTICAL FORMS +// --------------------------- + +// Common properties +// ----------------- + +.form-search, +.form-inline, +.form-horizontal { + input, + textarea, + select, + .help-inline, + .uneditable-input { + display: inline-block; + margin-bottom: 0; + } +} +.form-search label, +.form-inline label { + display: inline-block; +} + +// Margin to space out fieldsets +.control-group { + margin-bottom: @baseLineHeight / 2; +} + +// Horizontal-specific styles +// -------------------------- + +.form-horizontal { + // Legend collapses margin, so we're relegated to padding + legend + .control-group { + margin-top: @baseLineHeight; + -webkit-margin-top-collapse: separate; + } + // Increase spacing between groups + .control-group { + margin-bottom: @baseLineHeight; + } + // Float the labels left + .control-group > label { + float: left; + width: 140px; + padding-top: 5px; + text-align: right; + } + // Move over all input controls and content + .controls { + margin-left: 160px; + } + // Move over buttons in .form-actions to align with .controls + .form-actions { + padding-left: 160px; + } +} diff --git a/less/grid.less b/less/grid.less new file mode 100644 index 000000000..d5b5f487d --- /dev/null +++ b/less/grid.less @@ -0,0 +1,41 @@ +// GRID SYSTEM +// ----------- +// To customize the grid system, bring up the variables.less file and change the column count, size, and gutter there +.row { + margin-left: @gridGutterWidth * -1; + .clearfix(); +} + +// Find all .span# classes within .row and give them the necessary properties for grid columns +// (supported by all browsers back to IE7) +// Credit to @dhg for the idea +[class*="span"] { + .gridColumn(); +} + +// Default columns +.span1 { .columns(1); } +.span2 { .columns(2); } +.span3 { .columns(3); } +.span4 { .columns(4); } +.span5 { .columns(5); } +.span6 { .columns(6); } +.span7 { .columns(7); } +.span8 { .columns(8); } +.span9 { .columns(9); } +.span10 { .columns(10); } +.span11 { .columns(11); } +.span12 { .columns(12); } + +// Offset column options +.offset1 { .offset(1); } +.offset2 { .offset(2); } +.offset3 { .offset(3); } +.offset4 { .offset(4); } +.offset5 { .offset(5); } +.offset6 { .offset(6); } +.offset7 { .offset(7); } +.offset8 { .offset(8); } +.offset9 { .offset(9); } +.offset10 { .offset(10); } +.offset11 { .offset(11); } diff --git a/less/hero-unit.less b/less/hero-unit.less new file mode 100644 index 000000000..cba1cc46c --- /dev/null +++ b/less/hero-unit.less @@ -0,0 +1,20 @@ +// HERO UNIT +// --------- + +.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; + } +} diff --git a/less/labels.less b/less/labels.less new file mode 100644 index 000000000..06dc7f3c0 --- /dev/null +++ b/less/labels.less @@ -0,0 +1,16 @@ +// 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: @errorText; } + &.warning { background-color: @orange; } + &.success { background-color: @successText; } + &.info { background-color: @infoText; } +} diff --git a/less/layouts.less b/less/layouts.less new file mode 100644 index 000000000..14435c9d1 --- /dev/null +++ b/less/layouts.less @@ -0,0 +1,43 @@ +// +// Layouts +// Fixed-width and fluid (with sidebar) layouts +// -------------------------------------------- + + +// Container (centered, fixed-width layouts) +.container { + .container-fixed(); +} + +// Fluid layouts (left aligned, with sidebar, min- & max-width content) +.fluid-container { + position: relative; + min-width: @siteWidth; + padding-left: @gridGutterWidth; + padding-right: @gridGutterWidth; + .clearfix(); +} + +// Sidebars (left and right options) +.fluid-sidebar { + width: @fluidSidebarWidth; + margin: 0 20px 18px; +} +.sidebar-left { padding-left: @fluidSidebarWidth + @gridGutterWidth * 2; } +.sidebar-right { padding-right: @fluidSidebarWidth + @gridGutterWidth * 2; } + +// Float the sidebars accordingly +.sidebar-left .fluid-sidebar { + float: left; + margin-left: (@fluidSidebarWidth + @gridGutterWidth) * -1; +} +.sidebar-right .fluid-sidebar { + float: right; + margin-right: (@fluidSidebarWidth + @gridGutterWidth) * -1; +} + +// The main content area +.fluid-content { + float: left; + width: 100%; +} diff --git a/less/mixins.less b/less/mixins.less new file mode 100644 index 000000000..dd331ebf2 --- /dev/null +++ b/less/mixins.less @@ -0,0 +1,360 @@ +// Mixins.less +// Snippets of reusable CSS to develop faster and keep code readable +// ----------------------------------------------------------------- + + +// UTILITY MIXINS +// -------------------------------------------------- + +// Clearfix +// ------------------------- +// For clearing floats like a boss h5bp.com/q +.clearfix() { + *zoom: 1; + &:before, + &:after { + display: table; + content: ""; + } + &:after { + clear: both; + } +} + +// Center-align a block level element +// ------------------------- +.center-block() { + display: block; + margin-left: auto; + margin-right: auto; +} + +// IE7 inline-block +// ------------------------- +.ie7-inline-block() { + *display: inline; /* IE7 inline-block hack */ + *zoom: 1; +} + +// Sizing shortcuts +// ------------------------- +.size(@height: 5px, @width: 5px) { + width: @width; + height: @height; +} +.square(@size: 5px) { + .size(@size, @size); +} + +// Placeholder text +// ------------------------- +.placeholder(@color: @placeholderText) { + :-moz-placeholder { + color: @color; + } + ::-webkit-input-placeholder { + color: @color; + } +} + + + +// FONTS +// -------------------------------------------------- + +#font { + #family { + .serif() { + font-family: Georgia, "Times New Roman", Times, serif; + } + .sans-serif() { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + .monospace() { + font-family: Menlo, Monaco, "Courier New", monospace; + } + } + .shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + font-size: @size; + font-weight: @weight; + line-height: @lineHeight; + } + .serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + #font > #family > .serif; + #font > .shorthand(@size, @weight, @lineHeight); + } + .sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + #font > #family > .sans-serif; + #font > .shorthand(@size, @weight, @lineHeight); + } + .monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { + #font > #family > .monospace; + #font > .shorthand(@size, @weight, @lineHeight); + } +} + + + +// GRID SYSTEM +// -------------------------------------------------- + +// Site container +// ------------------------- +.container-fixed() { + width: @siteWidth; + margin-left: auto; + margin-right: auto; + .clearfix(); +} + +// Columns and offseting +// ------------------------- +.columns(@columns: 1) { + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); +} +.offset(@columns: 1) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); +} +// Necessary grid styles for every column to make them appear next to each other horizontally +.gridColumn() { + float: left; + margin-left: @gridGutterWidth; +} +// makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something +.makeColumn(@columnSpan: 1) { + .gridColumn(); + .columns(@columnSpan); +} + + + +// CSS3 PROPERTIES +// -------------------------------------------------- + +// Border Radius +.border-radius(@radius: 5px) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +// Drop shadows +.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + +// Transitions +.transition(@transition) { + -webkit-transition: @transition; + -moz-transition: @transition; + -ms-transition: @transition; + -o-transition: @transition; + transition: @transition; +} + +// Transformations +.rotate(@degrees) { + -webkit-transform: rotate(@degrees); + -moz-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); + -o-transform: rotate(@degrees); + transform: rotate(@degrees); +} +.scale(@ratio) { + -webkit-transform: scale(@ratio); + -moz-transform: scale(@ratio); + -ms-transform: scale(@ratio); + -o-transform: scale(@ratio); + transform: scale(@ratio); +} +.translate(@x: 0, @y: 0) { + -webkit-transform: translate(@x, @y); + -moz-transform: translate(@x, @y); + -ms-transform: translate(@x, @y); + -o-transform: translate(@x, @y); + transform: translate(@x, @y); +} + +// Background clipping +// Heads up: FF 3.6 and under need "padding" instead of "padding-box" +.background-clip(@clip) { + -webkit-background-clip: @clip; + -moz-background-clip: @clip; + background-clip: @clip; +} + +// Background sizing +.background-size(@size){ + -webkit-background-size: @size; + -moz-background-size: @size; + -o-background-size: @size; + background-size: @size; +} + + +// Box sizing +.box-sizing(@boxmodel) { + -webkit-box-sizing: @boxmodel; + -moz-box-sizing: @boxmodel; + box-sizing: @boxmodel; +} + +// User select +// For selecting text on the page +.user-select(@select) { + -webkit-user-select: @select; + -moz-user-select: @select; + -o-user-select: @select; + user-select: @select; +} + +// Resize anything +.resizable(@direction: both) { + resize: @direction; // Options: horizontal, vertical, both + overflow: auto; // Safari fix +} + +// CSS3 Content Columns +.content-columns(@columnCount, @columnGap: @gridColumnGutter) { + -webkit-column-count: @columnCount; + -moz-column-count: @columnCount; + column-count: @columnCount; + -webkit-column-gap: @columnGap; + -moz-column-gap: @columnGap; + column-gap: @columnGap; +} + +// Opacity +.opacity(@opacity: 100) { + opacity: @opacity / 100; + filter: e(%("alpha(opacity=%d)", @opacity)); +} + + + +// BACKGROUNDS +// -------------------------------------------------- + +// Add an alphatransparency value to any background or border color (via Elyse Holladay) +#translucent { + .background(@color: @white, @alpha: 1) { + background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); + } + .border(@color: @white, @alpha: 1) { + border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); + .background-clip(padding-box); + } +} + +// Gradient Bar Colors for buttons and alerts +.gradientBar(@primaryColor, @secondaryColor) { + #gradient > .vertical(@primaryColor, @secondaryColor); + border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%); + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); +} + +// Gradients +#gradient { + .horizontal(@startColor: #555, @endColor: #333) { + background-color: @endColor; + background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10 + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(left, @startColor, @endColor); // Le standard + background-repeat: repeat-x; + } + .vertical(@startColor: #555, @endColor: #333) { + background-color: mix(@startColor, @endColor, 60%); + background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10 + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(top, @startColor, @endColor); // The standard + background-repeat: repeat-x; + } + .directional(@startColor: #555, @endColor: #333, @deg: 45deg) { + background-color: @endColor; + background-repeat: repeat-x; + background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10 + background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(@deg, @startColor, @endColor); // The standard + } + .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { + background-color: mix(@midColor, @endColor, 80%); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor); + background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-repeat: no-repeat; + } + .radial(@innerColor: #555, @outerColor: #333) { + background-color: @outsideColor; + background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@centerColor), to(@outsideColor)); + background-image: -webkit-radial-gradient(circle, @centerColor, @outsideColor); + background-image: -moz-radial-gradient(circle, @centerColor, @outsideColor); + background-image: -ms-radial-gradient(circle, @centerColor, @outsideColor); + background-repeat: no-repeat; + // Opera cannot do radial gradients yet + } + .striped(@color, @angle: -45deg) { + background-color: @color; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -ms-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + } +} + + + +// COMPONENT MIXINS +// -------------------------------------------------- + +// POPOVER ARROWS +// ------------------------- +// For tipsies and popovers +#popoverArrow { + .top(@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; + } + .bottom(@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; + } +} diff --git a/less/modals.less b/less/modals.less new file mode 100644 index 000000000..0368e01e1 --- /dev/null +++ b/less/modals.less @@ -0,0 +1,65 @@ +// MODALS +// ------ + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: @zindexModalBackdrop; + background-color: @black; + // Fade for backdrop + &.fade { opacity: 0; } +} + +.modal-backdrop, +.modal-backdrop.fade.in { + .opacity(80); +} + +.modal { + position: fixed; + top: 50%; + left: 50%; + z-index: @zindexModal; + max-height: 500px; + overflow: auto; + width: 560px; + margin: -250px 0 0 -280px; + 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); + &.fade { + .transition(e('opacity .3s linear, top .3s ease-out')); + top: -25%; + } + &.fade.in { top: 50%; } +} +.modal-header { + padding: 5px 15px; + border-bottom: 1px solid #eee; + // Close icon + .close { margin-top: 2px; } +} +.modal-body { + padding: 15px; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + .border-radius(0 0 6px 6px); + .box-shadow(inset 0 1px 0 @white); + .clearfix(); + .btn { + float: right; + margin-left: 5px; + margin-bottom: 0; // account for input[type=submit] which gets the bottom margin like all other inputs + } +} diff --git a/less/navbar.less b/less/navbar.less new file mode 100644 index 000000000..dba95e5cd --- /dev/null +++ b/less/navbar.less @@ -0,0 +1,251 @@ +// NAVBAR (FIXED AND STATIC) +// ------------------------- + + +// 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: @navbarBackground; + #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground); + @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:hover { + color: @white; + text-decoration: none; + } + // 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, + .btn-group { + margin-top: 5px; // make buttons vertically centered in navbar + } + .btn-group .btn { + margin-top: 0; + } +} + +// Navbar forms +.navbar-form { + margin-bottom: 0; // remove default bottom margin + input, + select { + display: inline-block; + margin-bottom: 0; + } +} + +// 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: #444; + background: 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 + .placeholder(@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: @zindexFixedNavbar; +} + + + +// NAVIGATION +// ---------- + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; // redeclare due to specificity +} +.navbar .nav > li { + display: block; + float: left; +} + +// Links +.navbar .nav > li > a { + 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 +.navbar .nav > li > a:hover { + background-color: transparent; + color: @white; + text-decoration: none; +} + +// Active nav items +.navbar .nav .active > a { + color: @white; + text-decoration: none; + background-color: @grayDarker; + background-color: rgba(0,0,0,.5); +} + +// Dividers (basically a vertical hr) +.navbar .vertical-divider { + height: 40px; + width: 1px; + margin: 0 5px; + overflow: hidden; + background-color: @grayDarker; + border-right: 1px solid #444; +} + +// Secondary (floated right) nav in topbar +.navbar .nav.pull-right { + margin-left: 10px; + margin-right: 0; +} + + + +// Dropdown menus +// -------------- + +// Menu position and menu carets +.navbar .dropdown-menu { + margin-top: 1px; + .border-radius(4px); + &:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0,0,0,.2); + position: absolute; + top: -7px; + left: 9px; + } + &:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid @white; + position: absolute; + top: -6px; + left: 10px; + } +} + +// Dropdown toggle caret +.navbar .nav .dropdown-toggle .caret, +.navbar .nav .open.dropdown .caret { + border-top-color: @white; +} +.navbar .nav .active .caret { + .opacity(100); +} + +// Remove background color from open dropdown +.navbar .nav .open > .dropdown-toggle, +.navbar .nav .active > .dropdown-toggle, +.navbar .nav .open.active > .dropdown-toggle { + background-color: transparent; +} + +// Dropdown link on hover +.navbar .nav .active > .dropdown-toggle:hover { + color: @white; +} + +// Right aligned menus need alt position +.navbar .nav.pull-right .dropdown-menu { + right: 0; + &:before { + left: auto; + right: 12px; + } + &:after { + left: auto; + right: 13px; + } +} diff --git a/less/navs.less b/less/navs.less new file mode 100644 index 000000000..cd356d9bb --- /dev/null +++ b/less/navs.less @@ -0,0 +1,338 @@ +// NAVIGATIONS +// ----------- + + + +// BASE CLASS +// ---------- + +.nav { + margin-left: 0; + margin-bottom: @baseLineHeight; + list-style: none; +} + +// Make links block level +.nav > li > a { + display: block; +} +.nav > li > a:hover { + text-decoration: none; + background-color: @grayLighter; +} + + + +// NAV LIST +// -------- + +.nav.list { + padding-left: 14px; + padding-right: 14px; + margin-bottom: 0; +} +.nav.list > li > a, +.nav.list .nav-header { + display: block; + padding: 3px 15px; + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255,255,255,.5); +} +.nav.list .nav-header { + font-size: 11px; + font-weight: bold; + line-height: @baseLineHeight; + color: @grayLight; + text-transform: uppercase; +} +.nav.list > li + .nav-header { + margin-top: 9px; +} +.nav.list .active > a { + color: @white; + text-shadow: 0 -1px 0 rgba(0,0,0,.2); + background-color: @linkColor; +} + + + +// TABS AND PILLS +// ------------- + +// Common styles +.tabs, +.pills { + .clearfix(); +} +.tabs > li, +.pills > li { + float: left; +} +.tabs > li > a, +.pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; // keeps the overall height an even number +} + +// TABS +// ---- + +// Give the tabs something to sit on +.tabs { + border-bottom: 1px solid #ddd; +} + +// Make the list-items overlay the bottom border +.tabs > li { + margin-bottom: -1px; +} + +// Actual tabs (as links) +.tabs > li > a { + padding-top: 9px; + padding-bottom: 9px; + border: 1px solid transparent; + .border-radius(4px 4px 0 0); + &:hover { + border-color: @grayLighter @grayLighter #ddd; + } +} +// Active state, and it's :hover to override normal :hover +.tabs > .active > a, +.tabs > .active > a:hover { + color: @gray; + background-color: @white; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} + +// PILLS +// ----- + +// Links rendered as pills +.pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + .border-radius(5px); +} + +// Active state +.pills .active > a, +.pills .active > a:hover { + color: @white; + background-color: @linkColor; +} + + + +// STACKED NAV +// ----------- + +// Stacked tabs and pills +.nav.stacked > li { + float: none; +} +.nav.stacked > li > a { + margin-right: 0; // no need for the gap between nav items +} + +// Tabs +.tabs.stacked { + border-bottom: 0; +} +.tabs.stacked > li > a { + border: 1px solid #ddd; + .border-radius(0); +} +.tabs.stacked > li:first-child > a { + .border-radius(4px 4px 0 0); +} +.tabs.stacked > li:last-child > a { + .border-radius(0 0 4px 4px); +} +.tabs.stacked > li > a:hover { + border-color: #ddd; + z-index: 2; +} + +// Pills +.pills.stacked > li > a { + margin-bottom: 3px; +} +.pills.stacked > li:last-child > a { + margin-bottom: 1px; // decrease margin to match sizing of stacked tabs +} + + + +// DROPDOWNS +// --------- + +// Position the menu +.pills .dropdown-menu, +.tabs .dropdown-menu { + margin-top: 1px; + border-width: 1px; +} +.pills .dropdown-menu { + .border-radius(4px); +} + +// Default dropdown links +// ------------------------- +// Make carets use linkColor to start +.tabs .dropdown-toggle .caret, +.pills .dropdown-toggle .caret { + border-top-color: @linkColor; + margin-top: 6px; +} +.tabs .dropdown-toggle:hover .caret, +.pills .dropdown-toggle:hover .caret { + border-top-color: @linkColorHover; +} + +// Active dropdown links +// ------------------------- +.tabs .active .dropdown-toggle .caret, +.pills .active .dropdown-toggle .caret { + border-top-color: @grayDark; +} + +// Active:hover dropdown links +// ------------------------- +.nav > .dropdown.active > a:hover { + color: @black; + cursor: pointer; +} + +// Open dropdowns +// ------------------------- +.tabs .open .dropdown-toggle, +.pills .open .dropdown-toggle, +.nav > .open.active > a:hover { + color: @white; + background-color: @grayLight; + border-color: @grayLight; +} +.nav .open .caret, +.nav .open.active .caret, +.nav .open a:hover .caret { + border-top-color: @white; + .opacity(100); +} + +// Dropdowns in stacked tabs +.tabs.stacked .open > a:hover { + border-color: @grayLight; +} + + + +// TABBABLE +// -------- + + +// COMMON STYLES +// ------------- + +// Clear any floats +.tabbable { + .clearfix(); +} + +// Remove border on bottom, left, right +.tabs-below .tabs, +.tabs-right .tabs, +.tabs-left .tabs { + border-bottom: 0; +} + +// Show/hide tabbable areas +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} + + +// BOTTOM +// ------ + +.tabs-below .tabs { + border-top: 1px solid #ddd; +} +.tabs-below .tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below .tabs > li > a { + .border-radius(0 0 4px 4px); + &:hover { + border-bottom-color: transparent; + border-top-color: #ddd; + } +} +.tabs-below .tabs .active > a, +.tabs-below .tabs .active > a:hover { + border-color: transparent #ddd #ddd #ddd; +} + +// LEFT & RIGHT +// ------------ + +// Common styles +.tabs-left .tabs > li, +.tabs-right .tabs > li { + float: none; +} +.tabs-left .tabs > li > a, +.tabs-right .tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +// Tabs on the left +.tabs-left .tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left .tabs > li > a { + margin-right: -1px; + .border-radius(4px 0 0 4px); +} +.tabs-left .tabs > li > a:hover { + border-color: @grayLighter #ddd @grayLighter @grayLighter; +} +.tabs-left .tabs .active > a, +.tabs-left .tabs .active > a:hover { + border-color: #ddd transparent #ddd #ddd; +} + +// Tabs on the right +.tabs-right .tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right .tabs > li > a { + margin-left: -1px; + .border-radius(0 4px 4px 0); +} +.tabs-right .tabs > li > a:hover { + border-color: @grayLighter @grayLighter @grayLighter #ddd; +} +.tabs-right .tabs .active > a, +.tabs-right .tabs .active > a:hover { + border-color: #ddd #ddd #ddd transparent; +} diff --git a/less/pager.less b/less/pager.less new file mode 100644 index 000000000..de009afda --- /dev/null +++ b/less/pager.less @@ -0,0 +1,25 @@ +// PAGER +// ----- + +.pager { + margin-left: 0; + margin-bottom: @baseLineHeight; + list-style: none; + text-align: center; + .clearfix(); +} +.pager li { + display: inline; +} +.pager a { + display: inline-block; + padding: 6px 15px; + background-color: #f5f5f5; + .border-radius(15px); +} +.pager .next a { + float: right; +} +.pager .previous a { + float: left; +} diff --git a/less/pagination.less b/less/pagination.less new file mode 100644 index 000000000..8ecb2a401 --- /dev/null +++ b/less/pagination.less @@ -0,0 +1,54 @@ +// PAGINATION +// ---------- + +.pagination { + height: @baseLineHeight * 2; + margin: @baseLineHeight 0; + } +.pagination ul { + display: inline-block; + .ie7-inline-block(); + margin-left: 0; + margin-bottom: 0; + .border-radius(3px); + .box-shadow(0 1px 2px rgba(0,0,0,.05)); +} +.pagination li { + display: inline; + } +.pagination a { + float: left; + padding: 0 14px; + line-height: (@baseLineHeight * 2) - 2; + text-decoration: none; + border: 1px solid #ddd; + border-left-width: 0; +} +.pagination a:hover, +.pagination .active a { + background-color: #f5f5f5; +} +.pagination .active a { + color: @grayLight; +} +.pagination .disabled a, +.pagination .disabled a:hover { + color: @grayLight; + background-color: transparent; + cursor: default; +} +.pagination li:first-child a { + border-left-width: 1px; + .border-radius(3px 0 0 3px); +} +.pagination li:last-child a { + .border-radius(0 3px 3px 0); +} + +// Centered +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} diff --git a/less/patterns.less b/less/patterns.less new file mode 100644 index 000000000..d94b921e4 --- /dev/null +++ b/less/patterns.less @@ -0,0 +1,13 @@ +// 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; +} diff --git a/less/popovers.less b/less/popovers.less new file mode 100644 index 000000000..6de314d86 --- /dev/null +++ b/less/popovers.less @@ -0,0 +1,49 @@ +// POPOVERS +// -------- + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: @zindexPopover; + display: none; + padding: 5px; + &.top { margin-top: -5px; } + &.right { margin-left: 5px; } + &.bottom { margin-top: 5px; } + &.left { margin-left: -5px; } + &.top .arrow { #popoverArrow > .top(); } + &.right .arrow { #popoverArrow > .right(); } + &.bottom .arrow { #popoverArrow > .bottom(); } + &.left .arrow { #popoverArrow > .left(); } + .arrow { + position: absolute; + width: 0; + height: 0; + } + .inner { + padding: 3px; + width: 280px; + overflow: hidden; + background: @black; // has to be full background declaration for IE fallback + background: rgba(0,0,0,.8); + .border-radius(6px); + .box-shadow(0 3px 7px rgba(0,0,0,0.3)); + } + .title { + padding: 9px 15px; + line-height: 1; + background-color: #f5f5f5; + border-bottom:1px solid #eee; + .border-radius(3px 3px 0 0); + } + .content { + padding: 14px; + background-color: @white; + .border-radius(0 0 3px 3px); + .background-clip(padding-box); + p, ul, ol { + margin-bottom: 0; + } + } +} \ No newline at end of file diff --git a/less/print.less b/less/print.less new file mode 100644 index 000000000..4fd45e282 --- /dev/null +++ b/less/print.less @@ -0,0 +1,18 @@ +/*! + * Bootstrap @VERSION for Print + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Date: @DATE + */ + + +// HIDE UNECESSARY COMPONENTS +// -------------------------- + +.navbar-fixed { + display: none; +} \ No newline at end of file diff --git a/less/progress-bars.less b/less/progress-bars.less new file mode 100644 index 000000000..ff754b817 --- /dev/null +++ b/less/progress-bars.less @@ -0,0 +1,99 @@ +// PROGRESS BARS +// ------------- + + +// ANIMATIONS +// ---------- + +// Webkit +@-webkit-keyframes progress-bar-stripes { + from { background-position: 0 0; } + to { background-position: 40px 0; } +} + +// Temporarily commented out since LESS won't compile with this +// @-moz-keyframes progress-bar-stripes { +// from { background-position: 0 0; } +// to { background-position: 40px 0; } +// } + +// Spec +@keyframes progress-bar-stripes { + from { background-position: 0 0; } + to { background-position: 40px 0; } +} + + + +// THE BARS +// -------- + +// Common styles +.progress, +.progress .bar { + .border-radius(4px); +} + +// Outer container +.progress { + height: 18px; + margin-bottom: 18px; + #gradient > .vertical(#f5f5f5, #f9f9f9); + .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); +} + +// Bar of progress +.progress .bar { + width: 0%; + height: 18px; + color: @white; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + #gradient > .vertical(#149bdf, #0480be); + .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); + .box-sizing(border-box); + .transition(width .6s ease); +} + +// Striped bars +.progress.striped .bar { + #gradient > .striped(#62c462); + .background-size(40px 40px); +} + +// Call animation for the active one +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + + + +// COLORS +// ------ + +// Danger (red) +.progress.danger .bar { + #gradient > .vertical(#ee5f5b, #c43c35); +} +.progress.danger.striped .bar { + #gradient > .striped(#ee5f5b); +} + +// Success (green) +.progress.success .bar { + #gradient > .vertical(#62c462, #57a957); +} +.progress.success.striped .bar { + #gradient > .striped(#62c462); +} + +// Info (teal) +.progress.info .bar { + #gradient > .vertical(#5bc0de, #339bb9); +} +.progress.info.striped .bar { + #gradient > .striped(#5bc0de); +} diff --git a/less/reset.less b/less/reset.less new file mode 100644 index 000000000..ef4dc8af6 --- /dev/null +++ b/less/reset.less @@ -0,0 +1,126 @@ +// Reset.less +// Adapted from Normalize.css http://github.com/necolas/normalize.css +// ------------------------------------------------------------------------ + +// Display in IE6-9 and FF3 +// ------------------------- + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +// Display block in IE6-9 and FF3 +// ------------------------- + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +// Prevents modern browsers from displaying 'audio' without controls +// ------------------------- + +audio:not([controls]) { + display: none; +} + +// Base settings +// ------------------------- + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +// Focus states +a:focus { + outline: thin dotted; +} +// Hover & Active +a:hover, +a:active { + outline: 0; +} + +// Prevents sub and sup affecting line-height in all browsers +// ------------------------- + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} + +// Img border in a's and image quality +// ------------------------- + +img { + max-width: 100%; + height: auto; + border: 0; + -ms-interpolation-mode: bicubic; +} + +// Forms +// ------------------------- + +// Font size in all browsers, margin changes, misc consistency +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; // Inner spacing ie IE6/7 + line-height: normal; // FF3/4 have !important on line-height in UA stylesheet +} +button::-moz-focus-inner, +input::-moz-focus-inner { // Inner padding and border oddities in FF3/4 + padding: 0; + border: 0; +} +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; // Cursors on all buttons applied consistently + -webkit-appearance: button; // Style clicable inputs in iOS +} +input[type="search"] { // Appearance in Safari/Chrome + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5 +} +textarea { + overflow: auto; // Remove vertical scrollbar in IE6-9 + vertical-align: top; // Readability and alignment cross-browser +} diff --git a/less/responsive.less b/less/responsive.less new file mode 100644 index 000000000..2999eef4d --- /dev/null +++ b/less/responsive.less @@ -0,0 +1,268 @@ +// Responsive.less +// For phone and tablet devices +// ------------------------------------------------------------- + + +// REPEAT VARIABLES & MIXINS +// ------------------------- +// Required since we compile the responsive stuff separately + +@import "variables.less"; // Modify this for custom colors, font-sizes, etc +@import "mixins.less"; + + +// RESPONSIVE CLASSES +// ------------------ + +// Hide from screenreaders and browsers +// Credit: HTML5BP +.hidden { + display: none; + visibility: hidden; +} + + +// UP TO LANDSCAPE PHONE +// --------------------- + +@media (max-width: 480px) { + + // Make the nav work for small devices + .navbar { + .nav { + position: absolute; + top: 0; + left: 0; + width: 180px; + padding-top: 40px; + list-style: none; + } + .nav, + .nav > li:last-child a { + .border-radius(0 0 4px 0); + } + .nav > li { + float: none; + display: none; + } + .nav > li > a { + float: none; + background-color: #222; + } + .nav > .active { + display: block; + position: absolute; + top: 0; + left: 0; + } + .nav > .active > a { + background-color: transparent; + } + .nav > .active > a:hover { + background-color: #333; + } + .nav > .active > a: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(100); + content: "↓"; + } + .nav:hover > li { + display: block; + } + .nav:hover > li > a:hover { + background-color: #333; + } + } + + // Remove the horizontal form styles + .form-horizontal .control-group > label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + // Move over all input controls and content + .form-horizontal .controls { + margin-left: 0; + } + // Move the options list down to align with labels + .form-horizontal .control-list { + padding-top: 0; // has to be padding because margin collaspes + } + // Move over buttons in .form-actions to align with .controls + .form-horizontal .form-actions { + padding-left: 0; + } + + // Modals + .modal { + position: absolute; + top: 20px; + left: 20px; + right: 20px; + width: auto; + margin: 0; + &.fade.in { top: auto; } + } + .modal-header .close { + padding: 10px; + } + +} + + +// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET +// -------------------------------------------------- + +@media (max-width: 768px) { + + // Unfix the navbar + .navbar-fixed { + position: absolute; + } + .navbar-fixed .nav { + float: none; + } + + // Remove width from containers + .container { + width: auto; + padding: 0 20px; + } + // Undo negative margin on rows + .row { + margin-left: 0; + } + // Make all columns even + .row > [class*="span"] { + float: none; + display: block; + width: auto; + margin: 0; + } + +} + + +// PORTRAIT TABLET TO DEFAULT DESKTOP +// ---------------------------------- + +@media (min-width: 768px) and (max-width: 940px) { + + // Reset grid variables + @gridColumns: 16; + @gridColumnWidth: 44px; + @gridGutterWidth: 20px; + @siteWidth: 748px; + + // Bring grid mixins to recalculate widths + .columns(@columns: 1) { + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + } + .offset(@columns: 1) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); + } + + // 16cols at 30px wide with 16px gutters + .container { + width: @siteWidth; + } + + // Default columns + .span1 { .columns(1); } + .span2 { .columns(2); } + .span3 { .columns(3); } + .span4 { .columns(4); } + .span5 { .columns(5); } + .span6 { .columns(6); } + .span7 { .columns(7); } + .span8 { .columns(8); } + .span9 { .columns(9); } + .span10 { .columns(10); } + .span11 { .columns(11); } + .span12 { .columns(12); } + + // Offset column options + .offset1 { .offset(1); } + .offset2 { .offset(2); } + .offset3 { .offset(3); } + .offset4 { .offset(4); } + .offset5 { .offset(5); } + .offset6 { .offset(6); } + .offset7 { .offset(7); } + .offset8 { .offset(8); } + .offset9 { .offset(9); } + .offset10 { .offset(10); } + .offset11 { .offset(11); } + .offset12 { .offset(12); } + +} + +// LARGE DESKTOP & UP +// ------------------ +/* +@media (min-width: 1210px) { + + // Reset grid variables + @gridColumns: 12; + @gridColumnWidth: 70px; + @gridGutterWidth: 30px; + @siteWidth: 1170px; + + // Bring grid mixins to recalculate widths + .columns(@columns: 1) { + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + } + .offset(@columns: 1) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); + } + + .container { + width: @siteWidth; + } + .row { + margin-left: @gridGutterWidth * -1; + } + [class*="span"] { + margin-left: @gridGutterWidth; + } + + // Default columns + .span1 { .columns(1); } + .span2 { .columns(2); } + .span3 { .columns(3); } + .span4 { .columns(4); } + .span5 { .columns(5); } + .span6 { .columns(6); } + .span7 { .columns(7); } + .span8 { .columns(8); } + .span9 { .columns(9); } + .span10 { .columns(10); } + .span11 { .columns(11); } + .span12 { .columns(12); } + + // Offset column options + .offset1 { .offset(1); } + .offset2 { .offset(2); } + .offset3 { .offset(3); } + .offset4 { .offset(4); } + .offset5 { .offset(5); } + .offset6 { .offset(6); } + .offset7 { .offset(7); } + .offset8 { .offset(8); } + .offset9 { .offset(9); } + .offset10 { .offset(10); } + .offset11 { .offset(11); } + .offset12 { .offset(12); } + +} +*/ \ No newline at end of file diff --git a/less/scaffolding.less b/less/scaffolding.less new file mode 100644 index 000000000..3c1826830 --- /dev/null +++ b/less/scaffolding.less @@ -0,0 +1,29 @@ +// Scaffolding +// Basic and global styles for generating a grid system, structural layout, and page templates +// ------------------------------------------------------------------------------------------- + + +// STRUCTURAL LAYOUT +// ----------------- + +body { + margin: 0; + font-family: @baseFontFamily; + font-size: @baseFontSize; + line-height: @baseLineHeight; + color: @gray; + background-color: @white; +} + + +// LINKS +// ----- + +a { + color: @linkColor; + text-decoration: none; + &:hover { + color: @linkColorHover; + text-decoration: underline; + } +} diff --git a/less/sprites.less b/less/sprites.less new file mode 100644 index 000000000..c3b420665 --- /dev/null +++ b/less/sprites.less @@ -0,0 +1,121 @@ +// SPRITES +// Glyphs and icons for buttons, nav, and more +// ------------------------------------------- + + +// ICONS +// ----- + +// As of v2.0.0, the tag is reserved for icons from the Glyphicons set. +// All icons receive the styles of the tag and are then given a unique +// class to add width, height, and background-position. Your resulting HTML +// will look like . + +.icon { + background-image: url(img/glyphicons-halflings-sprite.png); + background-position: 0 0; + background-repeat: no-repeat; + display: inline-block; + vertical-align: text-top; + width: 14px; + height: 14px; +} +.icon.white { + background-image: url(img/glyphicons-halflings-sprite-white.png); +} + +.icon.glass { background-position: 0 0; } +.icon.music { background-position: -24px 0; } +.icon.search { background-position: -48px 0; } +.icon.envelope { background-position: -72px 0; } +.icon.heart { background-position: -96px 0; } +.icon.star { background-position: -120px 0; } +.icon.star-empty { background-position: -144px 0; } +.icon.user { background-position: -168px 0; } +.icon.film { background-position: -192px 0; } +.icon.th-large { background-position: -216px 0; } +.icon.th { background-position: -240px 0; } +.icon.th-list { background-position: -264px 0; } +.icon.ok { background-position: -288px 0; } +.icon.remove { background-position: -312px 0; } +.icon.zoom-in { background-position: -336px 0; } +.icon.zoom-out { background-position: -360px 0; } +.icon.off { background-position: -384px 0; } +.icon.signal { background-position: -408px 0; } +.icon.cog { background-position: -432px 0; } +.icon.trash { background-position: -456px 0; } + +.icon.home { background-position: 0 -24px; } +.icon.file { background-position: -24px -24px; } +.icon.time { background-position: -48px -24px; } +.icon.road { background-position: -72px -24px; } +.icon.download-alt { background-position: -96px -24px; } +.icon.download { background-position: -120px -24px; } +.icon.upload { background-position: -144px -24px; } +.icon.inbox { background-position: -168px -24px; } +.icon.play-circle { background-position: -192px -24px; } +.icon.repeat { background-position: -216px -24px; } +.icon.refresh { background-position: -240px -24px; } +.icon.calendar { background-position: -264px -24px; } +.icon.lock { background-position: -288px -24px; } +.icon.flag { background-position: -312px -24px; } +.icon.headphones { background-position: -336px -24px; } +.icon.volume-off { background-position: -360px -24px; } +.icon.volume-down { background-position: -384px -24px; } +.icon.volume-up { background-position: -408px -24px; } +.icon.qrcode { background-position: -432px -24px; } +.icon.barcode { background-position: -456px -24px; } + +.icon.tag { background-position: 0 -48px; } +.icon.tags { background-position: -24px -48px; } +.icon.book { background-position: -48px -48px; } +.icon.bookmark { background-position: -72px -48px; } +.icon.print { background-position: -96px -48px; } +.icon.camera { background-position: -120px -48px; } +.icon.font { background-position: -144px -48px; } +.icon.bold { background-position: -168px -48px; } +.icon.italic { background-position: -192px -48px; } +.icon.text-height { background-position: -216px -48px; } +.icon.text-width { background-position: -240px -48px; } +.icon.align-left { background-position: -264px -48px; } +.icon.align-center { background-position: -288px -48px; } +.icon.align-right { background-position: -312px -48px; } +.icon.align-justify { background-position: -336px -48px; } +.icon.list { background-position: -360px -48px; } +.icon.indent-left { background-position: -384px -48px; } +.icon.indent-right { background-position: -408px -48px; } +.icon.facetime-video { background-position: -432px -48px; } +.icon.picture { background-position: -456px -48px; } + +.icon.pencil { background-position: 0 -72px; } +.icon.map-marker { background-position: -24px -72px; } +.icon.adjust { background-position: -48px -72px; } +.icon.tint { background-position: -72px -72px; } +.icon.edit { background-position: -96px -72px; } +.icon.share { background-position: -120px -72px; } +.icon.check { background-position: -144px -72px; } +.icon.move { background-position: -168px -72px; } +.icon.step-backward { background-position: -192px -72px; } +.icon.fast-backward { background-position: -216px -72px; } +.icon.backward { background-position: -240px -72px; } +.icon.play { background-position: -264px -72px; } +.icon.pause { background-position: -288px -72px; } +.icon.stop { background-position: -312px -72px; } +.icon.forward { background-position: -336px -72px; } +.icon.fast-forward { background-position: -360px -72px; } +.icon.step-forward { background-position: -384px -72px; } +.icon.eject { background-position: -408px -72px; } +.icon.chevron-left { background-position: -432px -72px; } +.icon.chevron-right { background-position: -456px -72px; } + +.icon.arrow-left { background-position: -240px -96px; } +.icon.arrow-right { background-position: -264px -96px; } +.icon.arrow-up { background-position: -288px -96px; } +.icon.arrow-down { background-position: -312px -96px; } +.icon.share-alt { background-position: -336px -96px; } +.icon.resize-full { background-position: -360px -96px; } +.icon.resize-small { background-position: -384px -96px; } +.icon.plus { background-position: -408px -96px; } +.icon.minus { background-position: -432px -96px; } +.icon.asterisk { background-position: -456px -96px; } + diff --git a/less/tables.less b/less/tables.less new file mode 100644 index 000000000..809c2f60e --- /dev/null +++ b/less/tables.less @@ -0,0 +1,138 @@ +// +// Tables.less +// Tables for, you guessed it, tabular data +// ---------------------------------------- + + +// BASE TABLES +// ----------------- + +table { + max-width: 100%; + border-collapse: collapse; + border-spacing: 0; +} + +// BASELINE STYLES +// --------------- + +.table { + width: 100%; + margin-bottom: @baseLineHeight; + // Cells + th, + td { + padding: 8px; + line-height: @baseLineHeight; + text-align: left; + border-top: 1px solid #ddd; + } + th { + font-weight: bold; + vertical-align: bottom; + } + td { + vertical-align: top; + } + // Remove top border from thead by default + thead:first-child tr th, + thead:first-child tr td { + border-top: 0; + } + // Account for multiple tbody instances + tbody + tbody { + border-top: 2px solid #ddd; + } +} + + + +// CONDENSED TABLE W/ HALF PADDING +// ------------------------------- + +.table-condensed { + th, + td { + padding: 4px 5px; + } +} + + +// BORDERED VERSION +// ---------------- + +.table-bordered { + border: 1px solid #ddd; + border-collapse: separate; // Done so we can round those corners! + .border-radius(4px); + th + th, + td + td, + th + td, + td + th { + border-left: 1px solid #ddd; + } + // Prevent a double border + thead:first-child tr:first-child th, + tbody:first-child tr:first-child th, + tbody:first-child tr:first-child td { + border-top: 0; + } + // For first th or td in the first row in the first thead or tbody + thead:first-child tr:first-child th:first-child, + tbody:first-child tr:first-child td:first-child { + .border-radius(4px 0 0 0); + } + thead:first-child tr:first-child th:last-child, + tbody:first-child tr:first-child td:last-child { + .border-radius(0 4px 0 0); + } + // For first th or td in the first row in the first thead or tbody + thead:last-child tr:last-child th:first-child, + tbody:last-child tr:last-child td:first-child { + .border-radius(0 0 0 4px); + } + thead:last-child tr:last-child th:last-child, + tbody:last-child tr:last-child td:last-child { + .border-radius(0 0 4px 0); + } +} + + +// ZEBRA-STRIPING +// -------------- + +// Default zebra-stripe styles (alternating gray and transparent backgrounds) +.table-striped { + tbody { + tr:nth-child(odd) td, + tr:nth-child(odd) th { + background-color: #f9f9f9; + } + } +} + + + +// TABLE CELL SIZING +// ----------------- + +// Change the columns +.tableColumns(@columnSpan: 1) { + float: none; + width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; + margin-left: 0; +} +table { + .span1 { .tableColumns(1); } + .span2 { .tableColumns(2); } + .span3 { .tableColumns(3); } + .span4 { .tableColumns(4); } + .span5 { .tableColumns(5); } + .span6 { .tableColumns(6); } + .span7 { .tableColumns(7); } + .span8 { .tableColumns(8); } + .span9 { .tableColumns(9); } + .span10 { .tableColumns(10); } + .span11 { .tableColumns(11); } + .span12 { .tableColumns(12); } +} diff --git a/less/thumbnails.less b/less/thumbnails.less new file mode 100644 index 000000000..0ba749059 --- /dev/null +++ b/less/thumbnails.less @@ -0,0 +1,33 @@ +// THUMBNAILS +// ---------- + +.thumbnails { + margin-left: -20px; + list-style: none; + .clearfix(); +} +.thumbnails > li { + float: left; + margin: 0 0 @baseLineHeight 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 1; + border: 1px solid #ddd; + .border-radius(4px); + .box-shadow(0 1px 1px rgba(0,0,0,.075)); +} +// Add a hover state for linked versions only +a.thumbnail:hover { + border-color: @linkColor; + .box-shadow(0 1px 4px rgba(0,105,214,.25)); +} +// Images and captions +.thumbnail > img { + display: block; + max-width: 100%; +} +.thumbnail .caption { + padding: 9px; +} diff --git a/less/tooltip.less b/less/tooltip.less new file mode 100644 index 000000000..5111a193f --- /dev/null +++ b/less/tooltip.less @@ -0,0 +1,35 @@ +// TOOLTIP +// ------= + +.tooltip { + position: absolute; + z-index: @zindexTooltip; + display: block; + visibility: visible; + padding: 5px; + font-size: 11px; + .opacity(0); + &.in { .opacity(80); } + &.top { margin-top: -2px; } + &.right { margin-left: 2px; } + &.bottom { margin-top: 2px; } + &.left { margin-left: -2px; } + &.top .tooltip-arrow { #popoverArrow > .top(); } + &.left .tooltip-arrow { #popoverArrow > .left(); } + &.bottom .tooltip-arrow { #popoverArrow > .bottom(); } + &.right .tooltip-arrow { #popoverArrow > .right(); } +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: @white; + text-align: center; + text-decoration: none; + background-color: @black; + .border-radius(4px); +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; +} diff --git a/less/type.less b/less/type.less new file mode 100644 index 000000000..087224fd0 --- /dev/null +++ b/less/type.less @@ -0,0 +1,206 @@ +// Typography.less +// Headings, body text, lists, code, and more for a versatile and durable typography system +// ---------------------------------------------------------------------------------------- + + +// BODY TEXT +// --------- + +p { + margin: 0 0 @baseLineHeight / 2; + font-family: @baseFontFamily; + font-size: @baseFontSize; + line-height: @baseLineHeight; + small { + font-size: @baseFontSize - 2; + color: @grayLight; + } +} +.lead { + margin-bottom: @baseLineHeight; + font-size: 20px; + font-weight: 200; + line-height: @baseLineHeight * 1.5; +} + +// HEADINGS +// -------- + +h1, h2, h3, h4, h5, h6 { + margin: 0; + font-weight: bold; + color: @grayDark; + text-rendering: optimizelegibility; // Fix the character spacing for headings + small { + font-weight: normal; + color: @grayLight; + } +} +h1 { + font-size: 30px; + line-height: @baseLineHeight * 2; + small { + font-size: 18px; + } +} +h2 { + font-size: 24px; + line-height: @baseLineHeight * 2; + small { + font-size: 18px; + } +} +h3 { + line-height: @baseLineHeight * 1.5; + font-size: 18px; + small { + font-size: 14px; + } +} +h4, h5, h6 { + line-height: @baseLineHeight; +} +h4 { + font-size: 14px; + small { + font-size: 12px; + } +} +h5 { + font-size: 12px; +} +h6 { + font-size: 11px; + color: @grayLight; + text-transform: uppercase; +} + + +// LISTS +// ----- + +// Unordered and Ordered lists +ul, ol { + padding: 0; + margin: 0 0 @baseLineHeight / 2 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +ul { + list-style: disc; +} +ol { + list-style: decimal; +} +li { + line-height: @baseLineHeight; +} +ul.unstyled { + margin-left: 0; + list-style: none; +} + +// Description Lists +dl { + margin-bottom: @baseLineHeight; +} +dt, +dd { + line-height: @baseLineHeight; +} +dt { + font-weight: bold; +} +dd { + margin-left: @baseLineHeight / 2; +} + +// MISC +// ---- + +// Horizontal rules +hr { + margin: @baseLineHeight 0; + border: 0; + border-top: 1px solid #e5e5e5; + border-bottom: 1px solid @white; +} + +// Emphasis +strong { + font-weight: bold; +} +em { + font-style: italic; +} +.muted { + color: @grayLight; +} + +// Abbreviations and acronyms +abbr { + font-size: 90%; + text-transform: uppercase; + border-bottom: 1px dotted #ddd; + cursor: help; +} + +// Blockquotes +blockquote { + padding: 0 0 0 15px; + margin: 0 0 @baseLineHeight; + border-left: 5px solid @grayLighter; + p { + margin-bottom: 0; + #font > .shorthand(16px,300,@baseLineHeight * 1.25); + } + small { + display: block; + line-height: @baseLineHeight; + color: @grayLight; + &:before { + content: '\2014 \00A0'; + } + } + + // Float right with text-align: right + &.pull-right { + float: right; + padding-left: 0; + padding-right: 15px; + border-left: 0; + border-right: 5px solid @grayLighter; + p, + small { + text-align: right; + } + } +} + +// Quotes +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +// Addresses +address { + display: block; + margin-bottom: @baseLineHeight; + line-height: @baseLineHeight; + font-style: normal; +} + +// Misc +small { + font-size: 100%; +} +cite { + font-style: normal; +} diff --git a/less/utilities.less b/less/utilities.less new file mode 100644 index 000000000..d60d22031 --- /dev/null +++ b/less/utilities.less @@ -0,0 +1,23 @@ +// UTILITY CLASSES +// --------------- + +// Quick floats +.pull-right { + float: right; +} +.pull-left { + float: left; +} + +// Toggling content +.hide { + display: none; +} +.show { + display: block; +} + +// Visibility +.invisible { + visibility: hidden; +} diff --git a/less/variables.less b/less/variables.less new file mode 100644 index 000000000..5ed896cc0 --- /dev/null +++ b/less/variables.less @@ -0,0 +1,90 @@ +// Variables.less +// Variables to customize the look and feel of Bootstrap +// ----------------------------------------------------- + + + +// GLOBAL VALUES +// -------------------------------------------------- + +// Links +@linkColor: #08c; +@linkColorHover: darken(@linkColor, 15%); + +// Grays +@black: #000; +@grayDarker: #222; +@grayDark: #333; +@gray: #555; +@grayLight: #999; +@grayLighter: #eee; +@white: #fff; + +// Accent colors +@blue: #049cdb; +@blueDark: #0064cd; +@green: #46a546; +@red: #9d261d; +@yellow: #ffc40d; +@orange: #f89406; +@pink: #c3325f; +@purple: #7a43b6; + +// Grid system +// Modify the grid styles in mixins.less +@gridColumns: 12; +@gridColumnWidth: 60px; +@gridGutterWidth: 20px; +@siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); +// Fluid width sidebar +@fluidSidebarWidth: 220px; + +// Typography +@baseFontSize: 13px; +@baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; +@baseLineHeight: 18px; + +// Buttons +@primaryButtonBackground: @linkColor; + + + +// COMPONENT VARIABLES +// -------------------------------------------------- + +// Z-index master list +// Used for a bird's eye view of components dependent on the z-axis +// Try to avoid customizing these :) +@zindexDropdown: 1000; +@zindexPopover: 1010; +@zindexTooltip: 1020; +@zindexFixedNavbar: 1030; +@zindexModalBackdrop: 1040; +@zindexModal: 1050; + +// Input placeholder text color +@placeholderText: @grayLight; + +// Navbar +@navbarHeight: 40px; +@navbarBackground: @grayDarker; +@navbarBackgroundHighlight: @grayDark; + +// Form states and alerts +@warningText: #c09853; +@warningBackground: #fcf8e3; +@warningBorder: #f3edd2; + +@errorText: #b94a48; +@errorBackground: #f2dede; +@errorBorder: #e9c7c7; + +@successText: #468847; +@successBackground: #dff0d8; +@successBorder: #cfe8c4; + +@infoText: #3a87ad; +@infoBackground: #d9edf7; +@infoBorder: #bfe1f2; + + diff --git a/less/wells.less b/less/wells.less new file mode 100644 index 000000000..244b8ca10 --- /dev/null +++ b/less/wells.less @@ -0,0 +1,17 @@ +// 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); + } +} -- cgit v1.2.3 From 815a2ae9f26f49137382fd4b186d174c7b1b8c5b Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 26 Jan 2012 22:39:17 -0800 Subject: rebuild + copy images to docs when making --- less/sprites.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/sprites.less b/less/sprites.less index c3b420665..599434b2b 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -12,7 +12,7 @@ // will look like . .icon { - background-image: url(img/glyphicons-halflings-sprite.png); + background-image: url(../img/glyphicons-halflings-sprite.png); background-position: 0 0; background-repeat: no-repeat; display: inline-block; @@ -21,7 +21,7 @@ height: 14px; } .icon.white { - background-image: url(img/glyphicons-halflings-sprite-white.png); + background-image: url(../img/glyphicons-halflings-sprite-white.png); } .icon.glass { background-position: 0 0; } -- cgit v1.2.3 From 942d1b459568acb9f66525f8f6316a252a199e02 Mon Sep 17 00:00:00 2001 From: Burak Tuyan Date: Fri, 27 Jan 2012 16:33:18 +0200 Subject: Updating to latest version of Glyphicons Halflings set (v.1.5) along with some icon enhancements like: - Updated the Gylphicons Halflings set to version 1.5 (30 new icons) - Optimized the sprite PNG files for minimum filesize without any quality loss - Made some fixes for horizontal alignment at the LESS/CSS level (tags, bold, arrow-up, minus, chevron-down) - Made some fixes for vertical alignment at the LESS/CSS level (chevron-down, resize-vertical, resize-horizontal) - Renamed the old "calendar" class as "list-alt" class (because now we've a real calendar icon) - Changed the "background-position" of the icon class to "14px 14px", so that a wrong class name will not be showing the glass icon and instead will show a blank icon (which is useful for just positioning the text after the icons in some cases) - Added new icons (classes) to the base-css Docs (to both HTML file and Mustache template) - Changed one of the button examples to danger style and used a white icon - Renamed the sprite image files to save a few bytes here and there (from glyphicons-halflings-sprite.png to lyphicons-halflings.png and from glyphicons-halflings-sprite-white.png to glyphicons-halflings-white.png) --- less/sprites.less | 54 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 11 deletions(-) (limited to 'less') diff --git a/less/sprites.less b/less/sprites.less index 599434b2b..c7cdc1710 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -7,13 +7,15 @@ // ----- // As of v2.0.0, the tag is reserved for icons from the Glyphicons set. -// All icons receive the styles of the tag and are then given a unique -// class to add width, height, and background-position. Your resulting HTML -// will look like . +// All icons receive the styles of the tag with a base class of .icon +// and are then given a unique class to add width, height, and +// background-position. Your resulting HTML will look like this: +// . And for the white version of the icons, just +// add the .white class like this: .icon { - background-image: url(../img/glyphicons-halflings-sprite.png); - background-position: 0 0; + background-image: url(../img/glyphicons-halflings.png); + background-position: 14px 14px; background-repeat: no-repeat; display: inline-block; vertical-align: text-top; @@ -21,7 +23,7 @@ height: 14px; } .icon.white { - background-image: url(../img/glyphicons-halflings-sprite-white.png); + background-image: url(../img/glyphicons-halflings-white.png); } .icon.glass { background-position: 0 0; } @@ -56,7 +58,7 @@ .icon.play-circle { background-position: -192px -24px; } .icon.repeat { background-position: -216px -24px; } .icon.refresh { background-position: -240px -24px; } -.icon.calendar { background-position: -264px -24px; } +.icon.list-alt { background-position: -264px -24px; } .icon.lock { background-position: -288px -24px; } .icon.flag { background-position: -312px -24px; } .icon.headphones { background-position: -336px -24px; } @@ -67,13 +69,13 @@ .icon.barcode { background-position: -456px -24px; } .icon.tag { background-position: 0 -48px; } -.icon.tags { background-position: -24px -48px; } +.icon.tags { background-position: -25px -48px; } .icon.book { background-position: -48px -48px; } .icon.bookmark { background-position: -72px -48px; } .icon.print { background-position: -96px -48px; } .icon.camera { background-position: -120px -48px; } .icon.font { background-position: -144px -48px; } -.icon.bold { background-position: -168px -48px; } +.icon.bold { background-position: -167px -48px; } .icon.italic { background-position: -192px -48px; } .icon.text-height { background-position: -216px -48px; } .icon.text-width { background-position: -240px -48px; } @@ -108,14 +110,44 @@ .icon.chevron-left { background-position: -432px -72px; } .icon.chevron-right { background-position: -456px -72px; } +.icon.plus-sign { background-position: 0 -96px; } +.icon.minus-sign { background-position: -24px -96px; } +.icon.remove-sign { background-position: -48px -96px; } +.icon.ok-sign { background-position: -72px -96px; } +.icon.question-sign { background-position: -96px -96px; } +.icon.info-sign { background-position: -120px -96px; } +.icon.screenshot { background-position: -144px -96px; } +.icon.remove-circle { background-position: -168px -96px; } +.icon.ok-circle { background-position: -192px -96px; } +.icon.ban-circle { background-position: -216px -96px; } .icon.arrow-left { background-position: -240px -96px; } .icon.arrow-right { background-position: -264px -96px; } -.icon.arrow-up { background-position: -288px -96px; } +.icon.arrow-up { background-position: -289px -96px; } .icon.arrow-down { background-position: -312px -96px; } .icon.share-alt { background-position: -336px -96px; } .icon.resize-full { background-position: -360px -96px; } .icon.resize-small { background-position: -384px -96px; } .icon.plus { background-position: -408px -96px; } -.icon.minus { background-position: -432px -96px; } +.icon.minus { background-position: -433px -96px; } .icon.asterisk { background-position: -456px -96px; } +.icon.exclamation-sign { background-position: 0 -120px; } +.icon.gift { background-position: -24px -120px; } +.icon.leaf { background-position: -48px -120px; } +.icon.fire { background-position: -72px -120px; } +.icon.eye-open { background-position: -96px -120px; } +.icon.eye-close { background-position: -120px -120px; } +.icon.warning-sign { background-position: -144px -120px; } +.icon.plane { background-position: -168px -120px; } +.icon.calendar { background-position: -192px -120px; } +.icon.random { background-position: -216px -120px; } +.icon.comment { background-position: -240px -120px; } +.icon.magnet { background-position: -264px -120px; } +.icon.chevron-up { background-position: -288px -120px; } +.icon.chevron-down { background-position: -313px -119px; } +.icon.retweet { background-position: -336px -120px; } +.icon.shopping-cart { background-position: -360px -120px; } +.icon.folder-close { background-position: -384px -120px; } +.icon.folder-open { background-position: -408px -120px; } +.icon.resize-vertical { background-position: -432px -119px; } +.icon.resize-horizontal { background-position: -456px -118px; } -- cgit v1.2.3 From 9d0328ff00a1fa28f58b3cefa826bed9e21ab580 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 08:21:39 -0800 Subject: adding outline callout as a fallback for IE--needs testing though, thought I already added this --- less/forms.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 9e2e1dc1b..d2e049de5 100644 --- a/less/forms.less +++ b/less/forms.less @@ -192,6 +192,7 @@ textarea:focus { @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); .box-shadow(@shadow); outline: 0; + outline: 1px dotted #666 \9; /* IE6-8 */ } input[type=file]:focus, input[type=checkbox]:focus, -- cgit v1.2.3 From 6075b5dee6c892b991e8a00de70942f28f9a1c14 Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Thu, 26 Jan 2012 17:32:11 -0500 Subject: Collapses borders for IE7, which doesn't respect border-spacing --- less/tables.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/tables.less b/less/tables.less index 809c2f60e..c069ed588 100644 --- a/less/tables.less +++ b/less/tables.less @@ -64,6 +64,7 @@ table { .table-bordered { border: 1px solid #ddd; border-collapse: separate; // Done so we can round those corners! + *border-collapse: collapsed; // IE7 can't round corners anyway .border-radius(4px); th + th, td + td, -- cgit v1.2.3 From 841e386daf01e06f2eba00725545f3e3315334b3 Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Thu, 26 Jan 2012 17:32:44 -0500 Subject: Fixes up internal and external spacing for IE7 buttons --- less/buttons.less | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index d7f533783..f18cf9d95 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -67,6 +67,13 @@ // Button Base display: inline-block; padding: 4px 10px 4px; + *padding: 2px 10px; + // IE7 likes to collapse the whitespace before the button, so bring it back... + *margin-left: 4px; + &:first-child { + // ...but not before the first button + *margin-left: 0; + } font-size: @baseFontSize; line-height: @baseLineHeight; color: @grayDark; -- cgit v1.2.3 From 526d38839332907062cde27727900deb06e0c50b Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Thu, 26 Jan 2012 18:03:53 -0500 Subject: Compensates for IE7 first-child-input-inheriting-hasLayout-parents-margins bug for appended text form element --- less/forms.less | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index d2e049de5..55a646368 100644 --- a/less/forms.less +++ b/less/forms.less @@ -440,6 +440,15 @@ select:focus:required:invalid { margin-left: -1px; .border-radius(0 3px 3px 0); } + input:first-child { + // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input + // inherit the sum of its ancestors' margins. + *margin-left: -160px; + + &+.add-on { + *margin-left: -21px; + } + } } -- cgit v1.2.3 From 70d95b1bd72a039d47695495aac6b71da17df7dc Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 13:27:55 -0500 Subject: Moves IE7-specific button padding to only apply to form controls --- less/buttons.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index f18cf9d95..5f6f0c24b 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -67,7 +67,6 @@ // Button Base display: inline-block; padding: 4px 10px 4px; - *padding: 2px 10px; // IE7 likes to collapse the whitespace before the button, so bring it back... *margin-left: 4px; &:first-child { @@ -151,6 +150,8 @@ // Help Firefox not be a jerk about adding extra padding to buttons button.btn, input[type=submit].btn { + // IE7 has some default padding on button controls + *padding: 2px 10px; &::-moz-focus-inner { padding: 0; border: 0; -- cgit v1.2.3 From 43f1a42f7f254ad5d776564122bdae6547a4fbcd Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 13:57:51 -0500 Subject: Adds necessary ie7-inline-block macros --- less/button-groups.less | 1 + less/forms.less | 1 + 2 files changed, 2 insertions(+) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 5fb0a8e97..fd802cc35 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -17,6 +17,7 @@ .btn-toolbar { .btn-group { display: inline-block; + .ie7-inline-block; } } diff --git a/less/forms.less b/less/forms.less index 55a646368..52f5063f0 100644 --- a/less/forms.less +++ b/less/forms.less @@ -377,6 +377,7 @@ select:focus:required:invalid { .help-inline { display: inline-block; + .ie7-inline-block; margin-bottom: 9px; vertical-align: middle; padding-left: 5px; -- cgit v1.2.3 From 347a15b69aff9cf3f9bc5c47c9bcadb459eb895b Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 14:17:06 -0500 Subject: Cleans up IE7 inline margins for buttons and adds them for sprites, also fixes button padding for large/small sizes --- less/buttons.less | 26 ++++++++++++++++---------- less/mixins.less | 22 ++++++++++++++++++++++ less/sprites.less | 2 ++ 3 files changed, 40 insertions(+), 10 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 5f6f0c24b..06a7d91bd 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -67,12 +67,6 @@ // Button Base display: inline-block; padding: 4px 10px 4px; - // IE7 likes to collapse the whitespace before the button, so bring it back... - *margin-left: 4px; - &:first-child { - // ...but not before the first button - *margin-left: 0; - } font-size: @baseFontSize; line-height: @baseLineHeight; color: @grayDark; @@ -85,6 +79,8 @@ .box-shadow(@shadow); cursor: pointer; + .ie7-restore-left-whitespace; + &:hover { color: @grayDark; text-decoration: none; @@ -129,7 +125,7 @@ // Button Sizes &.large { - padding: 9px 14px 9px; + padding: 9px 14px; font-size: @baseFontSize + 2px; line-height: normal; .border-radius(5px); @@ -138,7 +134,7 @@ margin-top: 1px; } &.small { - padding: 5px 9px 5px; + padding: 5px 9px; font-size: @baseFontSize - 2px; line-height: @baseLineHeight - 2px; } @@ -150,10 +146,20 @@ // Help Firefox not be a jerk about adding extra padding to buttons button.btn, input[type=submit].btn { - // IE7 has some default padding on button controls - *padding: 2px 10px; &::-moz-focus-inner { padding: 0; border: 0; } + + // IE7 has some default padding on button controls + *padding-top: 2px; + *padding-bottom: 2px; + &.large { + *padding-top: 7px; + *padding-bottom: 7px; + } + &.small { + *padding-top: 3px; + *padding-bottom: 3px; + } } diff --git a/less/mixins.less b/less/mixins.less index dd331ebf2..745fe33d9 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -36,6 +36,28 @@ *zoom: 1; } +// IE7 likes to collapse whitespace on either side of the inline-block elements. +// Ems because we're attempting to match the width of a space character. Left +// version is for form buttons, which typically come after other elements, and +// right version is for icons, which come before. Applying both is ok, but it will +// mean that space between those elements will be .6em (~2 space characters) in IE7, +// instead of the 1 space in other browsers. +.ie7-restore-left-whitespace() { + *margin-left: .3em; + + &:first-child { + *margin-left: 0; + } +} + +.ie7-restore-right-whitespace() { + *margin-right: .3em; + + &:last-child { + *margin-left: 0; + } +} + // Sizing shortcuts // ------------------------- .size(@height: 5px, @width: 5px) { diff --git a/less/sprites.less b/less/sprites.less index 599434b2b..fac416df3 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -19,6 +19,8 @@ vertical-align: text-top; width: 14px; height: 14px; + + .ie7-restore-right-whitespace; } .icon.white { background-image: url(../img/glyphicons-halflings-sprite-white.png); -- cgit v1.2.3 From 8328987b15e0bb9e1c2ee1bd90e8dee9843f0ea7 Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 16:06:58 -0500 Subject: IE7 fixes for split buttons and dropdowns --- less/button-groups.less | 30 ++++++++++++++++++++---------- less/dropdowns.less | 21 +++++++++++++++++++-- 2 files changed, 39 insertions(+), 12 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index fd802cc35..a058f0344 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -6,6 +6,7 @@ .btn-group { position: relative; .clearfix(); // clears the floated buttons + .ie7-restore-left-whitespace; } // Space out series of button groups @@ -84,18 +85,27 @@ padding-right: 8px; @shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); .box-shadow(@shadow); + *padding-top: 5px; + *padding-bottom: 5px; } -// Reposition menu on open and round all corners -.btn-group.open .dropdown-menu { - display: block; - margin-top: 1px; - .border-radius(5px); -} -.btn-group.open .dropdown-toggle { - background-image: none; - @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); +.btn-group.open { + // IE7's z-index only goes to the nearest positioned ancestor, which would + // make the menu appear below buttons that appeared later on the page + *z-index: @zindexDropdown; + + // Reposition menu on open and round all corners + .dropdown-menu { + display: block; + margin-top: 1px; + .border-radius(5px); + } + + .dropdown-toggle { + background-image: none; + @shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); + } } // Reposition the caret diff --git a/less/dropdowns.less b/less/dropdowns.less index 06114b254..e73b056e9 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -5,12 +5,19 @@ .dropdown { position: relative; } +.dropdown .dropdown-toggle { + // The caret makes the toggle a bit too tall in IE7 + *margin-bottom: -3px; +} // Dropdown arrow/caret .caret { display: inline-block; width: 0; height: 0; text-indent: -99999px; + // IE7 won't do the border trick if there's a text indent, but it doesn't + // do the content that text-indent is hiding, either, so we're ok. + *text-indent: 0; vertical-align: top; border-left: 4px solid transparent; border-right: 4px solid transparent; @@ -21,7 +28,6 @@ .dropdown .caret { margin-top: 8px; margin-left: 2px; - *margin-top: 7px; } .dropdown:hover .caret, .open.dropdown .caret { @@ -31,6 +37,7 @@ .dropdown-menu { position: absolute; top: 100%; + left: 0; z-index: @zindexDropdown; float: left; display: none; // none by default, but block on "open" of the menu @@ -50,7 +57,6 @@ -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; - zoom: 1; // do we need this? *border-right-width: 2px; *border-bottom-width: 2px; @@ -68,6 +74,13 @@ overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid @white; + + // IE7 needs a set width since we gave a height. Restricting just + // to IE7 to keep the 1px left/right space in other browsers. + // It is unclear where IE is getting the extra space that we need + // to negative-margin away, but so it goes. + *width: 100%; + *margin: -5px 0 5px; } // Links within the dropdown menu @@ -93,6 +106,10 @@ // Open state for the dropdown .dropdown.open { + // IE7's z-index only goes to the nearest positioned ancestor, which would + // make the menu appear below buttons that appeared later on the page + *z-index: @zindexDropdown; + .dropdown-toggle { color: @white; background: #ccc; -- cgit v1.2.3 From e8647c1b118d2c726a8987e9a41aad82da972b57 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 13:20:02 -0800 Subject: huuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuge update to doces and stuff --- less/accordion.less | 4 ++-- less/navbar.less | 27 +++++++++++++++------------ less/responsive.less | 2 ++ less/scaffolding.less | 8 ++++---- less/variables.less | 12 ++++++++---- 5 files changed, 31 insertions(+), 22 deletions(-) (limited to 'less') diff --git a/less/accordion.less b/less/accordion.less index 1ebd5b1a1..d5c00238c 100644 --- a/less/accordion.less +++ b/less/accordion.less @@ -1,5 +1,5 @@ -// ACCORDION -// --------- +// COLLAPSE +// -------- // Parent container diff --git a/less/navbar.less b/less/navbar.less index dba95e5cd..7a4b631d1 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -16,7 +16,7 @@ .box-shadow(@shadow); } -// Text and links +// Brand, links, text, and buttons .navbar { // Hover and active states .brand:hover { @@ -35,9 +35,10 @@ color: @white; } // Plain text in topbar - p { - margin: 0; + .navbar-text { + margin-bottom: 0; line-height: 40px; + color: @navbarText; a:hover { color: @white; background-color: transparent; @@ -105,6 +106,9 @@ } +// STATIC OR FIXED? +// ---------------- + // Static navbar .navbar-static { margin-bottom: @baseLineHeight; @@ -116,7 +120,7 @@ } // Fixed navbar -.navbar-fixed { +.navbar-fixed-top { position: fixed; top: 0; right: 0; @@ -125,7 +129,6 @@ } - // NAVIGATION // ---------- @@ -149,33 +152,33 @@ float: none; padding: 10px 10px 11px; line-height: 19px; - color: @grayLight; + color: @navbarLinkColor; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0,0,.25); } // Hover .navbar .nav > li > a:hover { background-color: transparent; - color: @white; + color: @navbarLinkColorHover; text-decoration: none; } // Active nav items .navbar .nav .active > a { - color: @white; + color: @navbarLinkColorHover; text-decoration: none; - background-color: @grayDarker; + background-color: @navbarBackground; background-color: rgba(0,0,0,.5); } // Dividers (basically a vertical hr) .navbar .vertical-divider { - height: 40px; + height: @navbarHeight; width: 1px; margin: 0 5px; overflow: hidden; - background-color: @grayDarker; - border-right: 1px solid #444; + background-color: @navbarBackground; + border-right: 1px solid @navbarBackgroundHighlight; } // Secondary (floated right) nav in topbar diff --git a/less/responsive.less b/less/responsive.less index 2999eef4d..917fdc3e2 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -175,6 +175,8 @@ // 16cols at 30px wide with 16px gutters .container { width: @siteWidth; + padding-left: 10px; + padding-right: 10px; } // Default columns diff --git a/less/scaffolding.less b/less/scaffolding.less index 3c1826830..d8b3f56ab 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -22,8 +22,8 @@ body { a { color: @linkColor; text-decoration: none; - &:hover { - color: @linkColorHover; - text-decoration: underline; - } +} +a:hover { + color: @linkColorHover; + text-decoration: underline; } diff --git a/less/variables.less b/less/variables.less index 5ed896cc0..4265d7ed3 100644 --- a/less/variables.less +++ b/less/variables.less @@ -70,21 +70,25 @@ @navbarBackground: @grayDarker; @navbarBackgroundHighlight: @grayDark; +@navbarText: @grayLight; +@navbarLinkColor: @grayLight; +@navbarLinkColorHover: @white; + // Form states and alerts @warningText: #c09853; @warningBackground: #fcf8e3; -@warningBorder: #f3edd2; +@warningBorder: darken(spin(@warningBackground, -10), 3%); @errorText: #b94a48; @errorBackground: #f2dede; -@errorBorder: #e9c7c7; +@errorBorder: darken(spin(@errorBackground, -10), 3%); @successText: #468847; @successBackground: #dff0d8; -@successBorder: #cfe8c4; +@successBorder: darken(spin(@successBackground, -10), 5%); @infoText: #3a87ad; @infoBackground: #d9edf7; -@infoBorder: #bfe1f2; +@infoBorder: darken(spin(@infoBackground, -10), 7%); -- cgit v1.2.3 From faa719d59c45eb05a7e77db311d7bb277341f85d Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 16:35:21 -0500 Subject: Fixes left/right border overlap for IE7 --- less/navs.less | 2 ++ 1 file changed, 2 insertions(+) (limited to 'less') diff --git a/less/navs.less b/less/navs.less index cd356d9bb..f1d5b565c 100644 --- a/less/navs.less +++ b/less/navs.less @@ -317,6 +317,7 @@ .tabs-left .tabs .active > a, .tabs-left .tabs .active > a:hover { border-color: #ddd transparent #ddd #ddd; + *border-right-color: @white; } // Tabs on the right @@ -335,4 +336,5 @@ .tabs-right .tabs .active > a, .tabs-right .tabs .active > a:hover { border-color: #ddd #ddd #ddd transparent; + *border-left-color: @white; } -- cgit v1.2.3 From a1fc352cc2b8e94557c1414178a59c73a6c3b849 Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Thu, 26 Jan 2012 17:03:15 -0500 Subject: Changes non-transparent navbar search box color to match transparent one better --- less/navbar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index dba95e5cd..bdd71a1b1 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -74,7 +74,7 @@ #font > .sans-serif(13px, normal, 1); color: @white; color: rgba(255,255,255,.75); - background: #444; + background: #6a6a6a; background: 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); -- cgit v1.2.3 From d7b8a9c9303f1f1bd69ae02f74bb17aaa87a2ceb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 13:36:08 -0800 Subject: align text in buttons so folks can easily make them different widths --- less/buttons.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index f18cf9d95..08620a3c3 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -77,6 +77,7 @@ font-size: @baseFontSize; line-height: @baseLineHeight; color: @grayDark; + text-align: center; text-shadow: 0 1px 1px rgba(255,255,255,.75); #gradient > .vertical-three-colors(@white, @white, 25%, darken(@white, 10%)); // Don't use .gradientbar() here since it does a three-color gradient border: 1px solid #ccc; -- cgit v1.2.3 From 1c9db106fadd544d8af93a60c128842f95724f03 Mon Sep 17 00:00:00 2001 From: Pete Hopkins Date: Fri, 27 Jan 2012 16:39:27 -0500 Subject: Moves buttonBackground to mixins (issue 1292) --- less/buttons.less | 25 ------------------------- less/mixins.less | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 25 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 06a7d91bd..843af6c62 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -35,31 +35,6 @@ } } - -// Mixin for generating button backgrounds -// --------------------------------------- -.buttonBackground(@startColor, @endColor) { - // gradientBar will set the background to a pleasing blend of these, to support IE<=9 - .gradientBar(@startColor, @endColor); - - // in these cases the gradient won't cover the background, so we override - &:hover, &:active, &.active, &.disabled { - background-color: @endColor; - } - - // called out separately because IE8 would ignore otherwise - &[disabled] { - background-color: @endColor; - } - - // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves - &:active, - &.active { - background-color: darken(@endColor, 10%) e("\9"); - } -} - - // Base styles // ----------- diff --git a/less/mixins.less b/less/mixins.less index 745fe33d9..bbbba1e02 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -339,6 +339,29 @@ } +// Mixin for generating button backgrounds +// --------------------------------------- +.buttonBackground(@startColor, @endColor) { + // gradientBar will set the background to a pleasing blend of these, to support IE<=9 + .gradientBar(@startColor, @endColor); + + // in these cases the gradient won't cover the background, so we override + &:hover, &:active, &.active, &.disabled { + background-color: @endColor; + } + + // called out separately because IE8 would ignore otherwise + &[disabled] { + background-color: @endColor; + } + + // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves + &:active, + &.active { + background-color: darken(@endColor, 10%) e("\9"); + } +} + // COMPONENT MIXINS // -------------------------------------------------- -- cgit v1.2.3 From 003da1e089edf06c528667009fb59189b5f0e4cc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 14:21:17 -0800 Subject: fix inputs in navbar --- less/navbar.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 7a4b631d1..602e26ae8 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -60,6 +60,7 @@ input, select { display: inline-block; + margin-top: 5px; margin-bottom: 0; } } -- cgit v1.2.3 From 800d0b24e08dec4835e7f4126701428c5c5bae2c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 15:28:09 -0800 Subject: remove page-header from docs and add to type.less --- less/type.less | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'less') diff --git a/less/type.less b/less/type.less index 087224fd0..7841bb090 100644 --- a/less/type.less +++ b/less/type.less @@ -75,6 +75,17 @@ h6 { text-transform: uppercase; } +// Page header +.page-header { + padding-bottom: @baseLineHeight - 1; + margin: @baseLineHeight 0; + border-bottom: 1px solid @grayLighter; +} +.page-header h1 { + line-height: 1; +} + + // LISTS // ----- -- cgit v1.2.3 From f6dc566963c63d5113e72f0098ad9da2c414f33f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 16:26:55 -0800 Subject: overhaul navbar behavior in responsive css --- less/navbar.less | 3 +- less/responsive.less | 173 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 110 insertions(+), 66 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 602e26ae8..07e2bed8b 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -165,7 +165,8 @@ } // Active nav items -.navbar .nav .active > a { +.navbar .nav .active > a, +.navbar .nav .active > a:hover { color: @navbarLinkColorHover; text-decoration: none; background-color: @navbarBackground; diff --git a/less/responsive.less b/less/responsive.less index 917fdc3e2..8bfe705b4 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -15,7 +15,7 @@ // ------------------ // Hide from screenreaders and browsers -// Credit: HTML5BP +// Credit: HTML5 Boilerplate .hidden { display: none; visibility: hidden; @@ -27,62 +27,6 @@ @media (max-width: 480px) { - // Make the nav work for small devices - .navbar { - .nav { - position: absolute; - top: 0; - left: 0; - width: 180px; - padding-top: 40px; - list-style: none; - } - .nav, - .nav > li:last-child a { - .border-radius(0 0 4px 0); - } - .nav > li { - float: none; - display: none; - } - .nav > li > a { - float: none; - background-color: #222; - } - .nav > .active { - display: block; - position: absolute; - top: 0; - left: 0; - } - .nav > .active > a { - background-color: transparent; - } - .nav > .active > a:hover { - background-color: #333; - } - .nav > .active > a: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(100); - content: "↓"; - } - .nav:hover > li { - display: block; - } - .nav:hover > li > a:hover { - background-color: #333; - } - } - // Remove the horizontal form styles .form-horizontal .control-group > label { float: none; @@ -124,15 +68,9 @@ // -------------------------------------------------- @media (max-width: 768px) { - - // Unfix the navbar - .navbar-fixed { - position: absolute; - } - .navbar-fixed .nav { - float: none; - } + // GRID & CONTAINERS + // ----------------- // Remove width from containers .container { width: auto; @@ -209,6 +147,111 @@ } + +// TABLETS AND BELOW +// ----------------- +@media (max-width: 940px) { + + // UNFIX THE TOPBAR + // ---------------- + // Remove any padding from the body + body { + padding-top: 0; + } + // Unfix the navbar + .navbar-fixed-top { + position: static; + margin-bottom: @baseLineHeight * 2; + } + .navbar-inner { + padding: 10px; + background-image: none; + } + .navbar .container { + padding: 0; + } + // Account for brand name + .navbar .brand { + float: none; + display: block; + padding-left: 15px; + padding-right: 15px; + margin: 0; + } + // Block-level the nav + .navbar .nav { + float: none; + margin: (@baseLineHeight / 2) 0; + } + .navbar .nav > li { + float: none; + } + .navbar .nav > li > a { + margin-bottom: 2px; + } + .navbar .nav > .vertical-divider { + display: none; + } + // Nav and dropdown links in navbar + .navbar .nav > li > a, + .navbar .dropdown-menu a { + padding: 6px 15px; + font-weight: bold; + color: @navbarLinkColor; + .border-radius(3px); + } + .navbar .dropdown-menu li + li a { + margin-bottom: 2px; + } + .navbar .nav > li > a:hover, + .navbar .dropdown-menu a:hover { + background-color: @navbarBackground; + } + // Dropdowns in the navbar + .navbar .dropdown-menu { + position: static; + display: block; + float: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + .border-radius(0); + .box-shadow(none); + } + .navbar .dropdown-menu:before, + .navbar .dropdown-menu:after { + display: none; + } + .navbar .dropdown-menu .divider { + display: none; + } + // Forms in navbar + .navbar-form, + .navbar-search { + float: none; + padding: (@baseLineHeight / 2) 15px; + margin: (@baseLineHeight / 2) 0; + border-top: 1px solid @navbarBackground; + border-bottom: 1px solid @navbarBackground; + @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + .box-shadow(@shadow); + } + // Pull right (secondary) nav content + .navbar .nav.pull-right { + float: none; + margin-left: 0; + } + // Static navbar + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } + +} + + // LARGE DESKTOP & UP // ------------------ /* -- cgit v1.2.3 From 997fc33af9a4cbdc078e85ee491f777d0dd2d51a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 16:40:14 -0800 Subject: clean up use of mixins to highlight them appropriately in your fav editor --- less/button-groups.less | 4 ++-- less/buttons.less | 2 +- less/forms.less | 2 +- less/navbar.less | 2 +- less/sprites.less | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index a058f0344..fafc95584 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -6,7 +6,7 @@ .btn-group { position: relative; .clearfix(); // clears the floated buttons - .ie7-restore-left-whitespace; + .ie7-restore-left-whitespace(); } // Space out series of button groups @@ -18,7 +18,7 @@ .btn-toolbar { .btn-group { display: inline-block; - .ie7-inline-block; + .ie7-inline-block(); } } diff --git a/less/buttons.less b/less/buttons.less index 75fe48f8a..95690401b 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -55,7 +55,7 @@ .box-shadow(@shadow); cursor: pointer; - .ie7-restore-left-whitespace; + .ie7-restore-left-whitespace(); &:hover { color: @grayDark; diff --git a/less/forms.less b/less/forms.less index 52f5063f0..c84d9a11d 100644 --- a/less/forms.less +++ b/less/forms.less @@ -377,7 +377,7 @@ select:focus:required:invalid { .help-inline { display: inline-block; - .ie7-inline-block; + .ie7-inline-block(); margin-bottom: 9px; vertical-align: middle; padding-left: 5px; diff --git a/less/navbar.less b/less/navbar.less index 7291ecceb..6f2b737c8 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -76,7 +76,7 @@ #font > .sans-serif(13px, normal, 1); color: @white; color: rgba(255,255,255,.75); - background: #6a6a6a; + background: #666; background: 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); diff --git a/less/sprites.less b/less/sprites.less index ed456de1a..ef4c0c74c 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -22,7 +22,7 @@ width: 14px; height: 14px; - .ie7-restore-right-whitespace; + .ie7-restore-right-whitespace(); } .icon.white { background-image: url(../img/glyphicons-halflings-white.png); -- cgit v1.2.3 From 7e72eb5063470a3728d612acd2cc0368aabc8664 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 18:33:25 -0800 Subject: new tab focus style and mixin --- less/buttons.less | 2 +- less/forms.less | 5 ++--- less/mixins.less | 20 +++++++++++++++++--- less/reset.less | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 95690401b..f372b8448 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -70,7 +70,7 @@ // Focus state for keyboard and accessibility &:focus { - outline: 1px dotted #666; + .tab-focus(); } // Active and Disabled states diff --git a/less/forms.less b/less/forms.less index c84d9a11d..86e975725 100644 --- a/less/forms.less +++ b/less/forms.less @@ -191,14 +191,13 @@ textarea:focus { border-color: rgba(82,168,236,.8); @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); .box-shadow(@shadow); - outline: 0; - outline: 1px dotted #666 \9; /* IE6-8 */ + outline: thin dotted \9; /* IE6-8 */ } input[type=file]:focus, input[type=checkbox]:focus, select:focus { .box-shadow(none); // override for file inputs - outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline + .tab-focus(); } diff --git a/less/mixins.less b/less/mixins.less index bbbba1e02..65b7dbefc 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -7,7 +7,7 @@ // -------------------------------------------------- // Clearfix -// ------------------------- +// -------- // For clearing floats like a boss h5bp.com/q .clearfix() { *zoom: 1; @@ -21,8 +21,22 @@ } } +// Webkit-style focus +// ------------------ +.tab-focus() { + // Default + outline: thin dotted; + // Webkit + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; + // Firefox + -moz-outline: 5px auto -moz-mac-focusring; + -moz-outline-radius: 6px; + -moz-outline-offset: 0; +} + // Center-align a block level element -// ------------------------- +// ---------------------------------- .center-block() { display: block; margin-left: auto; @@ -30,7 +44,7 @@ } // IE7 inline-block -// ------------------------- +// ---------------- .ie7-inline-block() { *display: inline; /* IE7 inline-block hack */ *zoom: 1; diff --git a/less/reset.less b/less/reset.less index ef4dc8af6..28d8eb60c 100644 --- a/less/reset.less +++ b/less/reset.less @@ -46,7 +46,7 @@ html { } // Focus states a:focus { - outline: thin dotted; + .tab-focus(); } // Hover & Active a:hover, -- cgit v1.2.3 From aaa530c27e387ff266345aee026b50f779be88bc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 18:44:17 -0800 Subject: combined .disabled and [disabled] and confirmed in ie7/8 --- less/buttons.less | 10 +--------- less/mixins.less | 7 +------ 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index f372b8448..ec23781cc 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -82,16 +82,8 @@ background-color: darken(@white, 10%); background-color: darken(@white, 15%) e("\9"); } - &.disabled { - cursor: default; - background-image: none; - background-color: darken(@white, 10%); - .opacity(65); - .box-shadow(none); - } + &.disabled, &[disabled] { - // disabled pseudo can't be included with .disabled - // def because IE8 and below will drop it ;_; cursor: default; background-image: none; background-color: darken(@white, 10%); diff --git a/less/mixins.less b/less/mixins.less index 65b7dbefc..2ed28ac3f 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -360,12 +360,7 @@ .gradientBar(@startColor, @endColor); // in these cases the gradient won't cover the background, so we override - &:hover, &:active, &.active, &.disabled { - background-color: @endColor; - } - - // called out separately because IE8 would ignore otherwise - &[disabled] { + &:hover, &:active, &.active, &.disabled, &[disabled] { background-color: @endColor; } -- cgit v1.2.3 From 7fc6e12b79a8ba445e41db00627530b06544bfde Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 18:49:00 -0800 Subject: comment icons that are 1px off --- less/sprites.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/sprites.less b/less/sprites.less index ef4c0c74c..a40d4dea4 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -61,7 +61,7 @@ .icon.repeat { background-position: -216px -24px; } .icon.refresh { background-position: -240px -24px; } .icon.list-alt { background-position: -264px -24px; } -.icon.lock { background-position: -288px -24px; } +.icon.lock { background-position: -287px -24px; } // 1px off .icon.flag { background-position: -312px -24px; } .icon.headphones { background-position: -336px -24px; } .icon.volume-off { background-position: -360px -24px; } @@ -71,13 +71,13 @@ .icon.barcode { background-position: -456px -24px; } .icon.tag { background-position: 0 -48px; } -.icon.tags { background-position: -25px -48px; } +.icon.tags { background-position: -25px -48px; } // 1px off .icon.book { background-position: -48px -48px; } .icon.bookmark { background-position: -72px -48px; } .icon.print { background-position: -96px -48px; } .icon.camera { background-position: -120px -48px; } .icon.font { background-position: -144px -48px; } -.icon.bold { background-position: -167px -48px; } +.icon.bold { background-position: -167px -48px; } // 1px off .icon.italic { background-position: -192px -48px; } .icon.text-height { background-position: -216px -48px; } .icon.text-width { background-position: -240px -48px; } @@ -124,7 +124,7 @@ .icon.ban-circle { background-position: -216px -96px; } .icon.arrow-left { background-position: -240px -96px; } .icon.arrow-right { background-position: -264px -96px; } -.icon.arrow-up { background-position: -289px -96px; } +.icon.arrow-up { background-position: -289px -96px; } // 1px off .icon.arrow-down { background-position: -312px -96px; } .icon.share-alt { background-position: -336px -96px; } .icon.resize-full { background-position: -360px -96px; } @@ -146,7 +146,7 @@ .icon.comment { background-position: -240px -120px; } .icon.magnet { background-position: -264px -120px; } .icon.chevron-up { background-position: -288px -120px; } -.icon.chevron-down { background-position: -313px -119px; } +.icon.chevron-down { background-position: -313px -119px; } // 1px off .icon.retweet { background-position: -336px -120px; } .icon.shopping-cart { background-position: -360px -120px; } .icon.folder-close { background-position: -384px -120px; } -- cgit v1.2.3 From d02c6957d44761c35121cb88af727802ce4d9e5e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 19:49:56 -0800 Subject: fixing up buttons and examples of implementing icons --- less/button-groups.less | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index fafc95584..471d33748 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -16,6 +16,8 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { + margin-top: @baseLineHeight / 2; + margin-bottom: @baseLineHeight / 2; .btn-group { display: inline-block; .ie7-inline-block(); @@ -110,9 +112,14 @@ // Reposition the caret .btn .caret { - margin-top: 6px; + margin-top: 7px; margin-left: 0; } +.btn:hover .caret, +.open.btn-group .caret { + .opacity(100); +} + // Account for other colors .primary, -- cgit v1.2.3 From 0fa642291843fbeab66960c6fc635681c1241586 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 19:57:53 -0800 Subject: icon spacing in small buttons and nav lists --- less/buttons.less | 2 +- less/navs.less | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index ec23781cc..1333592c2 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -107,7 +107,7 @@ line-height: @baseLineHeight - 2px; } &.small .icon { - margin-top: -2px; + margin-top: -1px; } } diff --git a/less/navs.less b/less/navs.less index f1d5b565c..aa718cd74 100644 --- a/less/navs.less +++ b/less/navs.less @@ -54,6 +54,9 @@ text-shadow: 0 -1px 0 rgba(0,0,0,.2); background-color: @linkColor; } +.nav.list .icon { + margin-right: 2px; +} -- cgit v1.2.3 From 9800196bf7067b560e062dabfcb51f9b9c7e8dd5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 20:05:03 -0800 Subject: use quotes on attr selectors more consistently --- less/buttons.less | 2 +- less/forms.less | 28 ++++++++++++++-------------- less/modals.less | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 1333592c2..8d75248b3 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -113,7 +113,7 @@ // Help Firefox not be a jerk about adding extra padding to buttons button.btn, -input[type=submit].btn { +input[type="submit"].btn { &::-moz-focus-inner { padding: 0; border: 0; diff --git a/less/forms.less b/less/forms.less index 86e975725..edd416585 100644 --- a/less/forms.less +++ b/less/forms.less @@ -75,9 +75,9 @@ label select { } // Mini reset for unique input types -input[type=image], -input[type=checkbox], -input[type=radio] { +input[type="image"], +input[type="checkbox"], +input[type="radio"] { width: auto; height: auto; padding: 0; @@ -90,7 +90,7 @@ input[type=radio] { } // Reset the file input to browser defaults -input[type=file] { +input[type="file"] { padding: initial; line-height: initial; border: initial; @@ -100,16 +100,16 @@ input[type=file] { } // Help out input buttons -input[type=button], -input[type=reset], -input[type=submit] { +input[type="button"], +input[type="reset"], +input[type="submit"] { width: auto; height: auto; } // Set the height of select and file controls to match text inputs select, -input[type=file] { +input[type="file"] { height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */ line-height: 28px; @@ -128,7 +128,7 @@ select[size] { } // Remove shadow from image inputs -input[type=image] { +input[type="image"] { .box-shadow(none); } @@ -138,7 +138,7 @@ textarea { } // Hidden inputs -input[type=hidden] { +input[type="hidden"] { display: none; } @@ -152,8 +152,8 @@ input[type=hidden] { .checkbox { padding-left: 18px; } -.radio input[type=radio], -.checkbox input[type=checkbox] { +.radio input[type="radio"], +.checkbox input[type="checkbox"] { float: left; margin-left: -18px; } @@ -193,8 +193,8 @@ textarea:focus { .box-shadow(@shadow); outline: thin dotted \9; /* IE6-8 */ } -input[type=file]:focus, -input[type=checkbox]:focus, +input[type="file"]:focus, +input[type="checkbox"]:focus, select:focus { .box-shadow(none); // override for file inputs .tab-focus(); diff --git a/less/modals.less b/less/modals.less index 0368e01e1..7f07d11e4 100644 --- a/less/modals.less +++ b/less/modals.less @@ -60,6 +60,6 @@ .btn { float: right; margin-left: 5px; - margin-bottom: 0; // account for input[type=submit] which gets the bottom margin like all other inputs + margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs } } -- cgit v1.2.3 From 4e191c423d2d1e834a4cb57ae246d03a82272ee4 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 20:17:03 -0800 Subject: update progress bars to have a solid edge until 100% filled --- less/progress-bars.less | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/progress-bars.less b/less/progress-bars.less index ff754b817..228972f2c 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -28,18 +28,14 @@ // THE BARS // -------- -// Common styles -.progress, -.progress .bar { - .border-radius(4px); -} - // Outer container .progress { + overflow: hidden; height: 18px; margin-bottom: 18px; #gradient > .vertical(#f5f5f5, #f9f9f9); .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); + .border-radius(4px); } // Bar of progress -- cgit v1.2.3 From 15d3a4797f3435d1531804369df87fa4e574b874 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Fri, 27 Jan 2012 21:06:09 -0800 Subject: simplify build process more - remove really annoying date. --- less/bootstrap.less | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'less') diff --git a/less/bootstrap.less b/less/bootstrap.less index bc9f84373..3dad408c9 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -1,12 +1,11 @@ /*! - * Bootstrap @VERSION + * Bootstrap v2.0.0 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: @DATE */ // CSS Reset -- cgit v1.2.3 From 3934d1b6c4cb975967235547b77e90b4c8c91be2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 21:08:04 -0800 Subject: rgba text color on active buttons for a bit more contrast from their non-active siblings --- less/button-groups.less | 3 ++- less/buttons.less | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 471d33748..3e08e6b09 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -73,7 +73,8 @@ // On hover/focus/active, bring the proper btn to front .btn-group .btn:hover, .btn-group .btn:focus, -.btn-group .btn:active { +.btn-group .btn:active, +.btn-group .btn.active { z-index: 2; } diff --git a/less/buttons.less b/less/buttons.less index 8d75248b3..f1060dc6b 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -18,6 +18,12 @@ text-shadow: 0 -1px 0 rgba(0,0,0,.25); color: @white } + &.primary.active, + &.danger.active, + &.success.active, + &.info.active { + color: rgba(255,255,255,.75); + } &.primary { .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 15)); } @@ -81,6 +87,7 @@ .box-shadow(@shadow); background-color: darken(@white, 10%); background-color: darken(@white, 15%) e("\9"); + color: rgba(0,0,0,.5); } &.disabled, &[disabled] { -- cgit v1.2.3 From 78120edf728ede35f2338b42ae30fff1bd7f086e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 21:20:58 -0800 Subject: add clearfix to control-group for longer labels and any other unforeseen circumstances --- less/forms.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index edd416585..b82fcca72 100644 --- a/less/forms.less +++ b/less/forms.less @@ -505,6 +505,7 @@ select:focus:required:invalid { // Increase spacing between groups .control-group { margin-bottom: @baseLineHeight; + .clearfix(); } // Float the labels left .control-group > label { -- cgit v1.2.3 From ad78caa72639aa377caf584efc26fe7a5682b15c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 21:25:35 -0800 Subject: fix right aligned dropdowns in navbar by adding left: auto; to nix default alignment --- less/navbar.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 6f2b737c8..287459a27 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -244,6 +244,7 @@ // Right aligned menus need alt position .navbar .nav.pull-right .dropdown-menu { + left: auto; right: 0; &:before { left: auto; -- cgit v1.2.3 From 7a756168b52f5bd0af2aedd629379a80e8682c14 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 22:56:48 -0800 Subject: fix regression in textarea shadows --- less/forms.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index b82fcca72..c7342626f 100644 --- a/less/forms.less +++ b/less/forms.less @@ -191,6 +191,7 @@ textarea:focus { border-color: rgba(82,168,236,.8); @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); .box-shadow(@shadow); + outline: 0; outline: thin dotted \9; /* IE6-8 */ } input[type="file"]:focus, -- cgit v1.2.3 From ce69b70719581f87e2542710fa92fa4163acefc7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 23:53:56 -0800 Subject: give append/prepend inputs higher z-index on focus --- less/forms.less | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index c7342626f..b8cb48b48 100644 --- a/less/forms.less +++ b/less/forms.less @@ -396,6 +396,10 @@ select:focus:required:invalid { input, .uneditable-input { .border-radius(0 3px 3px 0); + &:focus { + position: relative; + z-index: 2; + } } .uneditable-input { border-left-color: #ccc; -- cgit v1.2.3 From 342a99f1d01edfa20d744781cbecffcd4239fa39 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 00:29:38 -0800 Subject: block level page-header h1 small for readability on 480px and under --- less/responsive.less | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 8bfe705b4..6ba31b5c9 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -27,6 +27,12 @@ @media (max-width: 480px) { + // Block level the page header small tag for readability + .page-header h1 small { + display: block; + line-height: @baseLineHeight; + } + // Remove the horizontal form styles .form-horizontal .control-group > label { float: none; -- cgit v1.2.3 From 967030cb532c642f076d1e1fc4e5a1e2cee18561 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 00:39:22 -0800 Subject: modal refinements in docs and general responsiveness --- less/responsive.less | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 6ba31b5c9..fe5e0a7eb 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -56,15 +56,16 @@ // Modals .modal { position: absolute; - top: 20px; - left: 20px; - right: 20px; + top: 10px; + left: 10px; + right: 10px; width: auto; margin: 0; &.fade.in { top: auto; } } .modal-header .close { padding: 10px; + margin: -10px; } } -- cgit v1.2.3 From f1851ab1338938bf6315e223789e345f20cfb4b1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 00:43:25 -0800 Subject: change text on js docs page to improve rendering on iphone, update responsive for carousel considerations --- less/responsive.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index fe5e0a7eb..24b58d2ab 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -68,6 +68,11 @@ margin: -10px; } + // Carousel + .carousel-caption { + position: static; + } + } -- cgit v1.2.3 From 28ba9d69c82895bbd9a1d66cea855119f4aba349 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 11:21:39 -0800 Subject: nav, buttons, and docs updates to account for outline: 0; on :active --- less/button-groups.less | 7 +++++++ less/buttons.less | 1 + less/dropdowns.less | 6 +++++- less/mixins.less | 4 ---- 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 3e08e6b09..7367103ca 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -78,6 +78,13 @@ z-index: 2; } +// On active and open, don't show outline +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + + // Split button dropdowns // ---------------------- diff --git a/less/buttons.less b/less/buttons.less index f1060dc6b..54d00a13a 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -88,6 +88,7 @@ background-color: darken(@white, 10%); background-color: darken(@white, 15%) e("\9"); color: rgba(0,0,0,.5); + outline: 0; } &.disabled, &[disabled] { diff --git a/less/dropdowns.less b/less/dropdowns.less index e73b056e9..83f535ae8 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -5,10 +5,14 @@ .dropdown { position: relative; } -.dropdown .dropdown-toggle { +.dropdown-toggle { // The caret makes the toggle a bit too tall in IE7 *margin-bottom: -3px; } +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} // Dropdown arrow/caret .caret { display: inline-block; diff --git a/less/mixins.less b/less/mixins.less index 2ed28ac3f..ddf100359 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -29,10 +29,6 @@ // Webkit outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; - // Firefox - -moz-outline: 5px auto -moz-mac-focusring; - -moz-outline-radius: 6px; - -moz-outline-offset: 0; } // Center-align a block level element -- cgit v1.2.3 From f1dc214977ed2613565a0c4a9846864c84fb2602 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 11:24:34 -0800 Subject: increase padding on modal-header after decreasing h3 line-height --- less/modals.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 7f07d11e4..386aabb49 100644 --- a/less/modals.less +++ b/less/modals.less @@ -41,7 +41,7 @@ &.fade.in { top: 50%; } } .modal-header { - padding: 5px 15px; + padding: 9px 15px; border-bottom: 1px solid #eee; // Close icon .close { margin-top: 2px; } -- cgit v1.2.3 From 39f70afed9998826f4a4ff548b721a5b065c985e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 12:03:26 -0800 Subject: update mixins to fix radial gradient --- less/mixins.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index ddf100359..5daa22234 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -329,11 +329,11 @@ background-repeat: no-repeat; } .radial(@innerColor: #555, @outerColor: #333) { - background-color: @outsideColor; - background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@centerColor), to(@outsideColor)); - background-image: -webkit-radial-gradient(circle, @centerColor, @outsideColor); - background-image: -moz-radial-gradient(circle, @centerColor, @outsideColor); - background-image: -ms-radial-gradient(circle, @centerColor, @outsideColor); + background-color: @outerColor; + background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor)); + background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor); + background-image: -moz-radial-gradient(circle, @innerColor, @outerColor); + background-image: -ms-radial-gradient(circle, @innerColor, @outerColor); background-repeat: no-repeat; // Opera cannot do radial gradients yet } -- cgit v1.2.3 From 12d3c2fe74bbe2570e47a2c8d7154a3011bd0770 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 28 Jan 2012 12:08:41 -0800 Subject: fix z-index issue with modals for popovers,tooltips,and dropdowns --- less/modals.less | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 7f07d11e4..3e74f4227 100644 --- a/less/modals.less +++ b/less/modals.less @@ -1,6 +1,13 @@ // MODALS // ------ +.modal-open { + .dropdown-menu { z-index: @zindexDropdown + @zindexModal } + .dropdown.open { *z-index: @zindexDropdown + @zindexModal } + .popover { z-index: @zindexPopover + @zindexModal } + .tooltip { z-index: @zindexTooltip + @zindexModal } +} + .modal-backdrop { position: fixed; top: 0; -- cgit v1.2.3 From f768242759903151c9957a493c5349f931d882ef Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 28 Jan 2012 12:14:41 -0800 Subject: add trailing ; --- less/modals.less | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 36be57bf0..aa14675ed 100644 --- a/less/modals.less +++ b/less/modals.less @@ -2,10 +2,10 @@ // ------ .modal-open { - .dropdown-menu { z-index: @zindexDropdown + @zindexModal } - .dropdown.open { *z-index: @zindexDropdown + @zindexModal } - .popover { z-index: @zindexPopover + @zindexModal } - .tooltip { z-index: @zindexTooltip + @zindexModal } + .dropdown-menu { z-index: @zindexDropdown + @zindexModal; } + .dropdown.open { *z-index: @zindexDropdown + @zindexModal; } + .popover { z-index: @zindexPopover + @zindexModal; } + .tooltip { z-index: @zindexTooltip + @zindexModal; } } .modal-backdrop { -- cgit v1.2.3 From 2bfda031cebcde7361797dd54badeb91d4cb98cf Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 12:43:19 -0800 Subject: darken buttons, uncomment out firefox keyframes from progress bars --- less/buttons.less | 8 ++++---- less/progress-bars.less | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 54d00a13a..d5a4353b3 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -25,19 +25,19 @@ color: rgba(255,255,255,.75); } &.primary { - .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 15)); + .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20)); } // Danger and error appear as red &.danger { - .buttonBackground(#ee5f5b, #c43c35); + .buttonBackground(#ee5f5b, #bd362f); } // Success appears as green &.success { - .buttonBackground(#62c462, #57a957); + .buttonBackground(#62c462, #51a351); } // Info appears as a neutral blue &.info { - .buttonBackground(#5bc0de, #339bb9); + .buttonBackground(#5bc0de, #2f96b4); } } diff --git a/less/progress-bars.less b/less/progress-bars.less index 228972f2c..cfca78d68 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -11,11 +11,10 @@ to { background-position: 40px 0; } } -// Temporarily commented out since LESS won't compile with this -// @-moz-keyframes progress-bar-stripes { -// from { background-position: 0 0; } -// to { background-position: 40px 0; } -// } +@-moz-keyframes progress-bar-stripes { + from { background-position: 0 0; } + to { background-position: 40px 0; } +} // Spec @keyframes progress-bar-stripes { -- cgit v1.2.3 From b77161f8647f791319c684a191c2308b6dd05100 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 12:49:26 -0800 Subject: reset border-radius only for ie9? --- less/forms.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index b8cb48b48..9565c52d7 100644 --- a/less/forms.less +++ b/less/forms.less @@ -86,7 +86,7 @@ input[type="radio"] { line-height: normal; border: none; cursor: pointer; - .border-radius(0); + border-radius: 0 e("\0/"); } // Reset the file input to browser defaults -- cgit v1.2.3 From 70c6a6cd855a617b086682ef919e02cf67d4e86e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 12:58:26 -0800 Subject: fix border and border radius on radios/checkboxes for iOS, fix forms docs alignment on small devices --- less/forms.less | 1 + less/responsive.less | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 9565c52d7..f327b4faa 100644 --- a/less/forms.less +++ b/less/forms.less @@ -85,6 +85,7 @@ input[type="radio"] { *margin-top: 0; /* IE7 */ line-height: normal; border: none; + border: initial; cursor: pointer; border-radius: 0 e("\0/"); } diff --git a/less/responsive.less b/less/responsive.less index 24b58d2ab..4ce4aff72 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -50,7 +50,8 @@ } // Move over buttons in .form-actions to align with .controls .form-horizontal .form-actions { - padding-left: 0; + padding-left: 10px; + padding-right: 10px; } // Modals -- cgit v1.2.3 From 296d06a285d91200b4063f3bdde65c094495ee24 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 13:07:01 -0800 Subject: add checkbox/radio border for ios in responsive --- less/forms.less | 3 +-- less/responsive.less | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index f327b4faa..3792bf420 100644 --- a/less/forms.less +++ b/less/forms.less @@ -84,8 +84,7 @@ input[type="radio"] { margin: 3px 0; *margin-top: 0; /* IE7 */ line-height: normal; - border: none; - border: initial; + border: 0; cursor: pointer; border-radius: 0 e("\0/"); } diff --git a/less/responsive.less b/less/responsive.less index 4ce4aff72..2d49f2095 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -33,6 +33,12 @@ line-height: @baseLineHeight; } + // Update checkboxes for iOS + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + // Remove the horizontal form styles .form-horizontal .control-group > label { float: none; -- cgit v1.2.3 From 1a22c3b30aa67b4f092b164fad188050af8bbab2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 13:13:01 -0800 Subject: restore IE filters, but reset them on buttons --- less/mixins.less | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 5daa22234..2bfcd053e 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -298,6 +298,7 @@ background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 background-image: linear-gradient(left, @startColor, @endColor); // Le standard background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down } .vertical(@startColor: #555, @endColor: #333) { background-color: mix(@startColor, @endColor, 60%); @@ -308,6 +309,7 @@ background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 background-image: linear-gradient(top, @startColor, @endColor); // The standard background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down } .directional(@startColor: #555, @endColor: #333, @deg: 45deg) { background-color: @endColor; @@ -327,6 +329,7 @@ background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); background-repeat: no-repeat; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback } .radial(@innerColor: #555, @outerColor: #333) { background-color: @outerColor; @@ -347,6 +350,10 @@ background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); } } +// Reset filters for IE +.reset-filter() { + filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); +} // Mixin for generating button backgrounds @@ -354,6 +361,7 @@ .buttonBackground(@startColor, @endColor) { // gradientBar will set the background to a pleasing blend of these, to support IE<=9 .gradientBar(@startColor, @endColor); + .reset-filter(); // in these cases the gradient won't cover the background, so we override &:hover, &:active, &.active, &.disabled, &[disabled] { -- cgit v1.2.3 From d96c0c781d49ae87b51221e4aefe025c2c1f3c5a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 14:20:27 -0800 Subject: comment for progress bars firefox keyframes --- less/progress-bars.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/progress-bars.less b/less/progress-bars.less index cfca78d68..eeb14eef7 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -11,6 +11,7 @@ to { background-position: 40px 0; } } +// Firefox @-moz-keyframes progress-bar-stripes { from { background-position: 0 0; } to { background-position: 40px 0; } -- cgit v1.2.3 From 9db4f2a344ebf452b88ac4af0261192f3a8e9eb6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 14:30:45 -0800 Subject: change .span* inputs to use content-sizing: border-box; to make them behave as block level elements --- less/responsive.less | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 2d49f2095..ef2df5f1d 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -33,6 +33,26 @@ line-height: @baseLineHeight; } + // Make span* classes full width + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + height: 28px; /* Make inputs at least the height of their button counterpart */ + /* Makes inputs behave like true block-level elements */ + -webkit-box-sizing: border-box; /* Older Webkit */ + -moz-box-sizing: border-box; /* Older FF */ + -ms-box-sizing: border-box; /* IE8 */ + box-sizing: border-box; /* CSS3 spec*/ + } + // But don't let it screw up prepend/append inputs + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + width: auto; + } + // Update checkboxes for iOS input[type="checkbox"], input[type="radio"] { -- cgit v1.2.3 From 7843a665fdc18c1199766d6c65f192209ec35741 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 14:50:56 -0800 Subject: vertical align inline checkboxes/radios to improve rendering in topbar --- less/forms.less | 3 ++- less/navbar.less | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 3792bf420..b0daeb034 100644 --- a/less/forms.less +++ b/less/forms.less @@ -86,7 +86,7 @@ input[type="radio"] { line-height: normal; border: 0; cursor: pointer; - border-radius: 0 e("\0/"); + border-radius: 0 e("\0/"); // Nuke border-radius for IE9 only } // Reset the file input to browser defaults @@ -169,6 +169,7 @@ input[type="hidden"] { .checkbox.inline { display: inline-block; margin-bottom: 0; + vertical-align: middle; } .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { diff --git a/less/navbar.less b/less/navbar.less index 287459a27..63484fc3c 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -63,6 +63,15 @@ margin-top: 5px; margin-bottom: 0; } + .radio, + .checkbox { + margin-top: 5px; + } + input[type="image"], + input[type="checkbox"], + input[type="radio"] { + margin-top: 3px; + } } // Navbar search -- cgit v1.2.3 From 23e076c1bb73c4950d473cb36218937b2607bc13 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 15:09:23 -0800 Subject: add in a navbar button for toggling the nav items --- less/bootstrap.less | 10 +++++----- less/navbar.less | 23 +++++++++++++++++++++++ less/responsive.less | 5 +++++ 3 files changed, 33 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/bootstrap.less b/less/bootstrap.less index 3dad408c9..ea84f4899 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -33,6 +33,11 @@ @import "component-animations.less"; @import "close.less"; +// Components: Buttons & Alerts +@import "buttons.less"; +@import "button-groups.less"; +@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less + // Components: Nav @import "navs.less"; @import "navbar.less"; @@ -45,11 +50,6 @@ @import "tooltip.less"; @import "popovers.less"; -// Components: Buttons & Alerts -@import "buttons.less"; -@import "button-groups.less"; -@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less - // Components: Misc @import "thumbnails.less"; @import "labels.less"; diff --git a/less/navbar.less b/less/navbar.less index 63484fc3c..a72c0d74e 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -16,6 +16,29 @@ .box-shadow(@shadow); } +// Navbar button for toggling navbar items in responsive layouts +.btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 10px; + margin-right: 10px; + .buttonBackground(@navbarBackgroundHighlight, @navbarBackground); + @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + .box-shadow(@shadow); +} +.btn-navbar .i-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + .border-radius(1px); + .box-shadow(0 1px 0 rgba(0,0,0,.25)); +} +.btn-navbar .i-bar + .i-bar { + margin-top: 3px; +} + // Brand, links, text, and buttons .navbar { // Hover and active states diff --git a/less/responsive.less b/less/responsive.less index ef2df5f1d..cc3b2882f 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -127,6 +127,11 @@ margin: 0; } + // Navbar button + .btn-navbar { + display: block; + } + } -- cgit v1.2.3 From 6493cd22c0c72c60354ebbd6d7887bcbbf4e263a Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 28 Jan 2012 15:14:57 -0800 Subject: blah --- less/carousel.less | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/carousel.less b/less/carousel.less index 254a9f60c..4163b069f 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -26,15 +26,15 @@ line-height: 1; } - .active, - .next, + .active, + .next, .prev { display: block; } .active { left: 0; } - .next, + .next, .prev { position: absolute; top: 0; @@ -47,7 +47,7 @@ .prev { left: -100%; } - .next.left, + .next.left, .prev.right { left: 0; } @@ -80,7 +80,13 @@ border: 3px solid @white; .border-radius(23px); .opacity(50); - .transition(all .2s linear); + + // we can't have this transition here + // because webkit cancels the carousel + // animation if you trip this while + // in the middle of another animation + // ;_; + // .transition(opacity .2s linear); // Reposition the right one &.right { -- cgit v1.2.3 From b8a683d7f250a11d349a3e5de0d75ace9d67df0c Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 28 Jan 2012 15:42:07 -0800 Subject: turn off brand hover for now + get nav toggling in mobile --- less/accordion.less | 4 ++-- less/navbar.less | 3 +-- less/responsive.less | 15 +++++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'less') diff --git a/less/accordion.less b/less/accordion.less index d5c00238c..1ebd5b1a1 100644 --- a/less/accordion.less +++ b/less/accordion.less @@ -1,5 +1,5 @@ -// COLLAPSE -// -------- +// ACCORDION +// --------- // Parent container diff --git a/less/navbar.less b/less/navbar.less index a72c0d74e..379cbb56d 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -43,7 +43,6 @@ .navbar { // Hover and active states .brand:hover { - color: @white; text-decoration: none; } // Website or project name @@ -286,4 +285,4 @@ left: auto; right: 13px; } -} +} \ No newline at end of file diff --git a/less/responsive.less b/less/responsive.less index cc3b2882f..6c3102c14 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -126,12 +126,6 @@ width: auto; margin: 0; } - - // Navbar button - .btn-navbar { - display: block; - } - } @@ -292,6 +286,15 @@ padding-left: 10px; padding-right: 10px; } + // Navbar button + .btn-navbar { + display: block; + } + + .nav-collapse { + overflow: hidden; + height: 0; + } } -- cgit v1.2.3 From 475b985a0efaf534b56089f12c570d7861ce72f5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 16:37:43 -0800 Subject: remove padding from first-child of inline radios/checkboxes --- less/forms.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index b0daeb034..69ddbcac9 100644 --- a/less/forms.less +++ b/less/forms.less @@ -175,6 +175,11 @@ input[type="hidden"] { .checkbox.inline + .checkbox.inline { margin-left: 10px; // space out consecutive inline controls } +// But don't forget to remove their padding on first-child +.controls > .radio.inline:first-child, +.controls > .checkbox.inline:first-child { + padding-top: 5px; // has to be padding because margin collaspes +} -- cgit v1.2.3 From 06df91ac559686e947c3c1fbfbdd2b7dcfc5a56b Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 16:48:03 -0800 Subject: remove background from accordion, and use border instead --- less/accordion.less | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/accordion.less b/less/accordion.less index 1ebd5b1a1..11a36b544 100644 --- a/less/accordion.less +++ b/less/accordion.less @@ -9,7 +9,8 @@ // Group == heading + body .accordion-group { - background-color: #f5f5f5; + margin-bottom: 2px; + border: 1px solid #e5e5e5; .border-radius(4px); } .accordion-heading { @@ -19,9 +20,6 @@ display: block; padding: 8px 15px; } -.accordion-body { - margin-bottom: 2px; -} // Inner needs the styles because you can't animate properly with any styles on the element .accordion-inner { -- cgit v1.2.3 From 4fa931e403ec3ae2f8f7f690c6c4040365f68ba9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:11:31 -0800 Subject: fix the navbar click and a few jank responsive problems --- less/navbar.less | 4 ++-- less/responsive.less | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 379cbb56d..4fd8a9073 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -21,8 +21,8 @@ display: none; float: right; padding: 7px 10px; - margin-left: 10px; - margin-right: 10px; + margin-left: 5px; + margin-right: 5px; .buttonBackground(@navbarBackgroundHighlight, @navbarBackground); @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); .box-shadow(@shadow); diff --git a/less/responsive.less b/less/responsive.less index 6c3102c14..0955710b6 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -202,7 +202,7 @@ margin-bottom: @baseLineHeight * 2; } .navbar-inner { - padding: 10px; + padding: 5px; background-image: none; } .navbar .container { @@ -210,16 +210,18 @@ } // Account for brand name .navbar .brand { - float: none; - display: block; - padding-left: 15px; - padding-right: 15px; - margin: 0; + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + // Nav collapse clears brand + .navbar .nav-collapse { + clear: left; } // Block-level the nav .navbar .nav { float: none; - margin: (@baseLineHeight / 2) 0; + margin: 0 0 (@baseLineHeight / 2); } .navbar .nav > li { float: none; @@ -248,8 +250,10 @@ // Dropdowns in the navbar .navbar .dropdown-menu { position: static; - display: block; + top: auto; + left: auto; float: none; + display: block; max-width: none; margin: 0 15px; padding: 0; @@ -301,7 +305,7 @@ // LARGE DESKTOP & UP // ------------------ -/* + @media (min-width: 1210px) { // Reset grid variables @@ -317,7 +321,6 @@ .offset(@columns: 1) { margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); } - .container { width: @siteWidth; } @@ -354,7 +357,5 @@ .offset9 { .offset(9); } .offset10 { .offset(10); } .offset11 { .offset(11); } - .offset12 { .offset(12); } } -*/ \ No newline at end of file -- cgit v1.2.3 From e532228721734492d6f2741f729525cc1bb3c77c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:25:05 -0800 Subject: more responsive tweaks for tablet --- less/responsive.less | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 0955710b6..fba5b3656 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -135,10 +135,10 @@ @media (min-width: 768px) and (max-width: 940px) { // Reset grid variables - @gridColumns: 16; - @gridColumnWidth: 44px; + @gridColumns: 12; + @gridColumnWidth: 42px; @gridGutterWidth: 20px; - @siteWidth: 748px; + @siteWidth: 724px; // Bring grid mixins to recalculate widths .columns(@columns: 1) { @@ -148,11 +148,11 @@ margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); } - // 16cols at 30px wide with 16px gutters + // 12cols at 44px wide with 20px gutters .container { width: @siteWidth; - padding-left: 10px; - padding-right: 10px; + padding-left: 20px; + padding-right: 20px; } // Default columns @@ -181,7 +181,6 @@ .offset9 { .offset(9); } .offset10 { .offset(10); } .offset11 { .offset(11); } - .offset12 { .offset(12); } } @@ -295,6 +294,7 @@ display: block; } + // Hide everything in the navbar save .brand and toggle button */ .nav-collapse { overflow: hidden; height: 0; -- cgit v1.2.3 From cf1b46bda4853e8501c2b9587219535376a9cc36 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:46:41 -0800 Subject: fix alert close position --- less/alerts.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/alerts.less b/less/alerts.less index 23c17e704..562826fd3 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -18,6 +18,7 @@ // Adjust close link position .alert .close { position: relative; + top: -2px; right: -21px; line-height: 18px; } -- cgit v1.2.3 From f1e520badd51d01ebcd33758966ef868e5cdd1c2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 20:34:07 -0800 Subject: clarify and tweak media queries --- less/responsive.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index fba5b3656..732099079 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -306,7 +306,7 @@ // LARGE DESKTOP & UP // ------------------ -@media (min-width: 1210px) { +@media (min-width: 1200px) { // Reset grid variables @gridColumns: 12; -- cgit v1.2.3 From 59d9983ebcc889b5e5626d672311e92657bfe3e8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 22:03:14 -0800 Subject: updates to responsive and docs for responsive navbar --- less/navbar.less | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 4fd8a9073..404782e61 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -38,6 +38,10 @@ .btn-navbar .i-bar + .i-bar { margin-top: 3px; } +.nav-collapse.collapse { + height: auto !important; // Required to be !important to override native collapse plugin +} + // Brand, links, text, and buttons .navbar { -- cgit v1.2.3 From 487dbfdda4692e3212f13d5e6282d7818b4c9934 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 22:14:51 -0800 Subject: namespace progress bars and labels classes --- less/labels.less | 8 ++++---- less/progress-bars.less | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'less') diff --git a/less/labels.less b/less/labels.less index 06dc7f3c0..c0f427750 100644 --- a/less/labels.less +++ b/less/labels.less @@ -9,8 +9,8 @@ text-transform: uppercase; background-color: @grayLight; .border-radius(3px); - &.important { background-color: @errorText; } - &.warning { background-color: @orange; } - &.success { background-color: @successText; } - &.info { background-color: @infoText; } } +.label-important { background-color: @errorText; } +.label-warning { background-color: @orange; } +.label-success { background-color: @successText; } +.label-info { background-color: @infoText; } diff --git a/less/progress-bars.less b/less/progress-bars.less index eeb14eef7..ac820c610 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -71,25 +71,25 @@ // ------ // Danger (red) -.progress.danger .bar { +.progress-danger .bar { #gradient > .vertical(#ee5f5b, #c43c35); } -.progress.danger.striped .bar { +.progress-danger.progress-striped .bar { #gradient > .striped(#ee5f5b); } // Success (green) -.progress.success .bar { +.progress-success .bar { #gradient > .vertical(#62c462, #57a957); } -.progress.success.striped .bar { +.progress-success.progress-striped .bar { #gradient > .striped(#62c462); } // Info (teal) -.progress.info .bar { +.progress-info .bar { #gradient > .vertical(#5bc0de, #339bb9); } -.progress.info.striped .bar { +.progress-info.progress-striped .bar { #gradient > .striped(#5bc0de); } -- cgit v1.2.3 From 62f4a1571a3801c867b80c228464cc9c695f1d13 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 22:48:25 -0800 Subject: revamped the thumbnails examples to make them work and look better at higher resolution --- less/responsive.less | 8 ++++++++ less/thumbnails.less | 2 ++ 2 files changed, 10 insertions(+) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 732099079..db2675e3d 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -358,4 +358,12 @@ .offset10 { .offset(10); } .offset11 { .offset(11); } + // Thumbnails + .thumbnails { + margin-left: @gridGutterWidth * -1; + } + .thumbnails > li { + margin-left: @gridGutterWidth; + } + } diff --git a/less/thumbnails.less b/less/thumbnails.less index 0ba749059..541fbd6a7 100644 --- a/less/thumbnails.less +++ b/less/thumbnails.less @@ -27,6 +27,8 @@ a.thumbnail:hover { .thumbnail > img { display: block; max-width: 100%; + margin-left: auto; + margin-right: auto; } .thumbnail .caption { padding: 9px; -- cgit v1.2.3 From bca269299b242c55a2511e752429c07d7639f7d2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 23:40:52 -0800 Subject: removing required .navbar-static class, rewrote docs to reflect the change, and updated the upgrade docs page to include the navbar section --- less/navbar.less | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 404782e61..25ca7b4e2 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -7,11 +7,15 @@ .navbar { overflow: visible; + margin-bottom: @baseLineHeight; } -// gradient is applied to it's own element because overflow visible is not honored by IE when filter is present + +// Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present .navbar-inner { - background-color: @navbarBackground; + padding-left: 20px; + padding-right: 20px; #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground); + .border-radius(4px); @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); .box-shadow(@shadow); } @@ -142,20 +146,9 @@ } -// STATIC OR FIXED? -// ---------------- - -// Static navbar -.navbar-static { - margin-bottom: @baseLineHeight; -} -.navbar-static .navbar-inner { - padding-left: 20px; - padding-right: 20px; - .border-radius(4px); -} +// FIXED NAVBAR +// ------------ -// Fixed navbar .navbar-fixed-top { position: fixed; top: 0; @@ -163,6 +156,11 @@ left: 0; z-index: @zindexFixedNavbar; } +.navbar-fixed-top .navbar-inner { + padding-left: 0; + padding-right: 0; + .border-radius(0); +} // NAVIGATION -- cgit v1.2.3 From 7bf27674523c35f8803311a964dc72a7093351c0 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 00:07:01 -0800 Subject: remove form docs from the styles and markup, it's no longer needed --- less/forms.less | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 69ddbcac9..6b0f5ec52 100644 --- a/less/forms.less +++ b/less/forms.less @@ -495,9 +495,20 @@ select:focus:required:invalid { } } .form-search label, -.form-inline label { +.form-inline label, +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { display: inline-block; } +// Make the prepend and append add-on vertical-align: middle; +.form-search .input-append .add-on, +.form-inline .input-prepend .add-on, +.form-search .input-append .add-on, +.form-inline .input-prepend .add-on { + vertical-align: middle; +} // Margin to space out fieldsets .control-group { -- cgit v1.2.3 From 48529ad01fa2a60bfc9179743dcb5379e8ff944f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 13:06:57 -0800 Subject: last minute addition of a simple fluid grid for our fluid examples; it needs work, so we're not documenting it now --- less/grid.less | 73 ++++++++++++++++++++++++++++++++++++++--- less/layouts.less | 30 ++--------------- less/mixins.less | 21 +----------- less/responsive.less | 93 +++++++++++++++++++++++++++++++++++++++++++++++----- less/variables.less | 9 ----- 5 files changed, 157 insertions(+), 69 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index d5b5f487d..4493d0b95 100644 --- a/less/grid.less +++ b/less/grid.less @@ -1,14 +1,40 @@ // GRID SYSTEM // ----------- -// To customize the grid system, bring up the variables.less file and change the column count, size, and gutter there + + +// Default grid sizing +// ------------------- +@gridColumns: 12; +@gridColumnWidth: 60px; +@gridGutterWidth: 20px; + +@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); +@gridTotalWidth: @gridRowWidth; + + +// Columns and offseting mixins +// ---------------------------- +.columns(@columns: 1) { + //width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/@gridRowWidth); +} +.offset(@columns: 1) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); +} +// Necessary grid styles for every column to make them appear next to each other horizontally +.gridColumn() { + float: left; + margin-left: @gridGutterWidth; +} + +// Grid rows and columns +// --------------------- .row { margin-left: @gridGutterWidth * -1; .clearfix(); } -// Find all .span# classes within .row and give them the necessary properties for grid columns -// (supported by all browsers back to IE7) -// Credit to @dhg for the idea +// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg) [class*="span"] { .gridColumn(); } @@ -39,3 +65,42 @@ .offset9 { .offset(9); } .offset10 { .offset(10); } .offset11 { .offset(11); } + + + +// FLUID GRID SYSTEM +// ----------------- +// This is a very early and limited fluid grid system for now and will not be documented until it's refined in v2.1. + +.row-fluid { + @gridColumnWidth: 6.382978723%; + @gridGutterWidth: 2.127659574%; + + width: 100% * ((@gridGutterWidth + @gridRowWidth)/@gridRowWidth); + margin-left: 0 - @gridGutterWidth; + + // Redeclare the mixins + .gridColumn() { + float: left; + margin-left: @gridGutterWidth; + } + [class*="span"] { + .gridColumn(); + } + .fluidColumns(@columns: 1) { + width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/(@gridRowWidth+@gridGutterWidth)); + } + // Redeclare the columns + .span1 { .fluidColumns(1); } + .span2 { .fluidColumns(2); } + .span3 { .fluidColumns(3); } + .span4 { .fluidColumns(4); } + .span5 { .fluidColumns(5); } + .span6 { .fluidColumns(6); } + .span7 { .fluidColumns(7); } + .span8 { .fluidColumns(8); } + .span9 { .fluidColumns(9); } + .span10 { .fluidColumns(10); } + .span11 { .fluidColumns(11); } + .span12 { .fluidColumns(12); } +} diff --git a/less/layouts.less b/less/layouts.less index 14435c9d1..c8d358b24 100644 --- a/less/layouts.less +++ b/less/layouts.less @@ -10,34 +10,8 @@ } // Fluid layouts (left aligned, with sidebar, min- & max-width content) -.fluid-container { - position: relative; - min-width: @siteWidth; +.container-fluid { padding-left: @gridGutterWidth; padding-right: @gridGutterWidth; .clearfix(); -} - -// Sidebars (left and right options) -.fluid-sidebar { - width: @fluidSidebarWidth; - margin: 0 20px 18px; -} -.sidebar-left { padding-left: @fluidSidebarWidth + @gridGutterWidth * 2; } -.sidebar-right { padding-right: @fluidSidebarWidth + @gridGutterWidth * 2; } - -// Float the sidebars accordingly -.sidebar-left .fluid-sidebar { - float: left; - margin-left: (@fluidSidebarWidth + @gridGutterWidth) * -1; -} -.sidebar-right .fluid-sidebar { - float: right; - margin-right: (@fluidSidebarWidth + @gridGutterWidth) * -1; -} - -// The main content area -.fluid-content { - float: left; - width: 100%; -} +} \ No newline at end of file diff --git a/less/mixins.less b/less/mixins.less index 2bfcd053e..2d0e2d4c0 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -133,31 +133,12 @@ // Site container // ------------------------- .container-fixed() { - width: @siteWidth; + width: @gridTotalWidth; margin-left: auto; margin-right: auto; .clearfix(); } -// Columns and offseting -// ------------------------- -.columns(@columns: 1) { - width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); -} -.offset(@columns: 1) { - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); -} -// Necessary grid styles for every column to make them appear next to each other horizontally -.gridColumn() { - float: left; - margin-left: @gridGutterWidth; -} -// makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something -.makeColumn(@columnSpan: 1) { - .gridColumn(); - .columns(@columnSpan); -} - // CSS3 PROPERTIES diff --git a/less/responsive.less b/less/responsive.less index db2675e3d..107fa7dd7 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -115,6 +115,10 @@ width: auto; padding: 0 20px; } + // Fluid rows + .row-fluid { + width: 100%; + } // Undo negative margin on rows .row { margin-left: 0; @@ -182,6 +186,42 @@ .offset10 { .offset(10); } .offset11 { .offset(11); } + // FLUID GRID + // ---------- + .row-fluid { + @gridColumnWidth: 5.801104972%; + @gridGutterWidth: 2.762430939%; + @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); + @gridTotalWidth: @gridRowWidth; + + width: 100% * ((@gridGutterWidth + @gridRowWidth)/@gridRowWidth); + margin-left: 0 - @gridGutterWidth; + + // Redeclare the mixins + .gridColumn() { + float: left; + margin-left: @gridGutterWidth; + } + [class*="span"] { + .gridColumn(); + } + .fluidColumns(@columns: 1) { + width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/(@gridRowWidth+@gridGutterWidth)); + } + // Redeclare the columns + .span1 { .fluidColumns(1); } + .span2 { .fluidColumns(2); } + .span3 { .fluidColumns(3); } + .span4 { .fluidColumns(4); } + .span5 { .fluidColumns(5); } + .span6 { .fluidColumns(6); } + .span7 { .fluidColumns(7); } + .span8 { .fluidColumns(8); } + .span9 { .fluidColumns(9); } + .span10 { .fluidColumns(10); } + .span11 { .fluidColumns(11); } + .span12 { .fluidColumns(12); } + } } @@ -198,7 +238,7 @@ // Unfix the navbar .navbar-fixed-top { position: static; - margin-bottom: @baseLineHeight * 2; + margin-bottom: @baseLineHeight; } .navbar-inner { padding: 5px; @@ -314,6 +354,14 @@ @gridGutterWidth: 30px; @siteWidth: 1170px; + // Thumbnails + .thumbnails { + margin-left: @gridGutterWidth * -1; + } + .thumbnails > li { + margin-left: @gridGutterWidth; + } + // Bring grid mixins to recalculate widths .columns(@columns: 1) { width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); @@ -358,12 +406,41 @@ .offset10 { .offset(10); } .offset11 { .offset(11); } - // Thumbnails - .thumbnails { - margin-left: @gridGutterWidth * -1; - } - .thumbnails > li { - margin-left: @gridGutterWidth; - } + // FLUID GRID + // ---------- + .row-fluid { + @gridColumnWidth: 5.982%; + @gridGutterWidth: 2.56%; + @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); + @gridTotalWidth: @gridRowWidth; + + width: 100% * ((@gridGutterWidth + @gridRowWidth)/@gridRowWidth); + margin-left: 0 - @gridGutterWidth; + + // Redeclare the mixins + .gridColumn() { + float: left; + margin-left: @gridGutterWidth; + } + [class*="span"] { + .gridColumn(); + } + .fluidColumns(@columns: 1) { + width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/(@gridRowWidth+@gridGutterWidth)); + } + // Redeclare the columns + .span1 { .fluidColumns(1); } + .span2 { .fluidColumns(2); } + .span3 { .fluidColumns(3); } + .span4 { .fluidColumns(4); } + .span5 { .fluidColumns(5); } + .span6 { .fluidColumns(6); } + .span7 { .fluidColumns(7); } + .span8 { .fluidColumns(8); } + .span9 { .fluidColumns(9); } + .span10 { .fluidColumns(10); } + .span11 { .fluidColumns(11); } + .span12 { .fluidColumns(12); } + } } diff --git a/less/variables.less b/less/variables.less index 4265d7ed3..c1e21978c 100644 --- a/less/variables.less +++ b/less/variables.less @@ -30,15 +30,6 @@ @pink: #c3325f; @purple: #7a43b6; -// Grid system -// Modify the grid styles in mixins.less -@gridColumns: 12; -@gridColumnWidth: 60px; -@gridGutterWidth: 20px; -@siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); -// Fluid width sidebar -@fluidSidebarWidth: 220px; - // Typography @baseFontSize: 13px; @baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; -- cgit v1.2.3 From 4e5b0e185e8cc9df3a77361380a44b16689fd2f7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 13:12:13 -0800 Subject: refined pager styles to give a border on the links and improved hover state --- less/pager.less | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/pager.less b/less/pager.less index de009afda..104e41cab 100644 --- a/less/pager.less +++ b/less/pager.less @@ -13,10 +13,15 @@ } .pager a { display: inline-block; - padding: 6px 15px; - background-color: #f5f5f5; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; .border-radius(15px); } +.pager a:hover { + text-decoration: none; + background-color: #f5f5f5; +} .pager .next a { float: right; } -- cgit v1.2.3 From 9fa8bde44d9bb6f26b16c7633a01bbe5ce7b20a4 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 13:15:38 -0800 Subject: fix animated/striped gradients in progress bars --- less/progress-bars.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/progress-bars.less b/less/progress-bars.less index ac820c610..c3144e1bd 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -53,7 +53,7 @@ } // Striped bars -.progress.striped .bar { +.progress-striped .bar { #gradient > .striped(#62c462); .background-size(40px 40px); } -- cgit v1.2.3 From 278858e70698f0dcf8651cb59b13e48fe756d8bd Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 13:25:13 -0800 Subject: fix form styles on prepend/append for consistency, update code docs with examples of the code snippets --- less/forms.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 6b0f5ec52..9d94a64b7 100644 --- a/less/forms.less +++ b/less/forms.less @@ -417,7 +417,7 @@ select:focus:required:invalid { min-width: 16px; height: @baseLineHeight; margin-right: -1px; - padding: 4px 4px 4px 5px; + padding: 4px 5px; font-weight: normal; line-height: @baseLineHeight; color: @grayLight; -- cgit v1.2.3 From 9e7f5025b494927e9ffc88119b0b9426f7487a62 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 14:07:14 -0800 Subject: update collapsible nav in navbar --- less/navbar.less | 3 ++- less/responsive.less | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 25ca7b4e2..b677b192b 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -42,8 +42,9 @@ .btn-navbar .i-bar + .i-bar { margin-top: 3px; } +// Override the default collapsed state .nav-collapse.collapse { - height: auto !important; // Required to be !important to override native collapse plugin + height: auto; } diff --git a/less/responsive.less b/less/responsive.less index 107fa7dd7..7ae28b825 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -240,7 +240,7 @@ position: static; margin-bottom: @baseLineHeight; } - .navbar-inner { + .navbar-fixed-top .navbar-inner { padding: 5px; background-image: none; } @@ -335,10 +335,13 @@ } // Hide everything in the navbar save .brand and toggle button */ - .nav-collapse { + .nav-collapse.collapse { overflow: hidden; height: 0; } + .nav-collapse.collapse.in { + height: auto; + } } -- cgit v1.2.3 From 702d3b6dfe7a150deb090f70d7d9c2a2964a3eb2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 16:35:55 -0800 Subject: fix broken navbar collapse --- less/responsive.less | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 7ae28b825..a1d4cf2c8 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -22,6 +22,7 @@ } + // UP TO LANDSCAPE PHONE // --------------------- @@ -103,11 +104,11 @@ } + // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET // -------------------------------------------------- @media (max-width: 768px) { - // GRID & CONTAINERS // ----------------- // Remove width from containers @@ -133,6 +134,7 @@ } + // PORTRAIT TABLET TO DEFAULT DESKTOP // ---------------------------------- @@ -225,6 +227,7 @@ } + // TABLETS AND BELOW // ----------------- @media (max-width: 940px) { @@ -335,17 +338,25 @@ } // Hide everything in the navbar save .brand and toggle button */ - .nav-collapse.collapse { + .nav-collapse { overflow: hidden; height: 0; } - .nav-collapse.collapse.in { - height: auto; - } +} + + + +// DEFAULT DESKTOP +// --------------- +@media (min-width: 940px) { + .nav-collapse.collapse { + height: auto !important; + } } + // LARGE DESKTOP & UP // ------------------ -- cgit v1.2.3 From fda77e69eb825f6b098a303fedcc96d257b4b050 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 29 Jan 2012 16:58:51 -0800 Subject: move vars and mixins for default grid back to appropriate files --- less/grid.less | 25 ------------------------- less/mixins.less | 15 +++++++++++++++ less/variables.less | 11 +++++++++++ 3 files changed, 26 insertions(+), 25 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 4493d0b95..2ef767a4a 100644 --- a/less/grid.less +++ b/less/grid.less @@ -2,31 +2,6 @@ // ----------- -// Default grid sizing -// ------------------- -@gridColumns: 12; -@gridColumnWidth: 60px; -@gridGutterWidth: 20px; - -@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); -@gridTotalWidth: @gridRowWidth; - - -// Columns and offseting mixins -// ---------------------------- -.columns(@columns: 1) { - //width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); - width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/@gridRowWidth); -} -.offset(@columns: 1) { - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); -} -// Necessary grid styles for every column to make them appear next to each other horizontally -.gridColumn() { - float: left; - margin-left: @gridGutterWidth; -} - // Grid rows and columns // --------------------- .row { diff --git a/less/mixins.less b/less/mixins.less index 2d0e2d4c0..cba2670db 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -139,6 +139,21 @@ .clearfix(); } +// Columns and offseting mixins +// ---------------------------- +.columns(@columns: 1) { + //width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/@gridRowWidth); +} +.offset(@columns: 1) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); +} +// Necessary grid styles for every column to make them appear next to each other horizontally +.gridColumn() { + float: left; + margin-left: @gridGutterWidth; +} + // CSS3 PROPERTIES diff --git a/less/variables.less b/less/variables.less index c1e21978c..f09a88cdb 100644 --- a/less/variables.less +++ b/less/variables.less @@ -40,6 +40,17 @@ +// GRID SYSTEM VARIABLES +// -------------------------------------------------- + +@gridColumns: 12; +@gridColumnWidth: 60px; +@gridGutterWidth: 20px; +@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); +@gridTotalWidth: @gridRowWidth; + + + // COMPONENT VARIABLES // -------------------------------------------------- -- cgit v1.2.3 From fae04c8ac1da675338c1cfaf3922223980667281 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 29 Jan 2012 19:04:26 -0800 Subject: add license for responsive and rebuild --- less/responsive.less | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index a1d4cf2c8..7f0892809 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -1,3 +1,13 @@ +/*! + * Bootstrap Responsive v2.0.0 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + // Responsive.less // For phone and tablet devices // ------------------------------------------------------------- @@ -203,7 +213,7 @@ .gridColumn() { float: left; margin-left: @gridGutterWidth; - } + } [class*="span"] { .gridColumn(); } @@ -436,7 +446,7 @@ .gridColumn() { float: left; margin-left: @gridGutterWidth; - } + } [class*="span"] { .gridColumn(); } -- cgit v1.2.3 From ae7f94eeff733584cbdc80a2d13a85f136a7744e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 00:39:44 -0800 Subject: overhaul grid mixins and variables, standardize fluid grid system and enable it across responsive layouts --- less/forms.less | 46 ++----------- less/grid.less | 81 ++-------------------- less/mixins.less | 134 ++++++++++++++++++++++++++++++++---- less/responsive.less | 190 ++++++--------------------------------------------- less/variables.less | 25 ++++--- 5 files changed, 166 insertions(+), 310 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 9d94a64b7..131f8af55 100644 --- a/less/forms.less +++ b/less/forms.less @@ -229,45 +229,13 @@ textarea[class*="span"], margin-left: 0; } -// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border -.inputColumns(@columnSpan: 1) { - width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10; -} -input, -textarea, -.uneditable-input { - // Default columns - &.span1 { .inputColumns(1); } - &.span2 { .inputColumns(2); } - &.span3 { .inputColumns(3); } - &.span4 { .inputColumns(4); } - &.span5 { .inputColumns(5); } - &.span6 { .inputColumns(6); } - &.span7 { .inputColumns(7); } - &.span8 { .inputColumns(8); } - &.span9 { .inputColumns(9); } - &.span10 { .inputColumns(10); } - &.span11 { .inputColumns(11); } - &.span12 { .inputColumns(12); } -} - -.selectColumns(@columnSpan: 1) { - width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) + 10; -} -select { - &.span1 { .selectColumns(1); } - &.span2 { .selectColumns(2); } - &.span3 { .selectColumns(3); } - &.span4 { .selectColumns(4); } - &.span5 { .selectColumns(5); } - &.span6 { .selectColumns(6); } - &.span7 { .selectColumns(7); } - &.span8 { .selectColumns(8); } - &.span9 { .selectColumns(9); } - &.span10 { .selectColumns(10); } - &.span11 { .selectColumns(11); } - &.span12 { .selectColumns(12); } -} + + +// GRID SIZING FOR INPUTS +// ---------------------- + +#inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth); + diff --git a/less/grid.less b/less/grid.less index 2ef767a4a..4acb0a44c 100644 --- a/less/grid.less +++ b/less/grid.less @@ -1,81 +1,8 @@ // GRID SYSTEM // ----------- +// Fixed (940px) +#gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth); -// Grid rows and columns -// --------------------- -.row { - margin-left: @gridGutterWidth * -1; - .clearfix(); -} - -// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg) -[class*="span"] { - .gridColumn(); -} - -// Default columns -.span1 { .columns(1); } -.span2 { .columns(2); } -.span3 { .columns(3); } -.span4 { .columns(4); } -.span5 { .columns(5); } -.span6 { .columns(6); } -.span7 { .columns(7); } -.span8 { .columns(8); } -.span9 { .columns(9); } -.span10 { .columns(10); } -.span11 { .columns(11); } -.span12 { .columns(12); } - -// Offset column options -.offset1 { .offset(1); } -.offset2 { .offset(2); } -.offset3 { .offset(3); } -.offset4 { .offset(4); } -.offset5 { .offset(5); } -.offset6 { .offset(6); } -.offset7 { .offset(7); } -.offset8 { .offset(8); } -.offset9 { .offset(9); } -.offset10 { .offset(10); } -.offset11 { .offset(11); } - - - -// FLUID GRID SYSTEM -// ----------------- -// This is a very early and limited fluid grid system for now and will not be documented until it's refined in v2.1. - -.row-fluid { - @gridColumnWidth: 6.382978723%; - @gridGutterWidth: 2.127659574%; - - width: 100% * ((@gridGutterWidth + @gridRowWidth)/@gridRowWidth); - margin-left: 0 - @gridGutterWidth; - - // Redeclare the mixins - .gridColumn() { - float: left; - margin-left: @gridGutterWidth; - } - [class*="span"] { - .gridColumn(); - } - .fluidColumns(@columns: 1) { - width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/(@gridRowWidth+@gridGutterWidth)); - } - // Redeclare the columns - .span1 { .fluidColumns(1); } - .span2 { .fluidColumns(2); } - .span3 { .fluidColumns(3); } - .span4 { .fluidColumns(4); } - .span5 { .fluidColumns(5); } - .span6 { .fluidColumns(6); } - .span7 { .fluidColumns(7); } - .span8 { .fluidColumns(8); } - .span9 { .fluidColumns(9); } - .span10 { .fluidColumns(10); } - .span11 { .fluidColumns(11); } - .span12 { .fluidColumns(12); } -} +// Fluid (940px) +#fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth); diff --git a/less/mixins.less b/less/mixins.less index cba2670db..39e1d8796 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -133,25 +133,135 @@ // Site container // ------------------------- .container-fixed() { - width: @gridTotalWidth; + width: @gridRowWidth; margin-left: auto; margin-right: auto; .clearfix(); } -// Columns and offseting mixins -// ---------------------------- -.columns(@columns: 1) { - //width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); - width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/@gridRowWidth); +// Le grid system +// ------------------------- +#gridSystem { + // Setup the mixins to be used + .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) { + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + } + .offset(@gridColumnWidth, @gridGutterWidth, @columns) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); + } + .gridColumn(@gridGutterWidth) { + float: left; + margin-left: @gridGutterWidth; + } + // Take these values and mixins, and make 'em do their thang + .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) { + // Row surrounds the columns + .row { + margin-left: @gridGutterWidth * -1; + .clearfix(); + } + // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg) + [class*="span"] { + #gridSystem > .gridColumn(@gridGutterWidth); + } + // Default columns + .span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); } + .span2 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); } + .span3 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); } + .span4 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); } + .span5 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); } + .span6 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); } + .span7 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); } + .span8 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); } + .span9 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); } + .span10 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); } + .span11 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); } + .span12, + .container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); } + // Offset column options + .offset1 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 1); } + .offset2 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 2); } + .offset3 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 3); } + .offset4 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 4); } + .offset5 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 5); } + .offset6 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 6); } + .offset7 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 7); } + .offset8 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 8); } + .offset9 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 9); } + .offset10 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 10); } + .offset11 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 11); } + } } -.offset(@columns: 1) { - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); + +// Fluid grid system +// ------------------------- +#fluidGridSystem { + // Setup the mixins to be used + .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) { + width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); + } + .gridColumn(@fluidGridGutterWidth) { + float: left; + margin-left: @fluidGridGutterWidth; + } + // Take these values and mixins, and make 'em do their thang + .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) { + // Row surrounds the columns + .row-fluid { + width: 100%; + .clearfix(); + + // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg) + [class*="span"] { + #fluidGridSystem > .gridColumn(@fluidGridGutterWidth); + } + [class*="span"]:first-child { + margin-left: 0; + } + // Default columns + .span1 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 1); } + .span2 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 2); } + .span3 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 3); } + .span4 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 4); } + .span5 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 5); } + .span6 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 6); } + .span7 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 7); } + .span8 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 8); } + .span9 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 9); } + .span10 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 10); } + .span11 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 11); } + .span12 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 12); } + } + } } -// Necessary grid styles for every column to make them appear next to each other horizontally -.gridColumn() { - float: left; - margin-left: @gridGutterWidth; + + + + +// Input grid system +// ------------------------- +#inputGridSystem { + .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) { + width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10; + } + .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) { + input, + textarea, + .uneditable-input { + &.span1 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); } + &.span2 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); } + &.span3 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); } + &.span4 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); } + &.span5 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); } + &.span6 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); } + &.span7 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); } + &.span8 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); } + &.span9 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); } + &.span10 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); } + &.span11 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); } + &.span12 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); } + } + } } diff --git a/less/responsive.less b/less/responsive.less index a1d4cf2c8..72fa21384 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -125,7 +125,8 @@ margin-left: 0; } // Make all columns even - .row > [class*="span"] { + .row > [class*="span"], + .row-fluid > [class*="span"] { float: none; display: block; width: auto; @@ -140,90 +141,15 @@ @media (min-width: 768px) and (max-width: 940px) { - // Reset grid variables - @gridColumns: 12; - @gridColumnWidth: 42px; - @gridGutterWidth: 20px; - @siteWidth: 724px; + // Fixed grid + #gridSystem > .generate(12, 42px, 20px); - // Bring grid mixins to recalculate widths - .columns(@columns: 1) { - width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); - } - .offset(@columns: 1) { - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); - } + // Fluid grid + #fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%); + + // Input grid + #inputGridSystem > .generate(12, 42px, 20px); - // 12cols at 44px wide with 20px gutters - .container { - width: @siteWidth; - padding-left: 20px; - padding-right: 20px; - } - - // Default columns - .span1 { .columns(1); } - .span2 { .columns(2); } - .span3 { .columns(3); } - .span4 { .columns(4); } - .span5 { .columns(5); } - .span6 { .columns(6); } - .span7 { .columns(7); } - .span8 { .columns(8); } - .span9 { .columns(9); } - .span10 { .columns(10); } - .span11 { .columns(11); } - .span12 { .columns(12); } - - // Offset column options - .offset1 { .offset(1); } - .offset2 { .offset(2); } - .offset3 { .offset(3); } - .offset4 { .offset(4); } - .offset5 { .offset(5); } - .offset6 { .offset(6); } - .offset7 { .offset(7); } - .offset8 { .offset(8); } - .offset9 { .offset(9); } - .offset10 { .offset(10); } - .offset11 { .offset(11); } - - // FLUID GRID - // ---------- - .row-fluid { - @gridColumnWidth: 5.801104972%; - @gridGutterWidth: 2.762430939%; - @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); - @gridTotalWidth: @gridRowWidth; - - width: 100% * ((@gridGutterWidth + @gridRowWidth)/@gridRowWidth); - margin-left: 0 - @gridGutterWidth; - - // Redeclare the mixins - .gridColumn() { - float: left; - margin-left: @gridGutterWidth; - } - [class*="span"] { - .gridColumn(); - } - .fluidColumns(@columns: 1) { - width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/(@gridRowWidth+@gridGutterWidth)); - } - // Redeclare the columns - .span1 { .fluidColumns(1); } - .span2 { .fluidColumns(2); } - .span3 { .fluidColumns(3); } - .span4 { .fluidColumns(4); } - .span5 { .fluidColumns(5); } - .span6 { .fluidColumns(6); } - .span7 { .fluidColumns(7); } - .span8 { .fluidColumns(8); } - .span9 { .fluidColumns(9); } - .span10 { .fluidColumns(10); } - .span11 { .fluidColumns(11); } - .span12 { .fluidColumns(12); } - } } @@ -362,99 +288,21 @@ @media (min-width: 1200px) { - // Reset grid variables - @gridColumns: 12; - @gridColumnWidth: 70px; - @gridGutterWidth: 30px; - @siteWidth: 1170px; + // Fixed grid + #gridSystem > .generate(12, 70px, 30px); + + // Fluid grid + #fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%); + + // Input grid + #inputGridSystem > .generate(12, 70px, 30px); // Thumbnails .thumbnails { - margin-left: @gridGutterWidth * -1; + margin-left: -30px; } .thumbnails > li { - margin-left: @gridGutterWidth; + margin-left: 30px; } - // Bring grid mixins to recalculate widths - .columns(@columns: 1) { - width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); - } - .offset(@columns: 1) { - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); - } - .container { - width: @siteWidth; - } - .row { - margin-left: @gridGutterWidth * -1; - } - [class*="span"] { - margin-left: @gridGutterWidth; - } - - // Default columns - .span1 { .columns(1); } - .span2 { .columns(2); } - .span3 { .columns(3); } - .span4 { .columns(4); } - .span5 { .columns(5); } - .span6 { .columns(6); } - .span7 { .columns(7); } - .span8 { .columns(8); } - .span9 { .columns(9); } - .span10 { .columns(10); } - .span11 { .columns(11); } - .span12 { .columns(12); } - - // Offset column options - .offset1 { .offset(1); } - .offset2 { .offset(2); } - .offset3 { .offset(3); } - .offset4 { .offset(4); } - .offset5 { .offset(5); } - .offset6 { .offset(6); } - .offset7 { .offset(7); } - .offset8 { .offset(8); } - .offset9 { .offset(9); } - .offset10 { .offset(10); } - .offset11 { .offset(11); } - - - // FLUID GRID - // ---------- - .row-fluid { - @gridColumnWidth: 5.982%; - @gridGutterWidth: 2.56%; - @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); - @gridTotalWidth: @gridRowWidth; - - width: 100% * ((@gridGutterWidth + @gridRowWidth)/@gridRowWidth); - margin-left: 0 - @gridGutterWidth; - - // Redeclare the mixins - .gridColumn() { - float: left; - margin-left: @gridGutterWidth; - } - [class*="span"] { - .gridColumn(); - } - .fluidColumns(@columns: 1) { - width: @gridTotalWidth * ((((@gridGutterWidth+@gridColumnWidth)*@columns)-@gridGutterWidth)/(@gridRowWidth+@gridGutterWidth)); - } - // Redeclare the columns - .span1 { .fluidColumns(1); } - .span2 { .fluidColumns(2); } - .span3 { .fluidColumns(3); } - .span4 { .fluidColumns(4); } - .span5 { .fluidColumns(5); } - .span6 { .fluidColumns(6); } - .span7 { .fluidColumns(7); } - .span8 { .fluidColumns(8); } - .span9 { .fluidColumns(9); } - .span10 { .fluidColumns(10); } - .span11 { .fluidColumns(11); } - .span12 { .fluidColumns(12); } - } } diff --git a/less/variables.less b/less/variables.less index f09a88cdb..d9d79f05c 100644 --- a/less/variables.less +++ b/less/variables.less @@ -40,17 +40,6 @@ -// GRID SYSTEM VARIABLES -// -------------------------------------------------- - -@gridColumns: 12; -@gridColumnWidth: 60px; -@gridGutterWidth: 20px; -@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); -@gridTotalWidth: @gridRowWidth; - - - // COMPONENT VARIABLES // -------------------------------------------------- @@ -94,3 +83,17 @@ @infoBorder: darken(spin(@infoBackground, -10), 7%); + +// GRID +// -------------------------------------------------- + +// Default 940px grid +@gridColumns: 12; +@gridColumnWidth: 60px; +@gridGutterWidth: 20px; +@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); + +// Fluid grid +@fluidGridColumnWidth: 6.382978723%; +@fluidGridGutterWidth: 2.127659574%; + -- cgit v1.2.3 From 8f448610a944efd134170f44e305ec6710bcff1a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 01:09:34 -0800 Subject: rename vertical-divider to divider-vertical, add more space around the divider --- less/navbar.less | 4 ++-- less/responsive.less | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index b677b192b..ccfbb6945 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -208,10 +208,10 @@ } // Dividers (basically a vertical hr) -.navbar .vertical-divider { +.navbar .divider-vertical { height: @navbarHeight; width: 1px; - margin: 0 5px; + margin: 0 9px; overflow: hidden; background-color: @navbarBackground; border-right: 1px solid @navbarBackgroundHighlight; diff --git a/less/responsive.less b/less/responsive.less index 2ec57b478..4a9fc6fb8 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -207,7 +207,7 @@ .navbar .nav > li > a { margin-bottom: 2px; } - .navbar .nav > .vertical-divider { + .navbar .nav > .divider-vertical { display: none; } // Nav and dropdown links in navbar -- cgit v1.2.3 From f4e5bc1c536f0e2bd77958dd5575863808d4cfe4 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 01:20:51 -0800 Subject: namespace popover values --- less/popovers.less | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'less') diff --git a/less/popovers.less b/less/popovers.less index 6de314d86..558d99ec9 100644 --- a/less/popovers.less +++ b/less/popovers.less @@ -21,29 +21,29 @@ width: 0; height: 0; } - .inner { - padding: 3px; - width: 280px; - overflow: hidden; - background: @black; // has to be full background declaration for IE fallback - background: rgba(0,0,0,.8); - .border-radius(6px); - .box-shadow(0 3px 7px rgba(0,0,0,0.3)); +} +.popover-inner { + padding: 3px; + width: 280px; + overflow: hidden; + background: @black; // has to be full background declaration for IE fallback + background: rgba(0,0,0,.8); + .border-radius(6px); + .box-shadow(0 3px 7px rgba(0,0,0,0.3)); +} +.popover-title { + padding: 9px 15px; + line-height: 1; + background-color: #f5f5f5; + border-bottom:1px solid #eee; + .border-radius(3px 3px 0 0); +} +.popover-content { + padding: 14px; + background-color: @white; + .border-radius(0 0 3px 3px); + .background-clip(padding-box); + p, ul, ol { + margin-bottom: 0; } - .title { - padding: 9px 15px; - line-height: 1; - background-color: #f5f5f5; - border-bottom:1px solid #eee; - .border-radius(3px 3px 0 0); - } - .content { - padding: 14px; - background-color: @white; - .border-radius(0 0 3px 3px); - .background-clip(padding-box); - p, ul, ol { - margin-bottom: 0; - } - } -} \ No newline at end of file +} -- cgit v1.2.3 From 9ba70796e2a25154689fa428d07018e877bbd6e4 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 07:40:24 -0800 Subject: remove top 5px padding from first inline radio/checkbox --- less/forms.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 131f8af55..d70d532e8 100644 --- a/less/forms.less +++ b/less/forms.less @@ -178,7 +178,7 @@ input[type="hidden"] { // But don't forget to remove their padding on first-child .controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child { - padding-top: 5px; // has to be padding because margin collaspes + padding-top: 0; } -- cgit v1.2.3 From 2c8ca4f5e284d5160e021071ec5cda46710bb78d Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 07:54:47 -0800 Subject: add skew mixin --- less/mixins.less | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 39e1d8796..804f834e5 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -237,7 +237,6 @@ - // Input grid system // ------------------------- #inputGridSystem { @@ -314,6 +313,20 @@ -o-transform: translate(@x, @y); transform: translate(@x, @y); } +.skew(@x: 0, @y: 0) { + -webkit-transform: translate(@x, @y); + -moz-transform: translate(@x, @y); + -ms-transform: translate(@x, @y); + -o-transform: translate(@x, @y); + transform: translate(@x, @y); +} +.skew(@x: 0, @y: 0) { + -webkit-transform: skew(@x, @y); + -moz-transform: skew(@x, @y); + -ms-transform: skew(@x, @y); + -o-transform: skew(@x, @y); + transform: skew(@x, @y); +} // Background clipping // Heads up: FF 3.6 and under need "padding" instead of "padding-box" -- cgit v1.2.3 From 2d40b07afc62ce9d899a290ab33222fd18287190 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 08:15:28 -0800 Subject: adding warning (orange) button, fix responsive navbar problem --- less/buttons.less | 7 +++++++ less/mixins.less | 4 ++-- less/responsive.less | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index d5a4353b3..2bc457f65 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -9,6 +9,8 @@ // Set text color &.primary, &.primary:hover, + &.warning, + &.warning:hover, &.danger, &.danger:hover, &.success, @@ -19,6 +21,7 @@ color: @white } &.primary.active, + &.warning.active, &.danger.active, &.success.active, &.info.active { @@ -27,6 +30,10 @@ &.primary { .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20)); } + // Warning appears are orange + &.warning { + .buttonBackground(lighten(@orange, 15%), @orange); + } // Danger and error appear as red &.danger { .buttonBackground(#ee5f5b, #bd362f); diff --git a/less/mixins.less b/less/mixins.less index 804f834e5..545ccb9ba 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -212,10 +212,10 @@ .clearfix(); // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg) - [class*="span"] { + > [class*="span"] { #fluidGridSystem > .gridColumn(@fluidGridGutterWidth); } - [class*="span"]:first-child { + > [class*="span"]:first-child { margin-left: 0; } // Default columns diff --git a/less/responsive.less b/less/responsive.less index 4a9fc6fb8..e9920251e 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -184,6 +184,7 @@ background-image: none; } .navbar .container { + width: auto; padding: 0; } // Account for brand name -- cgit v1.2.3 From 3722c34b5032e5f1d4f6e8d28260b16ee48af4da Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 08:20:37 -0800 Subject: account for floated inputs in the .navbar-form --- less/navbar.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index ccfbb6945..eb19a2b07 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -88,6 +88,7 @@ // Navbar forms .navbar-form { margin-bottom: 0; // remove default bottom margin + .clearfix(); input, select { display: inline-block; -- cgit v1.2.3 From ac581eebac209ce20591bac2f726f35a9b22d750 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 09:19:25 -0800 Subject: large carousel images and margin bottom added --- less/carousel.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/carousel.less b/less/carousel.less index 4163b069f..8fbd30315 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -3,6 +3,7 @@ .carousel { position: relative; + margin-bottom: @baseLineHeight; line-height: 1; } -- cgit v1.2.3 From e94e0f1cf94e8232933a05cfe61efdb49dd64249 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 09:41:31 -0800 Subject: implement @textColor for body text --- less/scaffolding.less | 2 +- less/variables.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/scaffolding.less b/less/scaffolding.less index d8b3f56ab..47ce53818 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -11,7 +11,7 @@ body { font-family: @baseFontFamily; font-size: @baseFontSize; line-height: @baseLineHeight; - color: @gray; + color: @textColor; background-color: @white; } diff --git a/less/variables.less b/less/variables.less index d9d79f05c..f01c232e4 100644 --- a/less/variables.less +++ b/less/variables.less @@ -34,6 +34,7 @@ @baseFontSize: 13px; @baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; @baseLineHeight: 18px; +@textColor: @grayDark; // Buttons @primaryButtonBackground: @linkColor; @@ -96,4 +97,3 @@ // Fluid grid @fluidGridColumnWidth: 6.382978723%; @fluidGridGutterWidth: 2.127659574%; - -- cgit v1.2.3 From 155047c3e6cfe589f1f244cdeb4e37244ab206ca Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 30 Jan 2012 13:59:05 -0800 Subject: speed up topbar animation for responsive --- less/responsive.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index e9920251e..295625438 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -278,6 +278,7 @@ .nav-collapse { overflow: hidden; height: 0; + -webkit-transform: translate3d(0, 0, 0); // activate the GPU } } @@ -304,7 +305,7 @@ // Fluid grid #fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%); - + // Input grid #inputGridSystem > .generate(12, 70px, 30px); -- cgit v1.2.3 From 21bebe77feb9265b06d65e1e941cf7c73c4d90c1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 20:50:51 -0800 Subject: refactor buttons.less --- less/buttons.less | 219 +++++++++++++++++++++++++++++------------------------- 1 file changed, 118 insertions(+), 101 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 2bc457f65..ce725cd4b 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -2,57 +2,11 @@ // ------------- -// Colors -// ------ - -.btn { - // Set text color - &.primary, - &.primary:hover, - &.warning, - &.warning:hover, - &.danger, - &.danger:hover, - &.success, - &.success:hover, - &.info, - &.info:hover { - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - color: @white - } - &.primary.active, - &.warning.active, - &.danger.active, - &.success.active, - &.info.active { - color: rgba(255,255,255,.75); - } - &.primary { - .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20)); - } - // Warning appears are orange - &.warning { - .buttonBackground(lighten(@orange, 15%), @orange); - } - // Danger and error appear as red - &.danger { - .buttonBackground(#ee5f5b, #bd362f); - } - // Success appears as green - &.success { - .buttonBackground(#62c462, #51a351); - } - // Info appears as a neutral blue - &.info { - .buttonBackground(#5bc0de, #2f96b4); - } -} - // Base styles -// ----------- +// -------------------------------------------------- +// Core .btn { - // Button Base display: inline-block; padding: 4px 10px 4px; font-size: @baseFontSize; @@ -68,70 +22,133 @@ .box-shadow(@shadow); cursor: pointer; + // Give IE7 some love .ie7-restore-left-whitespace(); +} - &:hover { - color: @grayDark; - text-decoration: none; - background-color: darken(@white, 10%); - background-position: 0 -15px; +// Hover state +.btn:hover { + color: @grayDark; + text-decoration: none; + background-color: darken(@white, 10%); + background-position: 0 -15px; - // transition is only when going to hover, otherwise the background - // behind the gradient (there for IE<=9 fallback) gets mismatched - .transition(background-position .1s linear); - } + // transition is only when going to hover, otherwise the background + // behind the gradient (there for IE<=9 fallback) gets mismatched + .transition(background-position .1s linear); +} - // Focus state for keyboard and accessibility - &:focus { - .tab-focus(); - } +// Focus state for keyboard and accessibility +.btn:focus { + .tab-focus(); +} - // Active and Disabled states - &.active, - &:active { - background-image: none; - @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); - background-color: darken(@white, 10%); - background-color: darken(@white, 15%) e("\9"); - color: rgba(0,0,0,.5); - outline: 0; - } - &.disabled, - &[disabled] { - cursor: default; - background-image: none; - background-color: darken(@white, 10%); - .opacity(65); - .box-shadow(none); - } +// Active state +.btn.active, +.btn:active { + background-image: none; + @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); + background-color: darken(@white, 10%); + background-color: darken(@white, 15%) e("\9"); + color: rgba(0,0,0,.5); + outline: 0; +} - // Button Sizes - &.large { - padding: 9px 14px; - font-size: @baseFontSize + 2px; - line-height: normal; - .border-radius(5px); - } - &.large .icon { - margin-top: 1px; - } - &.small { - padding: 5px 9px; - font-size: @baseFontSize - 2px; - line-height: @baseLineHeight - 2px; - } - &.small .icon { - margin-top: -1px; - } +// Disabled state +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + background-color: darken(@white, 10%); + .opacity(65); + .box-shadow(none); +} + + +// Button Sizes +// -------------------------------------------------- + +// Large +.btn.large { + padding: 9px 14px; + font-size: @baseFontSize + 2px; + line-height: normal; + .border-radius(5px); +} +.btn.large .icon { + margin-top: 1px; +} + +// Small +.btn.small { + padding: 5px 9px; + font-size: @baseFontSize - 2px; + line-height: @baseLineHeight - 2px; +} +.btn.small .icon { + margin-top: -1px; +} + + +// Alternate buttons +// -------------------------------------------------- + +// Set text color +// ------------------------- +.btn.primary, +.btn.primary:hover, +.btn.warning, +.btn.warning:hover, +.btn.danger, +.btn.danger:hover, +.btn.success, +.btn.success:hover, +.btn.info, +.btn.info:hover { + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + color: @white +} +// Provide *some* extra contrast for those who can get it +.btn.primary.active, +.btn.warning.active, +.btn.danger.active, +.btn.success.active, +.btn.info.active { + color: rgba(255,255,255,.75); +} + +// Set the backgrounds +// ------------------------- +.btn.primary { + .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20)); } +// Warning appears are orange +.btn.warning { + .buttonBackground(lighten(@orange, 15%), @orange); +} +// Danger and error appear as red +.btn.danger { + .buttonBackground(#ee5f5b, #bd362f); +} +// Success appears as green +.btn.success { + .buttonBackground(#62c462, #51a351); +} +// Info appears as a neutral blue +.btn.info { + .buttonBackground(#5bc0de, #2f96b4); +} + + +// Cross-browser Jank +// -------------------------------------------------- -// 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; + padding: 0; + border: 0; } // IE7 has some default padding on button controls -- cgit v1.2.3 From 0f3a073b8dca534e78c09b71999d5a2632e2245d Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 21:15:57 -0800 Subject: *really* refactor the buttons and update them all over the docs --- less/button-groups.less | 10 +++++----- less/buttons.less | 52 ++++++++++++++++++++++++------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 7367103ca..4b0523df2 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -130,10 +130,10 @@ // Account for other colors -.primary, -.danger, -.info, -.success { +.btn-primary, +.btn-danger, +.btn-info, +.btn-success { .caret { border-top-color: @white; .opacity(75); @@ -141,7 +141,7 @@ } // Small button dropdowns -.btn.small .caret { +.btn-small .caret { margin-top: 4px; } diff --git a/less/buttons.less b/less/buttons.less index ce725cd4b..48cfa7560 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -44,7 +44,7 @@ } // Active state -.btn.active, +.btn-active, .btn:active { background-image: none; @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); @@ -56,7 +56,7 @@ } // Disabled state -.btn.disabled, +.btn-disabled, .btn[disabled] { cursor: default; background-image: none; @@ -70,23 +70,23 @@ // -------------------------------------------------- // Large -.btn.large { +.btn-large { padding: 9px 14px; font-size: @baseFontSize + 2px; line-height: normal; .border-radius(5px); } -.btn.large .icon { +.btn-large .icon { margin-top: 1px; } // Small -.btn.small { +.btn-small { padding: 5px 9px; font-size: @baseFontSize - 2px; line-height: @baseLineHeight - 2px; } -.btn.small .icon { +.btn-small .icon { margin-top: -1px; } @@ -96,47 +96,47 @@ // Set text color // ------------------------- -.btn.primary, -.btn.primary:hover, -.btn.warning, -.btn.warning:hover, -.btn.danger, -.btn.danger:hover, -.btn.success, -.btn.success:hover, -.btn.info, -.btn.info:hover { +.btn-primary, +.btn-primary:hover, +.btn-warning, +.btn-warning:hover, +.btn-danger, +.btn-danger:hover, +.btn-success, +.btn-success:hover, +.btn-info, +.btn-info:hover { text-shadow: 0 -1px 0 rgba(0,0,0,.25); color: @white } // Provide *some* extra contrast for those who can get it -.btn.primary.active, -.btn.warning.active, -.btn.danger.active, -.btn.success.active, -.btn.info.active { +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active { color: rgba(255,255,255,.75); } // Set the backgrounds // ------------------------- -.btn.primary { +.btn-primary { .buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20)); } // Warning appears are orange -.btn.warning { +.btn-warning { .buttonBackground(lighten(@orange, 15%), @orange); } // Danger and error appear as red -.btn.danger { +.btn-danger { .buttonBackground(#ee5f5b, #bd362f); } // Success appears as green -.btn.success { +.btn-success { .buttonBackground(#62c462, #51a351); } // Info appears as a neutral blue -.btn.info { +.btn-info { .buttonBackground(#5bc0de, #2f96b4); } -- cgit v1.2.3 From 31911659a200d39d8494f35f8fd71863ac1226d0 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 21:29:50 -0800 Subject: refactor the navs to use prefixed classes, because you know, consistency is beast mode --- less/navs.less | 128 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) (limited to 'less') diff --git a/less/navs.less b/less/navs.less index aa718cd74..dfb2996f0 100644 --- a/less/navs.less +++ b/less/navs.less @@ -26,35 +26,35 @@ // NAV LIST // -------- -.nav.list { +.nav-list { padding-left: 14px; padding-right: 14px; margin-bottom: 0; } -.nav.list > li > a, -.nav.list .nav-header { +.nav-list > li > a, +.nav-list .nav-header { display: block; padding: 3px 15px; margin-left: -15px; margin-right: -15px; text-shadow: 0 1px 0 rgba(255,255,255,.5); } -.nav.list .nav-header { +.nav-list .nav-header { font-size: 11px; font-weight: bold; line-height: @baseLineHeight; color: @grayLight; text-transform: uppercase; } -.nav.list > li + .nav-header { +.nav-list > li + .nav-header { margin-top: 9px; } -.nav.list .active > a { +.nav-list .active > a { color: @white; text-shadow: 0 -1px 0 rgba(0,0,0,.2); background-color: @linkColor; } -.nav.list .icon { +.nav-list .icon { margin-right: 2px; } @@ -64,16 +64,16 @@ // ------------- // Common styles -.tabs, -.pills { +.nav-tabs, +.nav-pills { .clearfix(); } -.tabs > li, -.pills > li { +.nav-tabs > li, +.nav-pills > li { float: left; } -.tabs > li > a, -.pills > li > a { +.nav-tabs > li > a, +.nav-pills > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; @@ -84,17 +84,17 @@ // ---- // Give the tabs something to sit on -.tabs { +.nav-tabs { border-bottom: 1px solid #ddd; } // Make the list-items overlay the bottom border -.tabs > li { +.nav-tabs > li { margin-bottom: -1px; } // Actual tabs (as links) -.tabs > li > a { +.nav-tabs > li > a { padding-top: 9px; padding-bottom: 9px; border: 1px solid transparent; @@ -104,8 +104,8 @@ } } // Active state, and it's :hover to override normal :hover -.tabs > .active > a, -.tabs > .active > a:hover { +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover { color: @gray; background-color: @white; border: 1px solid #ddd; @@ -117,7 +117,7 @@ // ----- // Links rendered as pills -.pills > li > a { +.nav-pills > li > a { padding-top: 8px; padding-bottom: 8px; margin-top: 2px; @@ -126,8 +126,8 @@ } // Active state -.pills .active > a, -.pills .active > a:hover { +.nav-pills .active > a, +.nav-pills .active > a:hover { color: @white; background-color: @linkColor; } @@ -138,37 +138,37 @@ // ----------- // Stacked tabs and pills -.nav.stacked > li { +.nav-stacked > li { float: none; } -.nav.stacked > li > a { +.nav-stacked > li > a { margin-right: 0; // no need for the gap between nav items } // Tabs -.tabs.stacked { +.nav-tabs.nav-stacked { border-bottom: 0; } -.tabs.stacked > li > a { +.nav-tabs.nav-stacked > li > a { border: 1px solid #ddd; .border-radius(0); } -.tabs.stacked > li:first-child > a { +.nav-tabs.nav-stacked > li:first-child > a { .border-radius(4px 4px 0 0); } -.tabs.stacked > li:last-child > a { +.nav-tabs.nav-stacked > li:last-child > a { .border-radius(0 0 4px 4px); } -.tabs.stacked > li > a:hover { +.nav-tabs.nav-stacked > li > a:hover { border-color: #ddd; z-index: 2; } // Pills -.pills.stacked > li > a { +.nav-pills.nav-stacked > li > a { margin-bottom: 3px; } -.pills.stacked > li:last-child > a { +.nav-pills.nav-stacked > li:last-child > a { margin-bottom: 1px; // decrease margin to match sizing of stacked tabs } @@ -178,32 +178,32 @@ // --------- // Position the menu -.pills .dropdown-menu, -.tabs .dropdown-menu { +.nav-tabs .dropdown-menu, +.nav-pills .dropdown-menu { margin-top: 1px; border-width: 1px; } -.pills .dropdown-menu { +.nav-pills .dropdown-menu { .border-radius(4px); } // Default dropdown links // ------------------------- // Make carets use linkColor to start -.tabs .dropdown-toggle .caret, -.pills .dropdown-toggle .caret { +.nav-tabs .dropdown-toggle .caret, +.nav-pills .dropdown-toggle .caret { border-top-color: @linkColor; margin-top: 6px; } -.tabs .dropdown-toggle:hover .caret, -.pills .dropdown-toggle:hover .caret { +.nav-tabs .dropdown-toggle:hover .caret, +.nav-pills .dropdown-toggle:hover .caret { border-top-color: @linkColorHover; } // Active dropdown links // ------------------------- -.tabs .active .dropdown-toggle .caret, -.pills .active .dropdown-toggle .caret { +.nav-tabs .active .dropdown-toggle .caret, +.nav-pills .active .dropdown-toggle .caret { border-top-color: @grayDark; } @@ -216,8 +216,8 @@ // Open dropdowns // ------------------------- -.tabs .open .dropdown-toggle, -.pills .open .dropdown-toggle, +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover { color: @white; background-color: @grayLight; @@ -231,7 +231,7 @@ } // Dropdowns in stacked tabs -.tabs.stacked .open > a:hover { +.tabs-stacked .open > a:hover { border-color: @grayLight; } @@ -250,9 +250,9 @@ } // Remove border on bottom, left, right -.tabs-below .tabs, -.tabs-right .tabs, -.tabs-left .tabs { +.tabs-below .nav-tabs, +.tabs-right .nav-tabs, +.tabs-left .nav-tabs { border-bottom: 0; } @@ -270,22 +270,22 @@ // BOTTOM // ------ -.tabs-below .tabs { +.tabs-below .nav-tabs { border-top: 1px solid #ddd; } -.tabs-below .tabs > li { +.tabs-below .nav-tabs > li { margin-top: -1px; margin-bottom: 0; } -.tabs-below .tabs > li > a { +.tabs-below .nav-tabs > li > a { .border-radius(0 0 4px 4px); &:hover { border-bottom-color: transparent; border-top-color: #ddd; } } -.tabs-below .tabs .active > a, -.tabs-below .tabs .active > a:hover { +.tabs-below .nav-tabs .active > a, +.tabs-below .nav-tabs .active > a:hover { border-color: transparent #ddd #ddd #ddd; } @@ -293,51 +293,51 @@ // ------------ // Common styles -.tabs-left .tabs > li, -.tabs-right .tabs > li { +.tabs-left .nav-tabs > li, +.tabs-right .nav-tabs > li { float: none; } -.tabs-left .tabs > li > a, -.tabs-right .tabs > li > a { +.tabs-left .nav-tabs > li > a, +.tabs-right .nav-tabs > li > a { min-width: 74px; margin-right: 0; margin-bottom: 3px; } // Tabs on the left -.tabs-left .tabs { +.tabs-left .nav-tabs { float: left; margin-right: 19px; border-right: 1px solid #ddd; } -.tabs-left .tabs > li > a { +.tabs-left .nav-tabs > li > a { margin-right: -1px; .border-radius(4px 0 0 4px); } -.tabs-left .tabs > li > a:hover { +.tabs-left .nav-tabs > li > a:hover { border-color: @grayLighter #ddd @grayLighter @grayLighter; } -.tabs-left .tabs .active > a, -.tabs-left .tabs .active > a:hover { +.tabs-left .nav-tabs .active > a, +.tabs-left .nav-tabs .active > a:hover { border-color: #ddd transparent #ddd #ddd; *border-right-color: @white; } // Tabs on the right -.tabs-right .tabs { +.tabs-right .nav-tabs { float: right; margin-left: 19px; border-left: 1px solid #ddd; } -.tabs-right .tabs > li > a { +.tabs-right .nav-tabs > li > a { margin-left: -1px; .border-radius(0 4px 4px 0); } -.tabs-right .tabs > li > a:hover { +.tabs-right .nav-tabs > li > a:hover { border-color: @grayLighter @grayLighter @grayLighter #ddd; } -.tabs-right .tabs .active > a, -.tabs-right .tabs .active > a:hover { +.tabs-right .nav-tabs .active > a, +.tabs-right .nav-tabs .active > a:hover { border-color: #ddd #ddd #ddd transparent; *border-left-color: @white; } -- cgit v1.2.3 From 47a68ae3aa8cad828eebe529403b46210c9d9d16 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 22:57:00 -0800 Subject: update icons everywhere to be scoped per other components, fix broken elements on js docs page --- less/sprites.less | 265 +++++++++++++++++++++++++++--------------------------- 1 file changed, 133 insertions(+), 132 deletions(-) (limited to 'less') diff --git a/less/sprites.less b/less/sprites.less index a40d4dea4..c5c8fd725 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -6,150 +6,151 @@ // ICONS // ----- -// As of v2.0.0, the tag is reserved for icons from the Glyphicons set. -// All icons receive the styles of the tag with a base class of .icon -// and are then given a unique class to add width, height, and -// background-position. Your resulting HTML will look like this: -// . And for the white version of the icons, just -// add the .white class like this: +// All icons receive the styles of the tag with a base class +// of .i and are then given a unique class to add width, height, +// and background-position. Your resulting HTML will look like +// . -.icon { - background-image: url(../img/glyphicons-halflings.png); - background-position: 14px 14px; - background-repeat: no-repeat; +// For the white version of the icons, just add the .i-white class: +// + +.i { display: inline-block; - vertical-align: text-top; width: 14px; height: 14px; + vertical-align: text-top; + background-image: url(../img/glyphicons-halflings.png); + background-position: 14px 14px; + background-repeat: no-repeat; .ie7-restore-right-whitespace(); } -.icon.white { +.i-white { background-image: url(../img/glyphicons-halflings-white.png); } -.icon.glass { background-position: 0 0; } -.icon.music { background-position: -24px 0; } -.icon.search { background-position: -48px 0; } -.icon.envelope { background-position: -72px 0; } -.icon.heart { background-position: -96px 0; } -.icon.star { background-position: -120px 0; } -.icon.star-empty { background-position: -144px 0; } -.icon.user { background-position: -168px 0; } -.icon.film { background-position: -192px 0; } -.icon.th-large { background-position: -216px 0; } -.icon.th { background-position: -240px 0; } -.icon.th-list { background-position: -264px 0; } -.icon.ok { background-position: -288px 0; } -.icon.remove { background-position: -312px 0; } -.icon.zoom-in { background-position: -336px 0; } -.icon.zoom-out { background-position: -360px 0; } -.icon.off { background-position: -384px 0; } -.icon.signal { background-position: -408px 0; } -.icon.cog { background-position: -432px 0; } -.icon.trash { background-position: -456px 0; } +.i-glass { background-position: 0 0; } +.i-music { background-position: -24px 0; } +.i-search { background-position: -48px 0; } +.i-envelope { background-position: -72px 0; } +.i-heart { background-position: -96px 0; } +.i-star { background-position: -120px 0; } +.i-star-empty { background-position: -144px 0; } +.i-user { background-position: -168px 0; } +.i-film { background-position: -192px 0; } +.i-th-large { background-position: -216px 0; } +.i-th { background-position: -240px 0; } +.i-th-list { background-position: -264px 0; } +.i-ok { background-position: -288px 0; } +.i-remove { background-position: -312px 0; } +.i-zoom-in { background-position: -336px 0; } +.i-zoom-out { background-position: -360px 0; } +.i-off { background-position: -384px 0; } +.i-signal { background-position: -408px 0; } +.i-cog { background-position: -432px 0; } +.i-trash { background-position: -456px 0; } -.icon.home { background-position: 0 -24px; } -.icon.file { background-position: -24px -24px; } -.icon.time { background-position: -48px -24px; } -.icon.road { background-position: -72px -24px; } -.icon.download-alt { background-position: -96px -24px; } -.icon.download { background-position: -120px -24px; } -.icon.upload { background-position: -144px -24px; } -.icon.inbox { background-position: -168px -24px; } -.icon.play-circle { background-position: -192px -24px; } -.icon.repeat { background-position: -216px -24px; } -.icon.refresh { background-position: -240px -24px; } -.icon.list-alt { background-position: -264px -24px; } -.icon.lock { background-position: -287px -24px; } // 1px off -.icon.flag { background-position: -312px -24px; } -.icon.headphones { background-position: -336px -24px; } -.icon.volume-off { background-position: -360px -24px; } -.icon.volume-down { background-position: -384px -24px; } -.icon.volume-up { background-position: -408px -24px; } -.icon.qrcode { background-position: -432px -24px; } -.icon.barcode { background-position: -456px -24px; } +.i-home { background-position: 0 -24px; } +.i-file { background-position: -24px -24px; } +.i-time { background-position: -48px -24px; } +.i-road { background-position: -72px -24px; } +.i-download-alt { background-position: -96px -24px; } +.i-download { background-position: -120px -24px; } +.i-upload { background-position: -144px -24px; } +.i-inbox { background-position: -168px -24px; } +.i-play-circle { background-position: -192px -24px; } +.i-repeat { background-position: -216px -24px; } +.i-refresh { background-position: -240px -24px; } +.i-list-alt { background-position: -264px -24px; } +.i-lock { background-position: -287px -24px; } // 1px off +.i-flag { background-position: -312px -24px; } +.i-headphones { background-position: -336px -24px; } +.i-volume-off { background-position: -360px -24px; } +.i-volume-down { background-position: -384px -24px; } +.i-volume-up { background-position: -408px -24px; } +.i-qrcode { background-position: -432px -24px; } +.i-barcode { background-position: -456px -24px; } -.icon.tag { background-position: 0 -48px; } -.icon.tags { background-position: -25px -48px; } // 1px off -.icon.book { background-position: -48px -48px; } -.icon.bookmark { background-position: -72px -48px; } -.icon.print { background-position: -96px -48px; } -.icon.camera { background-position: -120px -48px; } -.icon.font { background-position: -144px -48px; } -.icon.bold { background-position: -167px -48px; } // 1px off -.icon.italic { background-position: -192px -48px; } -.icon.text-height { background-position: -216px -48px; } -.icon.text-width { background-position: -240px -48px; } -.icon.align-left { background-position: -264px -48px; } -.icon.align-center { background-position: -288px -48px; } -.icon.align-right { background-position: -312px -48px; } -.icon.align-justify { background-position: -336px -48px; } -.icon.list { background-position: -360px -48px; } -.icon.indent-left { background-position: -384px -48px; } -.icon.indent-right { background-position: -408px -48px; } -.icon.facetime-video { background-position: -432px -48px; } -.icon.picture { background-position: -456px -48px; } +.i-tag { background-position: 0 -48px; } +.i-tags { background-position: -25px -48px; } // 1px off +.i-book { background-position: -48px -48px; } +.i-bookmark { background-position: -72px -48px; } +.i-print { background-position: -96px -48px; } +.i-camera { background-position: -120px -48px; } +.i-font { background-position: -144px -48px; } +.i-bold { background-position: -167px -48px; } // 1px off +.i-italic { background-position: -192px -48px; } +.i-text-height { background-position: -216px -48px; } +.i-text-width { background-position: -240px -48px; } +.i-align-left { background-position: -264px -48px; } +.i-align-center { background-position: -288px -48px; } +.i-align-right { background-position: -312px -48px; } +.i-align-justify { background-position: -336px -48px; } +.i-list { background-position: -360px -48px; } +.i-indent-left { background-position: -384px -48px; } +.i-indent-right { background-position: -408px -48px; } +.i-facetime-video { background-position: -432px -48px; } +.i-picture { background-position: -456px -48px; } -.icon.pencil { background-position: 0 -72px; } -.icon.map-marker { background-position: -24px -72px; } -.icon.adjust { background-position: -48px -72px; } -.icon.tint { background-position: -72px -72px; } -.icon.edit { background-position: -96px -72px; } -.icon.share { background-position: -120px -72px; } -.icon.check { background-position: -144px -72px; } -.icon.move { background-position: -168px -72px; } -.icon.step-backward { background-position: -192px -72px; } -.icon.fast-backward { background-position: -216px -72px; } -.icon.backward { background-position: -240px -72px; } -.icon.play { background-position: -264px -72px; } -.icon.pause { background-position: -288px -72px; } -.icon.stop { background-position: -312px -72px; } -.icon.forward { background-position: -336px -72px; } -.icon.fast-forward { background-position: -360px -72px; } -.icon.step-forward { background-position: -384px -72px; } -.icon.eject { background-position: -408px -72px; } -.icon.chevron-left { background-position: -432px -72px; } -.icon.chevron-right { background-position: -456px -72px; } +.i-pencil { background-position: 0 -72px; } +.i-map-marker { background-position: -24px -72px; } +.i-adjust { background-position: -48px -72px; } +.i-tint { background-position: -72px -72px; } +.i-edit { background-position: -96px -72px; } +.i-share { background-position: -120px -72px; } +.i-check { background-position: -144px -72px; } +.i-move { background-position: -168px -72px; } +.i-step-backward { background-position: -192px -72px; } +.i-fast-backward { background-position: -216px -72px; } +.i-backward { background-position: -240px -72px; } +.i-play { background-position: -264px -72px; } +.i-pause { background-position: -288px -72px; } +.i-stop { background-position: -312px -72px; } +.i-forward { background-position: -336px -72px; } +.i-fast-forward { background-position: -360px -72px; } +.i-step-forward { background-position: -384px -72px; } +.i-eject { background-position: -408px -72px; } +.i-chevron-left { background-position: -432px -72px; } +.i-chevron-right { background-position: -456px -72px; } -.icon.plus-sign { background-position: 0 -96px; } -.icon.minus-sign { background-position: -24px -96px; } -.icon.remove-sign { background-position: -48px -96px; } -.icon.ok-sign { background-position: -72px -96px; } -.icon.question-sign { background-position: -96px -96px; } -.icon.info-sign { background-position: -120px -96px; } -.icon.screenshot { background-position: -144px -96px; } -.icon.remove-circle { background-position: -168px -96px; } -.icon.ok-circle { background-position: -192px -96px; } -.icon.ban-circle { background-position: -216px -96px; } -.icon.arrow-left { background-position: -240px -96px; } -.icon.arrow-right { background-position: -264px -96px; } -.icon.arrow-up { background-position: -289px -96px; } // 1px off -.icon.arrow-down { background-position: -312px -96px; } -.icon.share-alt { background-position: -336px -96px; } -.icon.resize-full { background-position: -360px -96px; } -.icon.resize-small { background-position: -384px -96px; } -.icon.plus { background-position: -408px -96px; } -.icon.minus { background-position: -433px -96px; } -.icon.asterisk { background-position: -456px -96px; } +.i-plus-sign { background-position: 0 -96px; } +.i-minus-sign { background-position: -24px -96px; } +.i-remove-sign { background-position: -48px -96px; } +.i-ok-sign { background-position: -72px -96px; } +.i-question-sign { background-position: -96px -96px; } +.i-info-sign { background-position: -120px -96px; } +.i-screenshot { background-position: -144px -96px; } +.i-remove-circle { background-position: -168px -96px; } +.i-ok-circle { background-position: -192px -96px; } +.i-ban-circle { background-position: -216px -96px; } +.i-arrow-left { background-position: -240px -96px; } +.i-arrow-right { background-position: -264px -96px; } +.i-arrow-up { background-position: -289px -96px; } // 1px off +.i-arrow-down { background-position: -312px -96px; } +.i-share-alt { background-position: -336px -96px; } +.i-resize-full { background-position: -360px -96px; } +.i-resize-small { background-position: -384px -96px; } +.i-plus { background-position: -408px -96px; } +.i-minus { background-position: -433px -96px; } +.i-asterisk { background-position: -456px -96px; } -.icon.exclamation-sign { background-position: 0 -120px; } -.icon.gift { background-position: -24px -120px; } -.icon.leaf { background-position: -48px -120px; } -.icon.fire { background-position: -72px -120px; } -.icon.eye-open { background-position: -96px -120px; } -.icon.eye-close { background-position: -120px -120px; } -.icon.warning-sign { background-position: -144px -120px; } -.icon.plane { background-position: -168px -120px; } -.icon.calendar { background-position: -192px -120px; } -.icon.random { background-position: -216px -120px; } -.icon.comment { background-position: -240px -120px; } -.icon.magnet { background-position: -264px -120px; } -.icon.chevron-up { background-position: -288px -120px; } -.icon.chevron-down { background-position: -313px -119px; } // 1px off -.icon.retweet { background-position: -336px -120px; } -.icon.shopping-cart { background-position: -360px -120px; } -.icon.folder-close { background-position: -384px -120px; } -.icon.folder-open { background-position: -408px -120px; } -.icon.resize-vertical { background-position: -432px -119px; } -.icon.resize-horizontal { background-position: -456px -118px; } +.i-exclamation-sign { background-position: 0 -120px; } +.i-gift { background-position: -24px -120px; } +.i-leaf { background-position: -48px -120px; } +.i-fire { background-position: -72px -120px; } +.i-eye-open { background-position: -96px -120px; } +.i-eye-close { background-position: -120px -120px; } +.i-warning-sign { background-position: -144px -120px; } +.i-plane { background-position: -168px -120px; } +.i-calendar { background-position: -192px -120px; } +.i-random { background-position: -216px -120px; } +.i-comment { background-position: -240px -120px; } +.i-magnet { background-position: -264px -120px; } +.i-chevron-up { background-position: -288px -120px; } +.i-chevron-down { background-position: -313px -119px; } // 1px off +.i-retweet { background-position: -336px -120px; } +.i-shopping-cart { background-position: -360px -120px; } +.i-folder-close { background-position: -384px -120px; } +.i-folder-open { background-position: -408px -120px; } +.i-resize-vertical { background-position: -432px -119px; } +.i-resize-horizontal { background-position: -456px -118px; } -- cgit v1.2.3 From 1cff29c33f97fc40de1f8d582d7b1a3f4c7783c5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 23:02:24 -0800 Subject: restore a few commented out responsive items --- less/responsive.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less') diff --git a/less/responsive.less b/less/responsive.less index 295625438..0f45c0985 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -181,7 +181,6 @@ } .navbar-fixed-top .navbar-inner { padding: 5px; - background-image: none; } .navbar .container { width: auto; -- cgit v1.2.3 From 5c9a687665f7851435e29b28afb02b450a5903a4 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 23:16:27 -0800 Subject: fix button styles on active and disabled --- less/buttons.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 48cfa7560..07a2b5879 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -44,7 +44,7 @@ } // Active state -.btn-active, +.btn.active, .btn:active { background-image: none; @shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); @@ -56,7 +56,7 @@ } // Disabled state -.btn-disabled, +.btn.disabled, .btn[disabled] { cursor: default; background-image: none; -- cgit v1.2.3 From d533310bd2fa157edb076f9047af8f1cff0fca05 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 23:24:35 -0800 Subject: once more, overhaul the icons and use the css regex selector on our icons --- less/sprites.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/sprites.less b/less/sprites.less index c5c8fd725..6e1f1ba9c 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -14,7 +14,7 @@ // For the white version of the icons, just add the .i-white class: // -.i { +[class*="i-"] { display: inline-block; width: 14px; height: 14px; -- cgit v1.2.3 From 4d93b639164f4331dc8b52ae1bcb824dddb97370 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 30 Jan 2012 23:27:58 -0800 Subject: disable cursor on disabled and active pagination links --- less/pagination.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/pagination.less b/less/pagination.less index 8ecb2a401..de5780759 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -30,6 +30,7 @@ } .pagination .active a { color: @grayLight; + cursor: default; } .pagination .disabled a, .pagination .disabled a:hover { -- cgit v1.2.3 From b7713b83fa25f4b28869fe846b04baac00ca781b Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 31 Jan 2012 00:11:19 -0800 Subject: chance icon class --- less/navbar.less | 4 +- less/sprites.less | 250 +++++++++++++++++++++++++++--------------------------- 2 files changed, 127 insertions(+), 127 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index eb19a2b07..93c0400b6 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -31,7 +31,7 @@ @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); .box-shadow(@shadow); } -.btn-navbar .i-bar { +.btn-navbar .icon-bar { display: block; width: 18px; height: 2px; @@ -39,7 +39,7 @@ .border-radius(1px); .box-shadow(0 1px 0 rgba(0,0,0,.25)); } -.btn-navbar .i-bar + .i-bar { +.btn-navbar .icon-bar + .icon-bar { margin-top: 3px; } // Override the default collapsed state diff --git a/less/sprites.less b/less/sprites.less index 6e1f1ba9c..9a68fe048 100644 --- a/less/sprites.less +++ b/less/sprites.less @@ -9,12 +9,12 @@ // All icons receive the styles of the tag with a base class // of .i and are then given a unique class to add width, height, // and background-position. Your resulting HTML will look like -// . +// . -// For the white version of the icons, just add the .i-white class: -// +// For the white version of the icons, just add the .icon-white class: +// -[class*="i-"] { +[class*="icon-"] { display: inline-block; width: 14px; height: 14px; @@ -25,132 +25,132 @@ .ie7-restore-right-whitespace(); } -.i-white { +.icon-white { background-image: url(../img/glyphicons-halflings-white.png); } -.i-glass { background-position: 0 0; } -.i-music { background-position: -24px 0; } -.i-search { background-position: -48px 0; } -.i-envelope { background-position: -72px 0; } -.i-heart { background-position: -96px 0; } -.i-star { background-position: -120px 0; } -.i-star-empty { background-position: -144px 0; } -.i-user { background-position: -168px 0; } -.i-film { background-position: -192px 0; } -.i-th-large { background-position: -216px 0; } -.i-th { background-position: -240px 0; } -.i-th-list { background-position: -264px 0; } -.i-ok { background-position: -288px 0; } -.i-remove { background-position: -312px 0; } -.i-zoom-in { background-position: -336px 0; } -.i-zoom-out { background-position: -360px 0; } -.i-off { background-position: -384px 0; } -.i-signal { background-position: -408px 0; } -.i-cog { background-position: -432px 0; } -.i-trash { background-position: -456px 0; } +.icon-glass { background-position: 0 0; } +.icon-music { background-position: -24px 0; } +.icon-search { background-position: -48px 0; } +.icon-envelope { background-position: -72px 0; } +.icon-heart { background-position: -96px 0; } +.icon-star { background-position: -120px 0; } +.icon-star-empty { background-position: -144px 0; } +.icon-user { background-position: -168px 0; } +.icon-film { background-position: -192px 0; } +.icon-th-large { background-position: -216px 0; } +.icon-th { background-position: -240px 0; } +.icon-th-list { background-position: -264px 0; } +.icon-ok { background-position: -288px 0; } +.icon-remove { background-position: -312px 0; } +.icon-zoom-in { background-position: -336px 0; } +.icon-zoom-out { background-position: -360px 0; } +.icon-off { background-position: -384px 0; } +.icon-signal { background-position: -408px 0; } +.icon-cog { background-position: -432px 0; } +.icon-trash { background-position: -456px 0; } -.i-home { background-position: 0 -24px; } -.i-file { background-position: -24px -24px; } -.i-time { background-position: -48px -24px; } -.i-road { background-position: -72px -24px; } -.i-download-alt { background-position: -96px -24px; } -.i-download { background-position: -120px -24px; } -.i-upload { background-position: -144px -24px; } -.i-inbox { background-position: -168px -24px; } -.i-play-circle { background-position: -192px -24px; } -.i-repeat { background-position: -216px -24px; } -.i-refresh { background-position: -240px -24px; } -.i-list-alt { background-position: -264px -24px; } -.i-lock { background-position: -287px -24px; } // 1px off -.i-flag { background-position: -312px -24px; } -.i-headphones { background-position: -336px -24px; } -.i-volume-off { background-position: -360px -24px; } -.i-volume-down { background-position: -384px -24px; } -.i-volume-up { background-position: -408px -24px; } -.i-qrcode { background-position: -432px -24px; } -.i-barcode { background-position: -456px -24px; } +.icon-home { background-position: 0 -24px; } +.icon-file { background-position: -24px -24px; } +.icon-time { background-position: -48px -24px; } +.icon-road { background-position: -72px -24px; } +.icon-download-alt { background-position: -96px -24px; } +.icon-download { background-position: -120px -24px; } +.icon-upload { background-position: -144px -24px; } +.icon-inbox { background-position: -168px -24px; } +.icon-play-circle { background-position: -192px -24px; } +.icon-repeat { background-position: -216px -24px; } +.icon-refresh { background-position: -240px -24px; } +.icon-list-alt { background-position: -264px -24px; } +.icon-lock { background-position: -287px -24px; } // 1px off +.icon-flag { background-position: -312px -24px; } +.icon-headphones { background-position: -336px -24px; } +.icon-volume-off { background-position: -360px -24px; } +.icon-volume-down { background-position: -384px -24px; } +.icon-volume-up { background-position: -408px -24px; } +.icon-qrcode { background-position: -432px -24px; } +.icon-barcode { background-position: -456px -24px; } -.i-tag { background-position: 0 -48px; } -.i-tags { background-position: -25px -48px; } // 1px off -.i-book { background-position: -48px -48px; } -.i-bookmark { background-position: -72px -48px; } -.i-print { background-position: -96px -48px; } -.i-camera { background-position: -120px -48px; } -.i-font { background-position: -144px -48px; } -.i-bold { background-position: -167px -48px; } // 1px off -.i-italic { background-position: -192px -48px; } -.i-text-height { background-position: -216px -48px; } -.i-text-width { background-position: -240px -48px; } -.i-align-left { background-position: -264px -48px; } -.i-align-center { background-position: -288px -48px; } -.i-align-right { background-position: -312px -48px; } -.i-align-justify { background-position: -336px -48px; } -.i-list { background-position: -360px -48px; } -.i-indent-left { background-position: -384px -48px; } -.i-indent-right { background-position: -408px -48px; } -.i-facetime-video { background-position: -432px -48px; } -.i-picture { background-position: -456px -48px; } +.icon-tag { background-position: 0 -48px; } +.icon-tags { background-position: -25px -48px; } // 1px off +.icon-book { background-position: -48px -48px; } +.icon-bookmark { background-position: -72px -48px; } +.icon-print { background-position: -96px -48px; } +.icon-camera { background-position: -120px -48px; } +.icon-font { background-position: -144px -48px; } +.icon-bold { background-position: -167px -48px; } // 1px off +.icon-italic { background-position: -192px -48px; } +.icon-text-height { background-position: -216px -48px; } +.icon-text-width { background-position: -240px -48px; } +.icon-align-left { background-position: -264px -48px; } +.icon-align-center { background-position: -288px -48px; } +.icon-align-right { background-position: -312px -48px; } +.icon-align-justify { background-position: -336px -48px; } +.icon-list { background-position: -360px -48px; } +.icon-indent-left { background-position: -384px -48px; } +.icon-indent-right { background-position: -408px -48px; } +.icon-facetime-video { background-position: -432px -48px; } +.icon-picture { background-position: -456px -48px; } -.i-pencil { background-position: 0 -72px; } -.i-map-marker { background-position: -24px -72px; } -.i-adjust { background-position: -48px -72px; } -.i-tint { background-position: -72px -72px; } -.i-edit { background-position: -96px -72px; } -.i-share { background-position: -120px -72px; } -.i-check { background-position: -144px -72px; } -.i-move { background-position: -168px -72px; } -.i-step-backward { background-position: -192px -72px; } -.i-fast-backward { background-position: -216px -72px; } -.i-backward { background-position: -240px -72px; } -.i-play { background-position: -264px -72px; } -.i-pause { background-position: -288px -72px; } -.i-stop { background-position: -312px -72px; } -.i-forward { background-position: -336px -72px; } -.i-fast-forward { background-position: -360px -72px; } -.i-step-forward { background-position: -384px -72px; } -.i-eject { background-position: -408px -72px; } -.i-chevron-left { background-position: -432px -72px; } -.i-chevron-right { background-position: -456px -72px; } +.icon-pencil { background-position: 0 -72px; } +.icon-map-marker { background-position: -24px -72px; } +.icon-adjust { background-position: -48px -72px; } +.icon-tint { background-position: -72px -72px; } +.icon-edit { background-position: -96px -72px; } +.icon-share { background-position: -120px -72px; } +.icon-check { background-position: -144px -72px; } +.icon-move { background-position: -168px -72px; } +.icon-step-backward { background-position: -192px -72px; } +.icon-fast-backward { background-position: -216px -72px; } +.icon-backward { background-position: -240px -72px; } +.icon-play { background-position: -264px -72px; } +.icon-pause { background-position: -288px -72px; } +.icon-stop { background-position: -312px -72px; } +.icon-forward { background-position: -336px -72px; } +.icon-fast-forward { background-position: -360px -72px; } +.icon-step-forward { background-position: -384px -72px; } +.icon-eject { background-position: -408px -72px; } +.icon-chevron-left { background-position: -432px -72px; } +.icon-chevron-right { background-position: -456px -72px; } -.i-plus-sign { background-position: 0 -96px; } -.i-minus-sign { background-position: -24px -96px; } -.i-remove-sign { background-position: -48px -96px; } -.i-ok-sign { background-position: -72px -96px; } -.i-question-sign { background-position: -96px -96px; } -.i-info-sign { background-position: -120px -96px; } -.i-screenshot { background-position: -144px -96px; } -.i-remove-circle { background-position: -168px -96px; } -.i-ok-circle { background-position: -192px -96px; } -.i-ban-circle { background-position: -216px -96px; } -.i-arrow-left { background-position: -240px -96px; } -.i-arrow-right { background-position: -264px -96px; } -.i-arrow-up { background-position: -289px -96px; } // 1px off -.i-arrow-down { background-position: -312px -96px; } -.i-share-alt { background-position: -336px -96px; } -.i-resize-full { background-position: -360px -96px; } -.i-resize-small { background-position: -384px -96px; } -.i-plus { background-position: -408px -96px; } -.i-minus { background-position: -433px -96px; } -.i-asterisk { background-position: -456px -96px; } +.icon-plus-sign { background-position: 0 -96px; } +.icon-minus-sign { background-position: -24px -96px; } +.icon-remove-sign { background-position: -48px -96px; } +.icon-ok-sign { background-position: -72px -96px; } +.icon-question-sign { background-position: -96px -96px; } +.icon-info-sign { background-position: -120px -96px; } +.icon-screenshot { background-position: -144px -96px; } +.icon-remove-circle { background-position: -168px -96px; } +.icon-ok-circle { background-position: -192px -96px; } +.icon-ban-circle { background-position: -216px -96px; } +.icon-arrow-left { background-position: -240px -96px; } +.icon-arrow-right { background-position: -264px -96px; } +.icon-arrow-up { background-position: -289px -96px; } // 1px off +.icon-arrow-down { background-position: -312px -96px; } +.icon-share-alt { background-position: -336px -96px; } +.icon-resize-full { background-position: -360px -96px; } +.icon-resize-small { background-position: -384px -96px; } +.icon-plus { background-position: -408px -96px; } +.icon-minus { background-position: -433px -96px; } +.icon-asterisk { background-position: -456px -96px; } -.i-exclamation-sign { background-position: 0 -120px; } -.i-gift { background-position: -24px -120px; } -.i-leaf { background-position: -48px -120px; } -.i-fire { background-position: -72px -120px; } -.i-eye-open { background-position: -96px -120px; } -.i-eye-close { background-position: -120px -120px; } -.i-warning-sign { background-position: -144px -120px; } -.i-plane { background-position: -168px -120px; } -.i-calendar { background-position: -192px -120px; } -.i-random { background-position: -216px -120px; } -.i-comment { background-position: -240px -120px; } -.i-magnet { background-position: -264px -120px; } -.i-chevron-up { background-position: -288px -120px; } -.i-chevron-down { background-position: -313px -119px; } // 1px off -.i-retweet { background-position: -336px -120px; } -.i-shopping-cart { background-position: -360px -120px; } -.i-folder-close { background-position: -384px -120px; } -.i-folder-open { background-position: -408px -120px; } -.i-resize-vertical { background-position: -432px -119px; } -.i-resize-horizontal { background-position: -456px -118px; } +.icon-exclamation-sign { background-position: 0 -120px; } +.icon-gift { background-position: -24px -120px; } +.icon-leaf { background-position: -48px -120px; } +.icon-fire { background-position: -72px -120px; } +.icon-eye-open { background-position: -96px -120px; } +.icon-eye-close { background-position: -120px -120px; } +.icon-warning-sign { background-position: -144px -120px; } +.icon-plane { background-position: -168px -120px; } +.icon-calendar { background-position: -192px -120px; } +.icon-random { background-position: -216px -120px; } +.icon-comment { background-position: -240px -120px; } +.icon-magnet { background-position: -264px -120px; } +.icon-chevron-up { background-position: -288px -120px; } +.icon-chevron-down { background-position: -313px -119px; } // 1px off +.icon-retweet { background-position: -336px -120px; } +.icon-shopping-cart { background-position: -360px -120px; } +.icon-folder-close { background-position: -384px -120px; } +.icon-folder-open { background-position: -408px -120px; } +.icon-resize-vertical { background-position: -432px -119px; } +.icon-resize-horizontal { background-position: -456px -118px; } -- cgit v1.2.3