/* Patterns.less * Repeatable UI elements outside the base styles provided from the scaffolding * ---------------------------------------------------------------------------- */ // TOPBAR // ------ // Topbar for Branding and Nav .navbar { height: 38px; position: fixed; top: 0; left: 0; right: 0; z-index: 10000; overflow: visible; // Links get text shadow a { color: @white; //text-shadow: 0 -1px 0 rgba(0,0,0,.25); font-weight: bold; } // Hover and active states // h3 for backwards compatibility h3 a:hover, .brand:hover, ul .active > a { background-color: @blue; color: @white; text-decoration: none; font-weight: bold; } // Website name // h3 left for backwards compatibility h3 { position: relative; } h3 a, .brand { float: left; display: block; padding: 4px 20px 12px; margin: 4px 0 0 -20px; // negative indent to left-align the text down the page color: @white; font-size: 20px; font-weight: 200; line-height: 1; } // Plain text in topbar p { margin: 0; line-height: 38px; a:hover { background-color: transparent; color: @white; } } // Search Form form { float: left; margin: 5px 0 0 0; position: relative; .opacity(100); } // Todo: remove from v2.0 when ready, added for legacy form.pull-right { float: right; } input { background-color: #444; background-color: rgba(255,255,255,.3); #font > .sans-serif(13px, normal, 1); padding: 4px 9px; color: @white; color: rgba(255,255,255,.75); border: 1px solid #111; .border-radius(4px); @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); .box-shadow(@shadow); .transition(none); // Placeholder text gets special styles; can't be bundled together though for some reason &:-moz-placeholder { color: @grayLighter; } &::-webkit-input-placeholder { color: @grayLighter; } // Hover states &:hover { background-color: @grayLight; background-color: rgba(255,255,255,.5); color: @white; } // Focus states (we use .focused since IE8 and down doesn't support :focus) &:focus, &.focused { outline: 0; background-color: @white; color: @grayDark; text-shadow: 0 1px 0 @white; border: 0; padding: 5px 10px; .box-shadow(0 0 3px rgba(0,0,0,.15)); } } } // gradient is applied to it's own element because overflow visible is not honored by ie when filter is present // For backwards compatibility, include .topbar .fill .navbar-inner, .navbar .fill { padding-top: 5px; background-color: @blueDark; @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); .box-shadow(@shadow); } // NAVIGATION // ---------- // Topbar Nav // ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity // For backwards compatibility, leave in .topbar div > ul .navbar div > ul, .nav { display: block; //float: left; margin: 4px 10px 0 0; position: relative; left: 0; .btn-primary { border: none; background-image: none; .gradientBar(@navbarBackground, @navbarBackground); color: @navbarLinkColor; .border-radius(0px); .box-shadow(none); } > li { display: block; //float: left; } a { display: block; float: none; padding: 10px 10px 11px; padding: 6px 10px 11px; line-height: 19px; text-decoration: none; &:hover { color: @white; text-decoration: none; background-color: @blue; } } .active > a { background-color: @blue; font-weight: bold; } // Secondary (floated right) nav in topbar &.secondary-nav { float: right; margin-left: 10px; margin-right: 0; // backwards compatibility .menu-dropdown, .dropdown-menu { right: 0; border: 0; } } // Dropdowns within the .nav // a.menu:hover and li.open .menu for backwards compatibility a.menu:hover, li.open .menu, .dropdown-toggle:hover, .dropdown.open .dropdown-toggle { background: @blueDark; background: rgba(255,255,255,.05); } // .menu-dropdown for backwards compatibility .menu-dropdown, .dropdown-menu { background-color: @blueDark; // a.menu for backwards compatibility a.menu, .dropdown-toggle { color: @white; &.open { background: @blue; background: rgba(255,255,255,.05); } } li a { color: @white; &:hover { color: @white; } } .active a { color: @white; } .divider { background-color: @blueDark; border-color: @blue; } } } // For backwards compatibility with new dropdowns, redeclare dropdown link padding .navbar ul .menu-dropdown li a, .navbar ul .dropdown-menu li a { padding: 4px 15px; } // Dropdown Menus // Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns // li.menu for backwards compatibility li.menu, .dropdown { position: relative; } // The link that is clicked to toggle the dropdown // a.menu for backwards compatibility a.menu:after, .dropdown-toggle:after { width: 0; height: 0; display: inline-block; content: "↓"; text-indent: -99999px; vertical-align: top; margin-top: 8px; margin-left: 4px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid @white; .opacity(50); } // The dropdown menu (ul) // .menu-dropdown for backwards compatibility .menu-dropdown, .dropdown-menu { background-color: @white; float: left; display: none; // None by default, but block on "open" of the menu position: absolute; top: 36px; z-index: 900; min-width: 160px; max-width: 220px; _width: 160px; margin-left: 0; // override default ul styles margin-right: 0; padding: 6px 0; zoom: 1; // do we need this? border-color: @blue; border-color: rgba(0,0,0,.2); border-style: solid; border-width: 1px 1px 1px; .border-radius(0 0 6px 6px); .box-shadow(0 2px 4px rgba(0,0,0,.2)); .background-clip(padding-box); // Unfloat any li's to make them stack li { float: none; display: block; background-color: none; } // Dividers (basically an hr) within the dropdown .divider { height: 1px; margin: 5px 0; overflow: hidden; background-color: #eee; border-bottom: 1px solid @white; } } .navbar .dropdown-menu, .dropdown-menu { // Links within the dropdown menu a { display: block; padding: 4px 15px; clear: both; font-weight: normal; line-height: 18px; color: @blue; // Hover state &:hover, &.hover { background-color: @blue; color: @white; text-decoration: none; @shadow: inset 0 1px 0 rgba(0,0,0,.025), inset 0 -1px rgba(0,0,0,.025); .box-shadow(@shadow); } } } // Open state for the dropdown // .open for backwards compatibility .open, .dropdown.open { // .menu for backwards compatibility .menu, .dropdown-toggle { color: @white; background: @blue; } // .menu-dropdown for backwards compatibility .menu-dropdown, .dropdown-menu { display: block; } } // TABS AND PILLS // -------------- // Common styles .tabs, .pills { margin: 0 0 @baseline; padding: 0; list-style: none; .clearfix(); > li { float: left; > a { display: block; } } } // Tabs .tabs { border-color: #ddd; border-style: solid; border-width: 0 0 1px; > li { position: relative; // For the dropdowns mostly margin-bottom: -1px; > a { padding: 0 15px; margin-right: 2px; line-height: (@baseline * 1.5); border: 1px solid transparent; .border-radius(@tabsBorderRadius @tabsBorderRadius 0 0); &:hover { text-decoration: none; background-color: #eee; border-color: #eee #eee #ddd; } } } // Active state, and it's :hover to override normal :hover .active > a, .active > a:hover { color: @gray; background-color: @white; border: 1px solid #ddd; border-bottom-color: transparent; cursor: default; } } // Dropdowns in tabs .tabs { // first one for backwards compatibility .menu-dropdown, .dropdown-menu { top: 25px; border-width: 1px; .border-radius(0 4px 4px 4px); } // first one for backwards compatibility a.menu:after, .dropdown-toggle:after { border-top-color: @blueDark; margin-top: 10px; margin-left: 5px; } // first one for backwards compatibility li.open.menu .menu, .open.dropdown .dropdown-toggle { border-color: @blueDark; } // first one for backwards compatibility li.open a.menu:after, .dropdown.open .dropdown-toggle:after { border-top-color: @blue; } } // Pills .pills { a { margin: 3px 3px 3px 0; padding: 0 10px; line-height: 20px; text-shadow: 0 1px 1px @white; .border-radius(@pillsBorderRadius); &:hover { color: @white; text-decoration: none; text-shadow: 0 1px 1px rgba(0,0,0,.25); background-color: @linkColorHover; } } .active a { color: @white; text-shadow: 0 1px 1px rgba(0,0,0,.25); background-color: @linkColor; } } // Stacked pills .pills-vertical > li { float: none; } // Tabbable areas .tab-content, .pill-content { } .tab-content > .tab-pane, .pill-content > .pill-pane, .tab-content > div, .pill-content > div { display: none; } .tab-content > .active, .pill-content > .active { display: block; } // BREADCRUMBS // ----------- .breadcrumb { padding: 7px 14px; margin: 0 0 @baseline; border: 1px solid #ddd; border-left: none; border-right: none; .border-radius(0px); li { display: inline; text-shadow: 0 1px 0 @white; } .divider { padding: 0 2px; } .active a { color: @grayDark; } } // PAGE HEADERS // ------------ .hero-unit { background-color: @grayWhite; margin-bottom: 30px; padding: 60px; .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: @baseline * 1.5; } } footer { margin-top: @baseline - 1; padding-top: @baseline - 1; border-top: 1px solid #eee; } // PAGE HEADERS // ------------ .page-header { margin-bottom: @baseline - 1; border-bottom: 1px solid #ddd; .box-shadow(0 1px 0 rgba(255,255,255,.5)); h1 { margin-bottom: (@baseline / 2) - 1px; } } // BUTTON STYLES // ------------- // Shared colors for buttons and alerts .btn, .alert-message { // Set text color &.success, &.success:hover, &.danger, &.danger:hover, &.error, &.error:hover, &.info, &.info:hover { color: @grayDark; } // Sets the close button to the middle of message .close{ font-family: Arial, sans-serif; line-height: @baseline; } // Danger and error appear as red &.danger, &.error { .gradientBar(@redLight, @redLight); } // Success (now blue, only for alert-message) &.success { .gradientBar(@blueLighter, @blueLighter); border-color: @blueLight; } // Info (now yellow) &.info { .gradientBar(@yellowLight, @yellowLight); } } // Base .btn styles .btn { // Button Base cursor: pointer; display: inline-block; //#gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient padding: 5px 12px 6px; color: #333; font-size: @basefont; font-weight: bold; line-height: @baseline; border: 1px solid @gray; border-bottom-color: @grayLight; .border-radius(0); //@shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); //.box-shadow(@shadow); &:hover { background-position: 0 -15px; color: #333; text-decoration: none; } // Focus state for keyboard and accessibility &:focus { outline: 1px dotted #666; } // Primary Button Type &.btn-primary { color: @white; .gradientBar(@linkColor, @linkColor); background-image: none; } // Success (green, only for btn) &.success { //.gradientBar(@greenLight, @greenLight); border-color: @green @green @greenDark; } // danger & error red (only btn) &.danger, &.error { .gradientBar(@red, @red); border-color: darken(@red, 5%) darken(@red, 5%) darken(@red, 20%); } &.success, &.danger, &.error { color: @white; &:hover { color: @white; } } // Transitions .transition(.1s linear all); // Active and Disabled states &.active, &:active { @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05); .box-shadow(@shadow); } &.disabled { cursor: default; .reset-filter(); .opacity(65); //.box-shadow(none); } &[disabled] { // disabled pseudo can't be included with .disabled // def because IE8 and below will drop it ;_; cursor: default; .reset-filter(); .opacity(65); } // Button Sizes &.large { font-size: @basefont + 2px; line-height: normal; padding: 9px 14px 9px; .border-radius(@btnBorderRadius); } &.small { padding: 4px 7px 5px 7px; font-size: @basefont - 2px; } } // Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons :root .alert-message, :root .btn { border-radius: 0 \0; } // Help Firefox not be a jerk about adding extra padding to buttons button.btn, input[type=submit].btn { &::-moz-focus-inner { padding: 0; border: 0; } } // CLOSE ICONS // ----------- .close { float: right; color: @black; font-size: 20px; font-weight: bold; line-height: @baseline * .75; text-shadow: 0 1px 0 rgba(255,255,255,1); .opacity(25); &:hover { color: @black; text-decoration: none; .opacity(40); } } // ERROR STYLES // ------------ // Base alert styles .alert-message { position: relative; padding: 7px 15px; margin-bottom: @baseline; color: @grayDark; .gradientBar(#f7f7f7, #f7f7f7); // warning by default text-shadow: none; border-width: 1px; border-style: solid; .border-radius(@alertBorderRadius); .box-shadow(inset 0 1px 0 rgba(255,255,255,.25)); // Adjust close icon .close { margin-top: 1px; *margin-top: 0; // For IE7 } // Make links same color as text and stand out more a { font-weight: bold; color: @grayDark; text-shadow: none; } strong { text-shadow: none; } &.error, &.success, &.info { text-shadow: none; } // Remove extra margin from content h5 { line-height: @baseline; } p { margin-bottom: 0; } div { margin-top: 5px; margin-bottom: 2px; line-height: 28px; } .btn { // Provide actions with buttons // .box-shadow(0 1px 0 rgba(255,255,255,.25)); } &.block-message { background-image: none; .reset-filter(); padding: 14px; background-color: #f7f7f7; border-color: #cccccc; .box-shadow(none); ul, p { margin-right: 30px; } ul { margin-bottom: 0; } li { color: @grayDark; } .alert-actions { margin-top: 5px; } &.error, &.success, &.info { color: @grayDark; } &.error { background-color: @redLight; border-color: @red; } &.success { background-color: @blueLighter; border-color: @blueLight; } &.info { background-color: @yellowLight; border-color: @yellow; } // Change link color back &.danger p a, &.error p a, &.success p a, &.info p a { color: @grayDark; } } } // PAGINATION // ---------- .pagination { height: @baseline * 2; margin: @baseline 0; ul { float: left; margin: 0; border: 1px solid #ddd; border: 1px solid rgba(0,0,0,.15); .border-radius(3px); .box-shadow(0 1px 2px rgba(0,0,0,.05)); } li { display: inline; } a { float: left; padding: 0 14px; line-height: (@baseline * 2) - 2; border-right: 1px solid; border-right-color: #ddd; border-right-color: rgba(0,0,0,.15); *border-right-color: #ddd; /* IE6-7 */ text-decoration: none; } a:hover, .active a { background-color: @blueLighter; } .disabled a, .disabled a:hover { background-color: transparent; color: @grayLight; } .next a { border: 0; } } // WELLS // ----- .well { background-color: @grayWhite; margin-bottom: 20px; padding: 19px; min-height: 20px; border: 1px solid #eee; border: 1px solid rgba(0,0,0,.05); border-left: none; border-right: none; .border-radius(0px); .box-shadow(0); blockquote { border-color: #ddd; border-color: rgba(0,0,0,.15); } } // MODALS // ------ .modal-backdrop { background-color: @black; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; // Fade for backdrop &.fade { opacity: 0; } } .modal-backdrop, .modal-backdrop.fade.in { .opacity(80); } .modal { position: fixed; top: 50%; left: 50%; z-index: 11000; width: 560px; margin: -250px 0 0 -280px; background-color: @white; border: 1px solid #999; border: 1px solid rgba(0,0,0,.3); *border: 1px solid #999; /* IE6-7 */ .border-radius(8px); .box-shadow(0 0 0px 8px rgba(82, 82, 82, 0.7)); .background-clip(padding-box); .close { margin-top: 7px; } &.fade { .transition(e('opacity .3s linear, top .3s ease-out')); top: -25%; } &.fade.in { top: 50%; } } .modal-header { border-bottom: 1px solid #eee; padding: 5px 15px; } .modal-body { padding: 15px; } .modal-body form { margin-bottom: 0; } .modal-footer { background-color: @grayWhite; padding: 14px 15px 15px; border-top: 1px solid #ddd; .border-radius(0 0 6px 6px); .box-shadow(inset 0 1px 0 @white); .clearfix(); margin-bottom: 0; .btn { float: right; margin-left: 5px; } } // Fix the stacking of these components when in modals .modal .popover, .modal .twipsy { z-index: 12000; } // POPOVER ARROWS // -------------- #popoverArrow { .above(@arrowWidth: 5px, @arrowColor: @black, @offset: 0) { bottom: @offset; left: 50%; margin-left: -@arrowWidth; border-left: @arrowWidth solid transparent; border-right: @arrowWidth solid transparent; border-top: @arrowWidth solid @arrowColor; } .left(@arrowWidth: 5px, @arrowColor: @black, @offset: 0) { top: 50%; right: @offset; margin-top: -@arrowWidth; border-top: @arrowWidth solid transparent; border-bottom: @arrowWidth solid transparent; border-left: @arrowWidth solid @arrowColor; } .below(@arrowWidth: 5px, @arrowColor: @black, @offset: 0) { top: @offset; left: 50%; margin-left: -@arrowWidth; border-left: @arrowWidth solid transparent; border-right: @arrowWidth solid transparent; border-bottom: @arrowWidth solid @arrowColor; } .right(@arrowWidth: 5px, @arrowColor: @black, @offset: 0) { top: 50%; left: @offset; margin-top: -@arrowWidth; border-top: @arrowWidth solid transparent; border-bottom: @arrowWidth solid transparent; border-right: @arrowWidth solid @arrowColor; } } // TWIPSY // ------ .twipsy { display: block; position: absolute; visibility: visible; padding: 5px; font-size: 11px; z-index: 1000; .opacity(80); &.fade.in { .opacity(80); } &.above .twipsy-arrow { #popoverArrow > .above(5px, @blueDark); } &.left .twipsy-arrow { #popoverArrow > .left(5px, @blueDark); } &.below .twipsy-arrow { #popoverArrow > .below(5px, @blueDark); } &.right .twipsy-arrow { #popoverArrow > .right(5px, @blueDark); } } .twipsy-inner { padding: 3px 8px; background-color: @blueDark; color: @white; text-align: center; max-width: 200px; text-decoration: none; .border-radius(4px); } .twipsy-arrow { position: absolute; width: 0; height: 0; } // POPOVERS // -------- #popoverdouble { .above(@arrowWidth: 5px, @arrowColor: @black, @offset: 0px) { bottom: @offset; left: 50%; margin-left: -@arrowWidth; border-left: @arrowWidth solid transparent; border-right: @arrowWidth solid transparent; border-top: @arrowWidth solid @arrowColor; content: ' '; } .left(@arrowWidth: 5px, @arrowColor: @black, @offset: 0px) { top: 50%; right: @offset; margin-top: -@arrowWidth; border-top: @arrowWidth solid transparent; border-bottom: @arrowWidth solid transparent; border-left: @arrowWidth solid @arrowColor; content: ' '; } .below(@arrowWidth: 5px, @arrowColor: @black, @offset: 0px) { top: @offset; left: 50%; margin-left: -@arrowWidth; border-left: @arrowWidth solid transparent; border-right: @arrowWidth solid transparent; border-bottom: @arrowWidth solid @arrowColor; content: ' '; } .right(@arrowWidth: 5px, @arrowColor: @black, @offset: 0px) { top: 50%; left: @offset; margin-top: -@arrowWidth; border-top: @arrowWidth solid transparent; border-bottom: @arrowWidth solid transparent; border-right: @arrowWidth solid @arrowColor; content: ' '; } } .popover { position: absolute; top: 0; left: 0; z-index: 1000; padding: 5px; display: none; &.above .arrow { #popoverArrow > .above(10px, rgba(0,0,0,0.3), -4px); } &.right .arrow { #popoverArrow > .right(10px, rgba(0,0,0,0.3), -4px); } &.below .arrow { #popoverArrow > .below(10px, rgba(0,0,0,0.3), -4px); } &.left .arrow { #popoverArrow > .left(10px, rgba(0,0,0,0.3), -4px); } &.above:after { #popoverdouble > .above(11px, @white, -2px); } &.right:after { #popoverdouble > .right(11px, @white, -2px); } &.below:after { #popoverdouble > .below(11px, @white, -2px); } &.left:after { #popoverdouble > .left(11px, @white, -2px); } .arrow, &.above:after, &.right:after, &.below:after, &.left:after { position: absolute; width: 0; height: 0; } .inner { padding: 3px; overflow: hidden; width: 280px; .border-radius(0); .box-shadow(0 3px 7px rgba(0,0,0,0.3)); border: 1px solid #8C8C8C; border: 1px solid rgba(0, 0, 0, .45); border-bottom: 1px solid #666; -moz-box-shadow: 0 3px 8px rgba(0, 0, 0, .3); -webkit-box-shadow: 0 3px 8px rgba(0, 0, 0, .3); box-shadow: 0 3px 8px rgba(0, 0, 0, .3); } .title { padding: 5px 10px; line-height: 1; border-bottom:1px solid #eee; } .content { background-color: @white; padding: 10px; p, ul, ol { margin-bottom: 0; } } } // PATTERN ANIMATIONS // ------------------ .fade { .transition(opacity .15s linear); opacity: 0; &.in { opacity: 1; } } // LABELS // ------ .label { padding: 1px 3px 1px; font-size: @basefont * .75; font-weight: bold; color: @white; text-transform: uppercase; white-space: nowrap; background-color: @grayLight; .border-radius(3px); text-shadow: none; &.important { background-color: @red; } &.warning { background-color: @yellow; } &.success { background-color: @green; } &.notice { background-color: lighten(@blue, 25%); } &.num { color: @blueDark; background-color: lighten(@blue, 25%); float: right; } } // MEDIA GRIDS // ----------- .media-grid { margin-left: -@gridGutterWidth; margin-bottom: 0; .clearfix(); li { display: inline; } a { float: left; padding: 4px; margin: 0 0 @baseline @gridGutterWidth; border: 1px solid #ddd; .border-radius(4px); .box-shadow(0 1px 1px rgba(0,0,0,.075)); img { display: block; } &:hover { border-color: @linkColor; .box-shadow(0 1px 4px rgba(0,105,214,.25)); } } } // -------- ALERTA: NO ES PARA BOOTSTRAP ------ #el-carrito .items { display:none; }