diff options
| author | Mark Otto <[email protected]> | 2011-12-09 11:32:07 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2011-12-09 11:32:07 -0800 |
| commit | b12b71bf7ca76437a532122d8efff59506b61530 (patch) | |
| tree | ee29b67ee0f42fcecadbaf87a8577c9601dcab61 /lib | |
| parent | bc51c15709469fd0c2e78886a15e849626a8f191 (diff) | |
| download | bootstrap-b12b71bf7ca76437a532122d8efff59506b61530.tar.xz bootstrap-b12b71bf7ca76437a532122d8efff59506b61530.zip | |
updated to include sub nav and pip nav, new docs updates, topbar nav refinements for media queried settings
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/patterns.less | 3 | ||||
| -rw-r--r-- | lib/responsive.less | 90 | ||||
| -rw-r--r-- | lib/tabs-pills.less | 7 |
3 files changed, 69 insertions, 31 deletions
diff --git a/lib/patterns.less b/lib/patterns.less index 15c3c9c06..cd2fdc01e 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -13,7 +13,6 @@ // Common styles .navbar { - height: @navBarHeight; overflow: visible; } // gradient is applied to it's own element because overflow visible is not honored by ie when filter is present @@ -303,8 +302,6 @@ - - // PAGE HEADERS // ------------ diff --git a/lib/responsive.less b/lib/responsive.less index f63f90c98..e0772b111 100644 --- a/lib/responsive.less +++ b/lib/responsive.less @@ -3,26 +3,21 @@ // ------------------------------------------------------------- +// RESPONSIVE CLASSES +// ------------------ + +// Hide from screenreaders and browsers +// Credit: HTML5BP +.hidden { + display: none; + visibility: hidden; +} + + // UP TO LANDSCAPE PHONE // --------------------- @media (max-width: 480px) { - // Remove width from containers - .container { - width: auto; - padding: 0 15px; - } - // Undo negative margin on rows - .row { - margin-left: 0; - } - // Make all columns even - [class*="span"] { - float: none; - display: block; - width: auto; - margin: 0; - } // Resize modals .modal { width: auto; @@ -30,36 +25,35 @@ } // Remove the horizontal form styles - .form-horizontal .control-group > label { + .horizontal-form .control-group > label { float: none; width: auto; padding-top: 0; text-align: left; } // Move over all input controls and content - .form-horizontal .controls { + .horizontal-form .controls { margin-left: 0; } // Move the options list down to align with labels - .form-horizontal .control-list { + .horizontal-form .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 { + .horizontal-form .form-actions { padding-left: 0; } - } // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET // -------------------------------------------------- -@media (min-width: 480px) and (max-width: 768px) { +@media (max-width: 768px) { // Remove width from containers .container { width: auto; - padding: 0 10px; + padding: 0 20px; } // Undo negative margin on rows .row { @@ -72,6 +66,54 @@ width: auto; margin: 0; } + + // Make the nav work for small devices + .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; + } + .navbar ul .active > a { + background-color: transparent; + } + .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 > .active a:hover { + background-color: rgba(255,255,255,.05); + } } @@ -129,7 +171,6 @@ } -/* // LARGE DESKTOP & UP // ------------------ @@ -185,4 +226,3 @@ .offset12 { .offset(12); } } -*/
\ No newline at end of file diff --git a/lib/tabs-pills.less b/lib/tabs-pills.less index e9b58d04a..ad6459c0d 100644 --- a/lib/tabs-pills.less +++ b/lib/tabs-pills.less @@ -264,11 +264,12 @@ // Subnav // STILL A WIP .subnav { - position: relative; #gradient > .vertical(#f5f5f5, #eeeeee); - .border-radius(6px); + @shadow: inset 0 1px 0 #fff, 0 0 5px rgba(0,0,0,.5); + .box-shadow(@shadow); a { - padding: 10px 15px; + padding: 8px 10px; + font-size: 12px; color: @linkColor; text-shadow: 0 1px 0 #fff; border-left: 1px solid #f9f9f9; |
