From 33b5c32c8cc5713fd446af5ddd8c86cff46b9710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0kr=C3=A1=C5=A1ek?= Date: Sun, 26 May 2013 18:14:25 +0200 Subject: Fixed mixin btn-pseudo-state background for [disabled] buttons --- less/mixins.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index b54b05c4e..02040ac65 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -366,6 +366,7 @@ &.disabled, &[disabled], fieldset[disabled] & { + &, &:hover, &:focus, &:active, -- cgit v1.2.3 From b0d202455d9d604050768b512ff96d3b65329867 Mon Sep 17 00:00:00 2001 From: Edgar Schnueriger Date: Mon, 17 Jun 2013 18:56:17 +0200 Subject: Fixes broken layout for .input-group-addons within .input-large. Follows 6ce154c7ed64f3821cc7d6cbb0bfcf65b25f1b49 --- less/forms.less | 1 + less/variables.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 10a315da6..fd44308b9 100644 --- a/less/forms.less +++ b/less/forms.less @@ -227,6 +227,7 @@ input[type="search"], input[type="tel"], input[type="color"] { &.input-large { + min-height: @input-height-large; padding: @padding-large-vertical @padding-large-horizontal; font-size: @font-size-large; border-radius: @border-radius-large; diff --git a/less/variables.less b/less/variables.less index 765dff6a0..ab0136d21 100644 --- a/less/variables.less +++ b/less/variables.less @@ -128,7 +128,7 @@ @input-color-placeholder: @gray-light; @input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); -@input-height-large: (@line-height-computed + (@padding-large-vertical * 2) + 2); +@input-height-large: (@line-height-computed + (@padding-large-vertical * 2) + 8); @input-height-small: (@line-height-computed + (@padding-small-vertical * 2) + 2); -- cgit v1.2.3 From 6a79f53899b0d1e02d41252d0753116b3a121cd0 Mon Sep 17 00:00:00 2001 From: Edgar Schnueriger Date: Tue, 18 Jun 2013 21:43:34 +0200 Subject: Use correct font-size to calculate input-heights --- less/variables.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index ab0136d21..21f283711 100644 --- a/less/variables.less +++ b/less/variables.less @@ -128,8 +128,8 @@ @input-color-placeholder: @gray-light; @input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); -@input-height-large: (@line-height-computed + (@padding-large-vertical * 2) + 8); -@input-height-small: (@line-height-computed + (@padding-small-vertical * 2) + 2); +@input-height-large: (ceil(@font-size-large * @line-height-base) + (@padding-large-vertical * 2) + 2); +@input-height-small: (ceil(@font-size-small * @line-height-base) + (@padding-small-vertical * 2) + 2); // Dropdowns -- cgit v1.2.3 From cd09f3213ba2e07b988708dec6b888f95660b0f9 Mon Sep 17 00:00:00 2001 From: Luis Hdez Date: Thu, 20 Jun 2013 12:50:30 +0200 Subject: Add heading font family variable --- less/type.less | 1 + less/variables.less | 1 + 2 files changed, 2 insertions(+) (limited to 'less') diff --git a/less/type.less b/less/type.less index 9a6811e3d..852f7f32f 100644 --- a/less/type.less +++ b/less/type.less @@ -54,6 +54,7 @@ a.text-success:focus { color: darken(@state-success-text, 10%); } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + font-family: @headings-font-family; font-weight: @headings-font-weight; line-height: @headings-line-height; small { diff --git a/less/variables.less b/less/variables.less index 13ba8885c..4a573a283 100644 --- a/less/variables.less +++ b/less/variables.less @@ -53,6 +53,7 @@ @line-height-base: 1.428571429; // 20/14 @line-height-computed: floor(@font-size-base * @line-height-base); // ~20px +@headings-font-family: @font-family-sans-serif; @headings-font-weight: 500; @headings-line-height: 1.1; -- cgit v1.2.3 From 1b89a63a48f0bfd6ba024f1cf573c03a42aa5ef2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 20 Jun 2013 15:38:18 -0700 Subject: Use `@font-family-base` for headings font-family variable --- less/variables.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index 4a573a283..e71dd03e1 100644 --- a/less/variables.less +++ b/less/variables.less @@ -53,7 +53,7 @@ @line-height-base: 1.428571429; // 20/14 @line-height-computed: floor(@font-size-base * @line-height-base); // ~20px -@headings-font-family: @font-family-sans-serif; +@headings-font-family: @font-family-base; @headings-font-weight: 500; @headings-line-height: 1.1; -- cgit v1.2.3 From f64fe29003159669404f8f5a7a20551fec263904 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 20 Jun 2013 15:40:37 -0700 Subject: Move Glyphicons into their own repo Removes the icon fonts and associated docs and LESS code from the core repo and into twbs/bootstrap-glyphicons. --- less/bootstrap.less | 1 - less/glyphicons.less | 200 --------------------------------------------------- less/variables.less | 5 -- 3 files changed, 206 deletions(-) delete mode 100644 less/glyphicons.less (limited to 'less') diff --git a/less/bootstrap.less b/less/bootstrap.less index c73c85c38..307f72f42 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -28,7 +28,6 @@ // Components: common @import "component-animations.less"; -@import "glyphicons.less"; @import "dropdowns.less"; @import "list-group.less"; @import "panels.less"; diff --git a/less/glyphicons.less b/less/glyphicons.less deleted file mode 100644 index 0d935ea19..000000000 --- a/less/glyphicons.less +++ /dev/null @@ -1,200 +0,0 @@ -// -// Glyphicons -// ----------------------------------------------------------------------------- - -// About -// -// Glyphicons font-based icons require you to include all relevant font files, -// found in the Bootstrap repo under /fonts/. Files are referenced relative to -// the compiled CSS. -// -// Basic usage -// -// Since icons are fonts, they can be placed anywhere text is placed. To use, -// create an inline element with the appropriate classes, like so: -// -// Star -// -// Use them in links, buttons, headings, and more. - - -// Import the fonts -@font-face { - font-family: 'Glyphicons Halflings'; - src: url('@{glyphicons-font-path}/glyphiconshalflings-regular.eot'); - src: url('@{glyphicons-font-path}/glyphiconshalflings-regular.eot?#iefix') format('embedded-opentype'), - url('@{glyphicons-font-path}/glyphiconshalflings-regular.woff') format('woff'), - url('@{glyphicons-font-path}/glyphiconshalflings-regular.ttf') format('truetype'), - url('@{glyphicons-font-path}/glyphiconshalflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} - -// Catchall baseclass -.glyphicon:before { - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; -} - -// Individual icons -.glyphicon-glass:before { content: "\e001"; } -.glyphicon-music:before { content: "\e002"; } -.glyphicon-search:before { content: "\e003"; } -.glyphicon-envelope:before { content: "\2709"; } -.glyphicon-heart:before { content: "\e005"; } -.glyphicon-star:before { content: "\e006"; } -.glyphicon-star-empty:before { content: "\e007"; } -.glyphicon-user:before { content: "\e008"; } -.glyphicon-film:before { content: "\e009"; } -.glyphicon-th-large:before { content: "\e010"; } -.glyphicon-th:before { content: "\e011"; } -.glyphicon-th-list:before { content: "\e012"; } -.glyphicon-ok:before { content: "\e013"; } -.glyphicon-remove:before { content: "\e014"; } -.glyphicon-zoom-in:before { content: "\e015"; } -.glyphicon-zoom-out:before { content: "\e016"; } -.glyphicon-off:before { content: "\e017"; } -.glyphicon-signal:before { content: "\e018"; } -.glyphicon-cog:before { content: "\e019"; } -.glyphicon-trash:before { content: "\e020"; } -.glyphicon-home:before { content: "\e021"; } -.glyphicon-file:before { content: "\e022"; } -.glyphicon-time:before { content: "\e023"; } -.glyphicon-road:before { content: "\e024"; } -.glyphicon-download-alt:before { content: "\e025"; } -.glyphicon-download:before { content: "\e026"; } -.glyphicon-upload:before { content: "\e027"; } -.glyphicon-inbox:before { content: "\e028"; } -.glyphicon-play-circle:before { content: "\e029"; } -.glyphicon-repeat:before { content: "\e030"; } -.glyphicon-refresh:before { content: "\e031"; } -.glyphicon-list-alt:before { content: "\e032"; } -.glyphicon-lock:before { content: "\e033"; } -.glyphicon-flag:before { content: "\e034"; } -.glyphicon-headphones:before { content: "\e035"; } -.glyphicon-volume-off:before { content: "\e036"; } -.glyphicon-volume-down:before { content: "\e037"; } -.glyphicon-volume-up:before { content: "\e038"; } -.glyphicon-qrcode:before { content: "\e039"; } -.glyphicon-barcode:before { content: "\e040"; } -.glyphicon-tag:before { content: "\e041"; } -.glyphicon-tags:before { content: "\e042"; } -.glyphicon-book:before { content: "\e043"; } -.glyphicon-bookmark:before { content: "\e044"; } -.glyphicon-print:before { content: "\e045"; } -.glyphicon-camera:before { content: "\e046"; } -.glyphicon-font:before { content: "\e047"; } -.glyphicon-bold:before { content: "\e048"; } -.glyphicon-italic:before { content: "\e049"; } -.glyphicon-text-height:before { content: "\e050"; } -.glyphicon-text-width:before { content: "\e051"; } -.glyphicon-align-left:before { content: "\e052"; } -.glyphicon-align-center:before { content: "\e053"; } -.glyphicon-align-right:before { content: "\e054"; } -.glyphicon-align-justify:before { content: "\e055"; } -.glyphicon-list:before { content: "\e056"; } -.glyphicon-indent-left:before { content: "\e057"; } -.glyphicon-indent-right:before { content: "\e058"; } -.glyphicon-facetime-video:before { content: "\e059"; } -.glyphicon-picture:before { content: "\e060"; } -.glyphicon-pencil:before { content: "\270f"; } -.glyphicon-map-marker:before { content: "\e062"; } -.glyphicon-adjust:before { content: "\e063"; } -.glyphicon-tint:before { content: "\e064"; } -.glyphicon-edit:before { content: "\e065"; } -.glyphicon-share:before { content: "\e066"; } -.glyphicon-check:before { content: "\e067"; } -.glyphicon-move:before { content: "\e068"; } -.glyphicon-step-backward:before { content: "\e069"; } -.glyphicon-fast-backward:before { content: "\e070"; } -.glyphicon-backward:before { content: "\e071"; } -.glyphicon-play:before { content: "\e072"; } -.glyphicon-pause:before { content: "\e073"; } -.glyphicon-stop:before { content: "\e074"; } -.glyphicon-forward:before { content: "\e075"; } -.glyphicon-fast-forward:before { content: "\e076"; } -.glyphicon-step-forward:before { content: "\e077"; } -.glyphicon-eject:before { content: "\e078"; } -.glyphicon-chevron-left:before { content: "\e079"; } -.glyphicon-chevron-right:before { content: "\e080"; } -.glyphicon-plus-sign:before { content: "\e081"; } -.glyphicon-minus-sign:before { content: "\e082"; } -.glyphicon-remove-sign:before { content: "\e083"; } -.glyphicon-ok-sign:before { content: "\e084"; } -.glyphicon-question-sign:before { content: "\e085"; } -.glyphicon-info-sign:before { content: "\e086"; } -.glyphicon-screenshot:before { content: "\e087"; } -.glyphicon-remove-circle:before { content: "\e088"; } -.glyphicon-ok-circle:before { content: "\e089"; } -.glyphicon-ban-circle:before { content: "\e090"; } -.glyphicon-arrow-left:before { content: "\e091"; } -.glyphicon-arrow-right:before { content: "\e092"; } -.glyphicon-arrow-up:before { content: "\e093"; } -.glyphicon-arrow-down:before { content: "\e094"; } -.glyphicon-share-alt:before { content: "\e095"; } -.glyphicon-resize-full:before { content: "\e096"; } -.glyphicon-resize-small:before { content: "\e097"; } -.glyphicon-plus:before { content: "\002b"; } -.glyphicon-minus:before { content: "\2212"; } -.glyphicon-asterisk:before { content: "\002a"; } -.glyphicon-exclamation-sign:before { content: "\e101"; } -.glyphicon-gift:before { content: "\e102"; } -.glyphicon-leaf:before { content: "\e103"; } -.glyphicon-fire:before { content: "\e104"; } -.glyphicon-eye-open:before { content: "\e105"; } -.glyphicon-eye-close:before { content: "\e106"; } -.glyphicon-warning-sign:before { content: "\e107"; } -.glyphicon-plane:before { content: "\e108"; } -.glyphicon-calendar:before { content: "\e109"; } -.glyphicon-random:before { content: "\e110"; } -.glyphicon-comment:before { content: "\e111"; } -.glyphicon-magnet:before { content: "\e112"; } -.glyphicon-chevron-up:before { content: "\e113"; } -.glyphicon-chevron-down:before { content: "\e114"; } -.glyphicon-retweet:before { content: "\e115"; } -.glyphicon-shopping-cart:before { content: "\e116"; } -.glyphicon-folder-close:before { content: "\e117"; } -.glyphicon-folder-open:before { content: "\e118"; } -.glyphicon-resize-vertical:before { content: "\e119"; } -.glyphicon-resize-horizontal:before { content: "\e120"; } -.glyphicon-hdd:before { content: "\e121"; } -.glyphicon-bullhorn:before { content: "\e122"; } -.glyphicon-bell:before { content: "\e123"; } -.glyphicon-certificate:before { content: "\e124"; } -.glyphicon-thumbs-up:before { content: "\e125"; } -.glyphicon-thumbs-down:before { content: "\e126"; } -.glyphicon-hand-right:before { content: "\e127"; } -.glyphicon-hand-left:before { content: "\e128"; } -.glyphicon-hand-up:before { content: "\e129"; } -.glyphicon-hand-down:before { content: "\e130"; } -.glyphicon-circle-arrow-right:before { content: "\e131"; } -.glyphicon-circle-arrow-left:before { content: "\e132"; } -.glyphicon-circle-arrow-up:before { content: "\e133"; } -.glyphicon-circle-arrow-down:before { content: "\e134"; } -.glyphicon-globe:before { content: "\e135"; } -.glyphicon-wrench:before { content: "\e136"; } -.glyphicon-tasks:before { content: "\e137"; } -.glyphicon-filter:before { content: "\e138"; } -.glyphicon-briefcase:before { content: "\e139"; } -.glyphicon-fullscreen:before { content: "\e140"; } -.glyphicon-dashboard:before { content: "\e141"; } -.glyphicon-paperclip:before { content: "\e142"; } -.glyphicon-heart-empty:before { content: "\e143"; } -.glyphicon-link:before { content: "\e144"; } -.glyphicon-phone:before { content: "\e145"; } -.glyphicon-pushpin:before { content: "\e146"; } -.glyphicon-euro:before { content: "\20ac"; } -.glyphicon-usd:before { content: "\e148"; } -.glyphicon-gbp:before { content: "\e149"; } -.glyphicon-sort:before { content: "\e150"; } -.glyphicon-sort-by-alphabet:before { content: "\e151"; } -.glyphicon-sort-by-alphabet-alt:before { content: "\e152"; } -.glyphicon-sort-by-order:before { content: "\e153"; } -.glyphicon-sort-by-order-alt:before { content: "\e154"; } -.glyphicon-sort-by-attributes:before { content: "\e155"; } -.glyphicon-sort-by-attributes-alt:before { content: "\e156"; } -.glyphicon-unchecked:before { content: "\e157"; } -.glyphicon-expand:before { content: "\e158"; } -.glyphicon-collapse:before { content: "\e159"; } -.glyphicon-collapse-top:before { content: "\e160"; } diff --git a/less/variables.less b/less/variables.less index 13ba8885c..a31aafac6 100644 --- a/less/variables.less +++ b/less/variables.less @@ -165,11 +165,6 @@ @zindex-modal: 1050; -// Glyphicons font path -// ------------------------- -@glyphicons-font-path: "../fonts"; - - // Navbar // ------------------------- -- cgit v1.2.3 From 2aec6dae597b69502d09aec983598e5f955ca558 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 20 Jun 2013 16:01:59 -0700 Subject: Fixes #7730: Better hiding of empty titles in popovers If the popover's title contains no text, hide it via JS. Previously was done via CSS's `:empty` property, but that doesn't work in IE8, so JS it is. /cc @fat becaue I probably did this wrong <3 --- less/popovers.less | 4 ---- 1 file changed, 4 deletions(-) (limited to 'less') diff --git a/less/popovers.less b/less/popovers.less index b3399fa34..bcd30e919 100644 --- a/less/popovers.less +++ b/less/popovers.less @@ -40,10 +40,6 @@ background-color: @popover-title-bg; border-bottom: 1px solid darken(@popover-title-bg, 5%); border-radius: 5px 5px 0 0; - - &:empty { - display: none; - } } .popover-content { -- cgit v1.2.3 From 90d4343f66d1cdafe24b6de0dbb6ae64312df323 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 20 Jun 2013 16:42:05 -0700 Subject: Fixes #8093: Removes invalid focus styles on inputs --- less/forms.less | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index fd44308b9..0d55cd148 100644 --- a/less/forms.less +++ b/less/forms.less @@ -287,20 +287,6 @@ input[type="checkbox"] { .form-field-validation(@state-success-text, @state-success-text, @state-success-bg); } -// HTML5 invalid states -// Shares styles with the .control-group.error above -input:focus:invalid, -textarea:focus:invalid, -select:focus:invalid { - color: #b94a48; - border-color: #ee5f5b; - &:focus { - border-color: darken(#ee5f5b, 10%); - @shadow: 0 0 6px lighten(#ee5f5b, 20%); - .box-shadow(@shadow); - } -} - -- cgit v1.2.3 From 82f9de94593ea5dd8a8efd6a317a6c8b319cfff2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 20 Jun 2013 17:02:10 -0700 Subject: Fixes #8159: Be more specific about disabled inputs to avoid iOS bug Attached disabled styles to the exact input types rather than all inputs and reseting the checkbox/radios. If setting `background-color: transparent;`, iOS renders no background on the disabled control. --- less/forms.less | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 0d55cd148..609580928 100644 --- a/less/forms.less +++ b/less/forms.less @@ -72,6 +72,17 @@ input[type="color"] { outline: 0; .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); } + + // Disabled and read-only inputs + // Note: HTML5 says that inputs under a fieldset > legend:first-child won't be + // disabled if the fieldset is disabled. Due to implementation difficulty, + // we don't honor that edge case; we style them as disabled anyway. + &[disabled], + &[readonly], + fieldset[disabled] & { + cursor: not-allowed; + background-color: @input-bg-disabled; + } } // Reset appearance properties for textual inputs and textarea @@ -241,35 +252,6 @@ input[type="color"] { } -// DISABLED STATE -// -------------- - -// Disabled and read-only inputs -// Note: HTML5 says that inputs under a fieldset > legend:first-child won't be -// disabled if the fieldset is disabled. Due to implementation difficulty, -// we don't honor that edge case; we style them as disabled anyway. -input, -select, -textarea { - &[disabled], - &[readonly], - fieldset[disabled] & { - cursor: not-allowed; - background-color: @input-bg-disabled; - } -} -// Explicitly reset the colors here -input[type="radio"], -input[type="checkbox"] { - &[disabled], - &[readonly], - fieldset[disabled] & { - background-color: transparent; - } -} - - - // FORM FIELD FEEDBACK STATES // -------------------------- -- cgit v1.2.3 From ef8e5853cbfc4f4babacd3527ab3eb0e4b741acc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 20 Jun 2013 17:15:09 -0700 Subject: Fixes #8154: enforce full width `.navbar-nav.pull-right` in mobile Prevents an odd alignment issue in mobile views by forcing the nav links to be full width without undoing the float. --- less/navbar.less | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 59ea92dbd..54f4b75ab 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -48,6 +48,12 @@ color: @navbar-link-disabled-color; background-color: @navbar-link-disabled-bg; } + + // Right aligned contents + // Make them full width first so that they align properly on mobile + &.pull-right { + width: 100%; + } } @@ -296,6 +302,7 @@ &.pull-right { float: right; + width: auto; } } -- cgit v1.2.3 From b0e943399df374b03f9ed5f676f33e42f5e53a74 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 21 Jun 2013 17:21:44 -0700 Subject: Improve alignment of navbar brand and fix up left padding on list groups --- less/list-group.less | 3 ++- less/navbar.less | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/list-group.less b/less/list-group.less index d812cc5f9..f9d9f612c 100644 --- a/less/list-group.less +++ b/less/list-group.less @@ -7,7 +7,8 @@ // Easily usable on
    ,
      , or
      . .list-group { // No need to set list-style: none; since .list-group-item is block level - margin: 0 0 20px; // reset all margins because ul and ol + margin-bottom: 20px; + padding-left: 0; // reset padding because ul and ol background-color: @list-group-bg; } diff --git a/less/navbar.less b/less/navbar.less index 54f4b75ab..6246bd62c 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -284,7 +284,7 @@ .navbar-brand { float: left; - margin-left: -5px; + margin-left: -15px; margin-right: 5px; } .navbar-nav { -- cgit v1.2.3 From 2ba3b47dc697bdcb69b2100d664c51d69c453010 Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Sat, 22 Jun 2013 14:34:17 +0300 Subject: Update navbar.less navbar padding-left and padding-right should be calculated from the grid-gutter-width variable. --- less/navbar.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 6246bd62c..b744f5f70 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -6,8 +6,8 @@ .navbar { position: relative; margin-bottom: 20px; - padding-left: 15px; - padding-right: 15px; + padding-left: floor(@grid-gutter-width / 2); // ~15px + padding-right: floor(@grid-gutter-width / 2); // ~15px background-color: @navbar-bg; border-radius: @border-radius-base; @@ -284,7 +284,7 @@ .navbar-brand { float: left; - margin-left: -15px; + margin-left: -5px; margin-right: 5px; } .navbar-nav { -- cgit v1.2.3 From b51e1e0d8c632d391058f5094295d9c4124c3f28 Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Sat, 22 Jun 2013 14:41:31 +0300 Subject: Update navbar.less --- less/navbar.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index b744f5f70..444281289 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -96,7 +96,7 @@ max-width: 200px; margin-left: auto; margin-right: auto; - padding: 15px; + padding: floor(@grid-gutter-width / 2); // ~15px font-size: @font-size-large; font-weight: 500; line-height: @line-height-computed; @@ -284,7 +284,7 @@ .navbar-brand { float: left; - margin-left: -5px; + margin-left: -(floor(@grid-gutter-width / 2)); // ~15px margin-right: 5px; } .navbar-nav { -- cgit v1.2.3 From aad76f21f6eefb3afc19c7cefeb97f00df058a9f Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Sat, 22 Jun 2013 18:44:04 +0300 Subject: Update navbar.less --- less/navbar.less | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 444281289..b8283601d 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -6,8 +6,8 @@ .navbar { position: relative; margin-bottom: 20px; - padding-left: floor(@grid-gutter-width / 2); // ~15px - padding-right: floor(@grid-gutter-width / 2); // ~15px + padding-left: @navbar-padding; + padding-right: @navbar-padding; background-color: @navbar-bg; border-radius: @border-radius-base; @@ -96,7 +96,7 @@ max-width: 200px; margin-left: auto; margin-right: auto; - padding: floor(@grid-gutter-width / 2); // ~15px + padding: @navbar-padding; font-size: @font-size-large; font-weight: 500; line-height: @line-height-computed; @@ -284,7 +284,7 @@ .navbar-brand { float: left; - margin-left: -(floor(@grid-gutter-width / 2)); // ~15px + margin-left: -(@navbar-padding); margin-right: 5px; } .navbar-nav { -- cgit v1.2.3 From 72183d9a452fa43ac8d994374713c7a585d1744c Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Sat, 22 Jun 2013 18:45:25 +0300 Subject: Update variables.less --- less/variables.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index f91846126..4fd0d492c 100644 --- a/less/variables.less +++ b/less/variables.less @@ -178,6 +178,7 @@ @navbar-height: 50px; @navbar-color: #777; @navbar-bg: #eee; +@navbar-padding: floor(@grid-gutter-width / 2); // ~15px // Navbar links @navbar-link-color: #777; -- cgit v1.2.3 From 7fd121fecb0e5b2774a2c1486d61f95b298035aa Mon Sep 17 00:00:00 2001 From: Francis Brunelle Date: Sat, 22 Jun 2013 21:38:02 -0300 Subject: Reset left padding for .carousel-indicators --- less/carousel.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/carousel.less b/less/carousel.less index 31f9b8aff..a7a4672c1 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -131,6 +131,7 @@ z-index: 15; width: 100px; margin: 0 0 0 -50px; + padding-left: 0; list-style: none; text-align: center; -- cgit v1.2.3 From 2a47037ab0d4aa644f04499bd704a85561b58e73 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 23 Jun 2013 10:24:50 -0700 Subject: Fixes #8266: remove unnecessary `strong` and `em` styles --- less/type.less | 2 -- 1 file changed, 2 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index 852f7f32f..9892d5589 100644 --- a/less/type.less +++ b/less/type.less @@ -23,8 +23,6 @@ p { // Ex: 14px base font * 85% = about 12px small { font-size: 85%; } -strong { font-weight: bold; } -em { font-style: italic; } cite { font-style: normal; } // Utility classes -- cgit v1.2.3 From b76d98eee3fa4a1a8d7fb281a31a7d20982459d3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 23 Jun 2013 15:05:50 -0700 Subject: Fixes #8211: restore proper table grid class behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needs work though—we shouldn't be setting this stuff with the attribute selectors, but it's the easiest solution for now. --- less/grid.less | 46 ++++++++++++++++++++++++++++++++++++++++++---- less/tables.less | 8 +++++--- 2 files changed, 47 insertions(+), 7 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index b97d1d5c4..e8082d369 100644 --- a/less/grid.less +++ b/less/grid.less @@ -2,7 +2,6 @@ // Grid system // -------------------------------------------------- - // Set the container width, and override it for fixed navbars in media queries .container { .container-fixed(); @@ -51,9 +50,6 @@ .col-lg-11, .col-lg-12 { position: relative; - // Float and set width: 100%; for easy stacking on mobile devices - float: left; - width: 100%; // Prevent columns from collapsing when empty min-height: 1px; // Inner gutter via padding @@ -68,6 +64,20 @@ // // Tiny device columns (smartphones) +.col-1, +.col-2, +.col-3, +.col-4, +.col-5, +.col-6, +.col-7, +.col-8, +.col-9, +.col-10, +.col-11, +.col-12 { + float: left; +} .col-1 { width: percentage((1 / @grid-columns)); } .col-2 { width: percentage((2 / @grid-columns)); } .col-3 { width: percentage((3 / @grid-columns)); } @@ -87,6 +97,20 @@ max-width: @container-tablet; } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 { + float: left; + } .col-sm-1 { width: percentage((1 / @grid-columns)); } .col-sm-2 { width: percentage((2 / @grid-columns)); } .col-sm-3 { width: percentage((3 / @grid-columns)); } @@ -144,6 +168,20 @@ .container { max-width: @container-desktop; } + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12 { + float: left; + } .col-lg-1 { width: percentage((1 / @grid-columns)); } .col-lg-2 { width: percentage((2 / @grid-columns)); } .col-lg-3 { width: percentage((3 / @grid-columns)); } diff --git a/less/tables.less b/less/tables.less index fa5fd554b..88481a944 100644 --- a/less/tables.less +++ b/less/tables.less @@ -184,16 +184,18 @@ th { // ----------------- // Reset default table behavior -table col[class*="col-span-"] { +table col[class^="col-"] { float: none; display: table-column; } -table td[class*="col-span-"], -table th[class*="col-span-"] { +table td[class^="col-"], +table th[class^="col-"] { float: none; display: table-cell; } + + // TABLE BACKGROUNDS // ----------------- // Exact selectors below required to override .table-striped -- cgit v1.2.3 From 573a19741770338b9e08838d908f51b7a82cddd3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 23 Jun 2013 15:15:42 -0700 Subject: Move grid offsets to desktop only (fixes #8229) --- less/grid.less | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index e8082d369..12803f39a 100644 --- a/less/grid.less +++ b/less/grid.less @@ -124,19 +124,6 @@ .col-sm-11 { width: percentage((11/ @grid-columns)); } .col-sm-12 { width: 100%; } - // Offsets - .col-offset-1 { margin-left: percentage((1 / @grid-columns)); } - .col-offset-2 { margin-left: percentage((2 / @grid-columns)); } - .col-offset-3 { margin-left: percentage((3 / @grid-columns)); } - .col-offset-4 { margin-left: percentage((4 / @grid-columns)); } - .col-offset-5 { margin-left: percentage((5 / @grid-columns)); } - .col-offset-6 { margin-left: percentage((6 / @grid-columns)); } - .col-offset-7 { margin-left: percentage((7 / @grid-columns)); } - .col-offset-8 { margin-left: percentage((8 / @grid-columns)); } - .col-offset-9 { margin-left: percentage((9 / @grid-columns)); } - .col-offset-10 { margin-left: percentage((10/ @grid-columns)); } - .col-offset-11 { margin-left: percentage((11/ @grid-columns)); } - // Push and pull columns for source order changes .col-push-1 { left: percentage((1 / @grid-columns)); } .col-push-2 { left: percentage((2 / @grid-columns)); } @@ -194,6 +181,19 @@ .col-lg-10 { width: percentage((10/ @grid-columns)); } .col-lg-11 { width: percentage((11/ @grid-columns)); } .col-lg-12 { width: 100%; } + + // Offsets + .col-offset-1 { margin-left: percentage((1 / @grid-columns)); } + .col-offset-2 { margin-left: percentage((2 / @grid-columns)); } + .col-offset-3 { margin-left: percentage((3 / @grid-columns)); } + .col-offset-4 { margin-left: percentage((4 / @grid-columns)); } + .col-offset-5 { margin-left: percentage((5 / @grid-columns)); } + .col-offset-6 { margin-left: percentage((6 / @grid-columns)); } + .col-offset-7 { margin-left: percentage((7 / @grid-columns)); } + .col-offset-8 { margin-left: percentage((8 / @grid-columns)); } + .col-offset-9 { margin-left: percentage((9 / @grid-columns)); } + .col-offset-10 { margin-left: percentage((10/ @grid-columns)); } + .col-offset-11 { margin-left: percentage((11/ @grid-columns)); } } // Large desktops and up -- cgit v1.2.3 From 9ed5b5e6534b45f29f318d983a7e09be1f7ac946 Mon Sep 17 00:00:00 2001 From: Luis Hdez Date: Tue, 25 Jun 2013 14:34:57 +0200 Subject: Fix line breaks on add-ons with spaces --- less/forms.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 609580928..912487610 100644 --- a/less/forms.less +++ b/less/forms.less @@ -321,6 +321,7 @@ input[type="color"] { .input-group-addon, .input-group-btn { width: 1%; + white-space: nowrap; vertical-align: middle; // Match the inputs } -- cgit v1.2.3 From 83c4073ec76a4cc0d600b1c5fdb426d2adb69309 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 12:23:56 -0700 Subject: refactor responsive-utilities slightly --- less/responsive-utilities.less | 54 ++++++++++++------------------------------ 1 file changed, 15 insertions(+), 39 deletions(-) (limited to 'less') diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index 082109e5e..e6a8bf7e9 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -34,29 +34,26 @@ } // Visibility utilities - -// For Phones -.visible-sm { +.responsive-visibility() { display: block !important; tr& { display: table-row !important; } th&, td& { display: table-cell !important; } } + +// For Phones +.visible-sm { + .responsive-visibility; +} .visible-md { display: none !important; } .visible-lg { display: none !important; } .hidden-sm { display: none !important; } .hidden-md { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .hidden-lg { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } @@ -64,25 +61,16 @@ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { .visible-sm { display: none !important; } .visible-md { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .visible-lg { display: none !important; } .hidden-sm { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .hidden-md { display: none !important; } .hidden-lg { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } } @@ -91,23 +79,14 @@ .visible-sm { display: none !important; } .visible-md { display: none !important; } .visible-lg { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .hidden-sm { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .hidden-md { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .hidden-lg { display: none !important; } } @@ -118,10 +97,7 @@ @media print { .visible-print { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + .responsive-visibility; } .hidden-print { display: none !important; } } -- cgit v1.2.3 From 327a951ca3754285432ae97b6c6be62dcd815905 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 25 Jun 2013 13:32:21 -0700 Subject: Move mixin to mixins.less --- less/mixins.less | 12 +++++++++++- less/responsive-utilities.less | 6 ------ 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 9825e9a2d..879836a8c 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -400,6 +400,16 @@ margin-bottom: ((@navbar-height - @element-height) / 2); } +// Responsive utilities +// ------------------------- +// More easily include all the states for responsive-utilities.less. +.responsive-visibility() { + display: block !important; + tr& { display: table-row !important; } + th&, + td& { display: table-cell !important; } +} + // Grid System @@ -491,5 +501,5 @@ color: @text-color; border-color: @border-color; background-color: @background-color; - } + } } diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index e6a8bf7e9..65fdc3d13 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -34,12 +34,6 @@ } // Visibility utilities -.responsive-visibility() { - display: block !important; - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } -} // For Phones .visible-sm { -- cgit v1.2.3 From 9b97d63188538a387adcca1ae26f772c909d69dc Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 14:48:57 -0700 Subject: rm pre{white-space:pre-wrap;} since redundant to Normalize.css --- less/code.less | 2 -- 1 file changed, 2 deletions(-) (limited to 'less') diff --git a/less/code.less b/less/code.less index f1bc0a0cd..92b31b259 100644 --- a/less/code.less +++ b/less/code.less @@ -31,8 +31,6 @@ pre { line-height: @line-height-base; word-break: break-all; word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; background-color: #f5f5f5; border: 1px solid #ccc; // IE8 fallback border: 1px solid rgba(0,0,0,.15); -- cgit v1.2.3 From 1bb159aa6f3ed2ea1adf73b287eb1c64e017292b Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 15:53:48 -0600 Subject: rm fallback white-space for If my analysis is right, this should be unnecessary. --- less/code.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less') diff --git a/less/code.less b/less/code.less index f1bc0a0cd..67a64abc3 100644 --- a/less/code.less +++ b/less/code.less @@ -47,7 +47,6 @@ pre { code { padding: 0; color: inherit; - white-space: pre; white-space: pre-wrap; background-color: transparent; border: 0; -- cgit v1.2.3 From 64a01f01cb470a8c69e918c3086a03af700ebbba Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 17:01:46 -0600 Subject: Spelling in comment --- 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 912487610..97fbad4cc 100644 --- a/less/forms.less +++ b/less/forms.less @@ -425,7 +425,7 @@ input[type="color"] { } } -// Only right aline form labels here when the columns stop stacking +// Only right align form labels here when the columns stop stacking @media (min-width: 768px) { .form-horizontal .control-label { text-align: right; -- cgit v1.2.3 From d2b5f4e45c5dc75bd7b096068a71d10271191520 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 17:03:57 -0600 Subject: Fix typo in comment --- 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 912487610..a9a124bd4 100644 --- a/less/forms.less +++ b/less/forms.less @@ -195,7 +195,7 @@ textarea { // 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 + padding-top: 5px; // has to be padding because margin collapses } */ -- cgit v1.2.3 From 8ee0e39ef9123c62bb0bf043fb7cecbd4dfbc00b Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 17:05:26 -0600 Subject: Fix spelling in comment --- less/navs.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/navs.less b/less/navs.less index e5925bf63..d42ad3588 100644 --- a/less/navs.less +++ b/less/navs.less @@ -59,7 +59,7 @@ } } - // Redeclare pull classes because of specifity + // Redeclare pull classes because of specificity // Todo: consider making these utilities !important to avoid this bullshit > .pull-right { float: right; -- cgit v1.2.3 From d82941265c0407904dd19bc6903e99dbbca76540 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Jun 2013 17:07:51 -0600 Subject: Fix 2 typos --- less/scaffolding.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/scaffolding.less b/less/scaffolding.less index 9f5739710..e74a4db1c 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -27,7 +27,7 @@ body { background-color: @body-bg; } -// Reset fonts for revelant elements +// Reset fonts for relevant elements input, button, select, @@ -60,7 +60,7 @@ a:focus { img { // Responsive images (ensure images don't scale beyond their parents) - max-width: 100%; // Part 1: Set a maxium relative to the parent + max-width: 100%; // Part 1: Set a maximum relative to the parent height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching // Match vertical alignment with other comment elements -- cgit v1.2.3 From c9ccbd2cf0b5b37fe67e55a93223d4836f22da44 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 18:43:29 -0700 Subject: Fixes #8329: add `!important` to `.hidden` --- less/responsive-utilities.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index 65fdc3d13..ef80be7a9 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -29,8 +29,8 @@ // Hide from screenreaders and browsers // Credit: HTML5 Boilerplate .hidden { - display: none; - visibility: hidden; + display: none !important; + visibility: hidden !important; } // Visibility utilities -- cgit v1.2.3 From cb483b67589df7ac3ece33303b8ce944b3ac4b0e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 18:45:08 -0700 Subject: Add parens so sublime picks up on syntax highlighting --- less/responsive-utilities.less | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'less') diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index ef80be7a9..21e5d7556 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -37,17 +37,17 @@ // For Phones .visible-sm { - .responsive-visibility; + .responsive-visibility(); } .visible-md { display: none !important; } .visible-lg { display: none !important; } .hidden-sm { display: none !important; } .hidden-md { - .responsive-visibility; + .responsive-visibility(); } .hidden-lg { - .responsive-visibility; + .responsive-visibility(); } @@ -55,16 +55,16 @@ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { .visible-sm { display: none !important; } .visible-md { - .responsive-visibility; + .responsive-visibility(); } .visible-lg { display: none !important; } .hidden-sm { - .responsive-visibility; + .responsive-visibility(); } .hidden-md { display: none !important; } .hidden-lg { - .responsive-visibility; + .responsive-visibility(); } } @@ -73,14 +73,14 @@ .visible-sm { display: none !important; } .visible-md { display: none !important; } .visible-lg { - .responsive-visibility; + .responsive-visibility(); } .hidden-sm { - .responsive-visibility; + .responsive-visibility(); } .hidden-md { - .responsive-visibility; + .responsive-visibility(); } .hidden-lg { display: none !important; } } @@ -91,7 +91,7 @@ @media print { .visible-print { - .responsive-visibility; + .responsive-visibility(); } .hidden-print { display: none !important; } } -- cgit v1.2.3 From ca8ca2177fd5b8e6523bd1599784b129c2d75937 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 19:36:56 -0700 Subject: fixes #4852: popover carets fully functional in ie8 holy carp wtfbqq huge shoutout to @PumaOmaR --- less/popovers.less | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'less') diff --git a/less/popovers.less b/less/popovers.less index bcd30e919..2c79da9a0 100644 --- a/less/popovers.less +++ b/less/popovers.less @@ -76,6 +76,7 @@ border-top-color: @popover-arrow-outer-color; bottom: -@popover-arrow-outer-width; &:after { + content: " "; bottom: 1px; margin-left: -@popover-arrow-width; border-bottom-width: 0; @@ -90,6 +91,7 @@ border-right-color: #999; // IE8 fallback border-right-color: @popover-arrow-outer-color; &:after { + content: " "; left: 1px; bottom: -@popover-arrow-width; border-left-width: 0; @@ -104,6 +106,7 @@ border-bottom-color: @popover-arrow-outer-color; top: -@popover-arrow-outer-width; &:after { + content: " "; top: 1px; margin-left: -@popover-arrow-width; border-top-width: 0; @@ -119,6 +122,7 @@ border-left-color: #999; // IE8 fallback border-left-color: @popover-arrow-outer-color; &:after { + content: " "; right: 1px; border-right-width: 0; border-left-color: @popover-arrow-color; -- cgit v1.2.3 From 5156234c23956cb944469173f28ffd5a85966f55 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 19:54:30 -0700 Subject: update grid col mixin to use latest css from grid cols --- less/mixins.less | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 879836a8c..eb5cbb964 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -443,9 +443,6 @@ // Generate the columns .make-column(@columns) { position: relative; - // Float and set width: 100%; for easy stacking on mobile devices - float: left; - width: 100%; // Prevent columns from collapsing when empty min-height: 1px; // Inner gutter via padding @@ -454,6 +451,7 @@ // Calculate width based on number of columns available @media (min-width: @grid-float-breakpoint) { + float: left; width: percentage((@columns / @grid-columns)); } } -- cgit v1.2.3 From d9a662ed1dbe3dbfe30980d45c831e3b454bff86 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 20:15:44 -0700 Subject: fixes #7977: prevent some table bullshit on input groups --- less/forms.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index a96849d5f..ea340007c 100644 --- a/less/forms.less +++ b/less/forms.less @@ -291,6 +291,7 @@ input[type="color"] { // ------------------------- .input-group { display: table; + border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table // Undo padding and float of grid classes &.col { -- cgit v1.2.3 From bf3c5e070e2ee74181aa8b2c75f32387827b01c2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 20:49:29 -0700 Subject: remove submenus. for more context: http://www.youtube.com/watch?v=ggWyUEuGcWY&feature=youtu.be&t=48s --- less/dropdowns.less | 62 +---------------------------------------------------- 1 file changed, 1 insertion(+), 61 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 3e0152788..f2ddc4392 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -63,9 +63,7 @@ // Hover/Focus state // ----------- .dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { +.dropdown-menu > li > a:focus { text-decoration: none; color: @dropdown-link-hover-color; #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); @@ -153,64 +151,6 @@ } } -// Sub menus -// --------------------------- -.dropdown-submenu { - position: relative; -} -// Default dropdowns -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-top-left-radius: 0; // Nuke the closest corner as appropriate -} -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} - -// Dropups -.dropup .dropdown-submenu > .dropdown-menu { - top: auto; - bottom: 0; - margin-top: 0; - margin-bottom: -2px; - border-bottom-left-radius: 0; // Nuke the closest corner as appropriate -} - -// Caret to indicate there is a submenu -.dropdown-submenu > a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: darken(@dropdown-bg, 20%); - margin-top: 5px; - margin-right: -10px; -} -.dropdown-submenu:hover > a:after { - border-left-color: @dropdown-link-hover-color; -} - -// Left aligned submenus -.dropdown-submenu.pull-left { - // Undo the float - // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere. - float: none; - - // Positioning the submenu - > .dropdown-menu { - left: -100%; - margin-left: 10px; - border-top-right-radius: 0; // Remove the rounded corner here - } -} - // Tweak nav headers // --------------------------- // Increase padding from 15px to 20px on sides -- cgit v1.2.3 From 88ece4fc5902f7dd9582fb4e5956062fe97af84c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 27 Jun 2013 20:50:00 -0700 Subject: fixes #7961 a bit: adds css for extra tooltip placement options. /cc @fat you just need dat js prolly --- less/tooltip.less | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'less') diff --git a/less/tooltip.less b/less/tooltip.less index 9dba6f04f..790eb1cd3 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -47,6 +47,18 @@ border-width: @tooltip-arrow-width @tooltip-arrow-width 0; border-top-color: @tooltip-arrow-color; } + &.top-left .tooltip-arrow { + bottom: 0; + left: 5px; + border-width: @tooltip-arrow-width @tooltip-arrow-width 0; + border-top-color: @tooltip-arrow-color; + } + &.top-right .tooltip-arrow { + bottom: 0; + right: 5px; + border-width: @tooltip-arrow-width @tooltip-arrow-width 0; + border-top-color: @tooltip-arrow-color; + } &.right .tooltip-arrow { top: 50%; left: 0; @@ -68,4 +80,16 @@ border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; border-bottom-color: @tooltip-arrow-color; } + &.bottom-left .tooltip-arrow { + top: 0; + left: 5px; + border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; + border-bottom-color: @tooltip-arrow-color; + } + &.bottom-right .tooltip-arrow { + top: 0; + right: 5px; + border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; + border-bottom-color: @tooltip-arrow-color; + } } -- cgit v1.2.3 From 09cdee2f03aaad5c5a767fbec2e3896ad3d1f980 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 28 Jun 2013 00:09:10 -0700 Subject: Overall responsive `img` styles `img`s are no longer responsive by default. Instead, use `.img-responsive` as a class or mixin. Existing `.thumbnail > img` and `.img-thumbnail` classes now make use of this as a mixin as well. --- less/scaffolding.less | 10 ++++++---- less/thumbnails.less | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/scaffolding.less b/less/scaffolding.less index e74a4db1c..79447c3f5 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -59,12 +59,14 @@ a:focus { // ------------------------- img { - // Responsive images (ensure images don't scale beyond their parents) + vertical-align: middle; +} + +// Responsive images (ensure images don't scale beyond their parents) +.img-responsive { + display: block; max-width: 100%; // Part 1: Set a maximum relative to the parent height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching - - // Match vertical alignment with other comment elements - vertical-align: middle; } // Rounded corners diff --git a/less/thumbnails.less b/less/thumbnails.less index f31d78617..b15b8d25a 100644 --- a/less/thumbnails.less +++ b/less/thumbnails.less @@ -17,6 +17,10 @@ border-radius: @thumbnail-border-radius; .transition(all .2s ease-in-out); } +.thumbnail > img, +.img-thumbnail { + .img-responsive(); +} .thumbnail { display: block; } @@ -32,8 +36,6 @@ a.thumbnail:focus { // Images and captions .thumbnail > img { - display: block; - max-width: 100%; margin-left: auto; margin-right: auto; } -- cgit v1.2.3 From 0a92efce0cbded7b664a5e198bfe6bca3b13bcac Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 28 Jun 2013 09:24:46 -0700 Subject: Nuke hella things * Any mentions of .btn-mini * Old docs page that somehow found it's way back --- less/badges.less | 5 ----- less/button-groups.less | 4 ---- less/carousel.less | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) (limited to 'less') diff --git a/less/badges.less b/less/badges.less index 4750cfb75..665aed921 100644 --- a/less/badges.less +++ b/less/badges.less @@ -41,11 +41,6 @@ a.badge { top: -1px; } } -.btn-mini { - .badge { - top: 0; - } -} // Account for counters in navs a.list-group-item.active > .badge, diff --git a/less/button-groups.less b/less/button-groups.less index f7934a328..408e7c75d 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -96,10 +96,6 @@ padding-left: 8px; padding-right: 8px; } -.btn-group > .btn-mini + .dropdown-toggle { - padding-left: 5px; - padding-right: 5px; -} .btn-group > .btn-large + .dropdown-toggle { padding-left: 12px; padding-right: 12px; diff --git a/less/carousel.less b/less/carousel.less index a7a4672c1..13159db41 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -26,7 +26,7 @@ // Account for jankitude on images > img, > a > img { - display: block; + .img-responsive(); line-height: 1; } } -- cgit v1.2.3 From 6a20810ca4970a681bd34274851365af011694e3 Mon Sep 17 00:00:00 2001 From: Francis Brunelle Date: Sat, 29 Jun 2013 16:06:14 -0400 Subject: reset left padding for .media-list, .pagination and .pager --- less/media.less | 2 +- less/pager.less | 1 + less/pagination.less | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/media.less b/less/media.less index 21063eb2b..bcba8081c 100644 --- a/less/media.less +++ b/less/media.less @@ -49,6 +49,6 @@ // Undo default ul/ol styles .media-list { - margin-left: 0; + padding-left: 0; list-style: none; } diff --git a/less/pager.less b/less/pager.less index 0b2fcf7cb..007952da0 100644 --- a/less/pager.less +++ b/less/pager.less @@ -4,6 +4,7 @@ .pager { + padding-left: 0; margin: @line-height-computed 0; list-style: none; text-align: center; diff --git a/less/pagination.less b/less/pagination.less index 73c063be0..320387a67 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -3,6 +3,7 @@ // -------------------------------------------------- .pagination { display: inline-block; + padding-left: 0; margin: @line-height-computed 0; border-radius: @border-radius-base; } -- cgit v1.2.3 From 2e8752b26f08b888300fad5a0e357c860ab594b2 Mon Sep 17 00:00:00 2001 From: Roland Warmerdam Date: Mon, 1 Jul 2013 10:51:08 +1200 Subject: Prevent the font shorthand from getting compiled as division --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 24ca797ff..48c0d011a 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -71,7 +71,7 @@ // CSS image replacement // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 .hide-text() { - font: 0/0 a; + font: ~"0/0" a; color: transparent; text-shadow: none; background-color: transparent; -- cgit v1.2.3 From e5e9d5916ab6e14aff18e5fb2f9e8e1f2eccb5a1 Mon Sep 17 00:00:00 2001 From: liuyl Date: Mon, 1 Jul 2013 20:29:41 +0800 Subject: simplify tables.less --- less/tables.less | 74 +++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) (limited to 'less') diff --git a/less/tables.less b/less/tables.less index 88481a944..392593902 100644 --- a/less/tables.less +++ b/less/tables.less @@ -95,33 +95,31 @@ th { > tbody:first-child > tr:first-child td { border-top: 0; } - // For first th/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, - > tbody:first-child > tr:first-child > th:first-child { - border-top-left-radius: @border-radius-base; - } - // For last th/td in the first row in the first thead or tbody - > thead:first-child > tr:first-child > th:last-child, - > tbody:first-child > tr:first-child > td:last-child, - > tbody:first-child > tr:first-child > th:last-child { - border-top-right-radius: @border-radius-base; - } - // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot - > thead:last-child > tr:last-child > th:first-child, - > tbody:last-child > tr:last-child > td:first-child, - > tbody:last-child > tr:last-child > th:first-child, - > tfoot:last-child > tr:last-child > td:first-child, - > tfoot:last-child > tr:last-child > th:first-child { - border-bottom-left-radius: @border-radius-base; - } - // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot - > thead:last-child > tr:last-child > th:last-child, - > tbody:last-child > tr:last-child > td:last-child, - > tbody:last-child > tr:last-child > th:last-child, - > tfoot:last-child > tr:last-child > td:last-child, - > tfoot:last-child > tr:last-child > th:last-child { - border-bottom-right-radius: @border-radius-base; + > thead:first-child > tr:first-child > th, + > tbody:first-child > tr:first-child > td, + > tbody:first-child > tr:first-child > th { + // For first th/td in the first row in the first thead or tbody + &:first-child{ + border-top-left-radius: @border-radius-base; + } + // For last th/td in the first row in the first thead or tbody + &:last-child{ + border-top-right-radius: @border-radius-base; + } + } + > thead:last-child > tr:last-child > th, + > tbody:last-child > tr:last-child > td, + > tbody:last-child > tr:last-child > th, + > tfoot:last-child > tr:last-child > td, + > tfoot:last-child > tr:last-child > th { + // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot + &:first-child{ + border-bottom-left-radius: @border-radius-base; + } + // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot + &:last-child{ + border-bottom-right-radius: @border-radius-base; + } } // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot @@ -133,19 +131,17 @@ th { } // Special fixes to round the left border on the first td/th - > caption + thead > tr:first-child > th:first-child, - > caption + tbody > tr:first-child > td:first-child, - > colgroup + thead > tr:first-child > th:first-child, - > colgroup + tbody > tr:first-child > td:first-child { - border-top-left-radius: @border-radius-base; - } - > caption + thead > tr:first-child > th:last-child, - > caption + tbody > tr:first-child > td:last-child, - > colgroup + thead > tr:first-child > th:last-child, - > colgroup + tbody > tr:first-child > td:last-child { - border-top-right-radius: @border-radius-base; + > caption + thead > tr:first-child > th, + > caption + tbody > tr:first-child > td, + > colgroup + thead > tr:first-child > th, + > colgroup + tbody > tr:first-child > td { + &:first-child{ + border-top-left-radius: @border-radius-base; + } + &:last-child{ + border-top-right-radius: @border-radius-base; + } } - } -- cgit v1.2.3 From fea69df80c3d304868d816a85a8b027b40a13f3d Mon Sep 17 00:00:00 2001 From: Julian Thilo Date: Mon, 1 Jul 2013 21:13:57 +0200 Subject: Fix responsive utilities for table elements This change prevents situations where specificity causes some rules to be overridden by the ones intended for mobile. * Added mixin `responsive-invisibility()` * Swapped out `display: none !important;` for new mixin --- less/mixins.less | 7 +++++++ less/responsive-utilities.less | 46 +++++++++++++++++++++++++++++++----------- 2 files changed, 41 insertions(+), 12 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 24ca797ff..3161a845f 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -411,6 +411,13 @@ td& { display: table-cell !important; } } +.responsive-invisibility() { + display: none !important; + tr& { display: none !important; } + th&, + td& { display: none !important; } +} + // Grid System diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index 21e5d7556..38dd9639a 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -36,13 +36,19 @@ // Visibility utilities // For Phones -.visible-sm { +.visible-sm { .responsive-visibility(); } -.visible-md { display: none !important; } -.visible-lg { display: none !important; } +.visible-md { + .responsive-invisibility(); +} +.visible-lg { + .responsive-invisibility(); +} -.hidden-sm { display: none !important; } +.hidden-sm { + .responsive-invisibility(); +} .hidden-md { .responsive-visibility(); } @@ -53,16 +59,22 @@ // Tablets & small desktops only @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { - .visible-sm { display: none !important; } + .visible-sm { + .responsive-invisibility(); + } .visible-md { .responsive-visibility(); } - .visible-lg { display: none !important; } + .visible-lg { + .responsive-invisibility(); + } .hidden-sm { .responsive-visibility(); } - .hidden-md { display: none !important; } + .hidden-md { + .responsive-invisibility(); + } .hidden-lg { .responsive-visibility(); } @@ -70,8 +82,12 @@ // For desktops @media (min-width: @screen-desktop) { - .visible-sm { display: none !important; } - .visible-md { display: none !important; } + .visible-sm { + .responsive-invisibility(); + } + .visible-md { + .responsive-invisibility(); + } .visible-lg { .responsive-visibility(); } @@ -82,16 +98,22 @@ .hidden-md { .responsive-visibility(); } - .hidden-lg { display: none !important; } + .hidden-lg { + .responsive-invisibility(); + } } // Print utilities -.visible-print { display: none !important; } +.visible-print { + .responsive-invisibility(); +} .hidden-print { } @media print { .visible-print { .responsive-visibility(); } - .hidden-print { display: none !important; } + .hidden-print { + .responsive-invisibility(); + } } -- cgit v1.2.3 From a27ecfccf301f8996d7ddf6bd6f7f46f358a5a31 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Jul 2013 17:32:07 -0700 Subject: Make more components mixin-friendly --- less/accordion.less | 13 ++++----- less/alerts.less | 15 ++++++----- less/carousel.less | 14 ++-------- less/close.less | 20 +++++++------- less/labels.less | 6 ++--- less/list-group.less | 75 ++++++++++++++++++++++++---------------------------- 6 files changed, 63 insertions(+), 80 deletions(-) (limited to 'less') diff --git a/less/accordion.less b/less/accordion.less index 59765f154..0d1897831 100644 --- a/less/accordion.less +++ b/less/accordion.less @@ -16,15 +16,12 @@ } .accordion-heading { border-bottom: 0; -} -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} -// General toggle styles -.accordion-toggle { - cursor: pointer; + .accordion-toggle { + display: block; + padding: 8px 15px; + cursor: pointer; + } } // Inner needs the styles because you can't animate properly with any styles on the element diff --git a/less/alerts.less b/less/alerts.less index 24b791143..596734152 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -82,11 +82,12 @@ .alert-block { padding-top: 15px; padding-bottom: 15px; -} -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} -.alert-block p + p { - margin-top: 5px; + + > p, + > ul { + margin-bottom: 0; + } + p + p { + margin-top: 5px; + } } diff --git a/less/carousel.less b/less/carousel.less index 13159db41..d0f636cf8 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -8,15 +8,10 @@ position: relative; } -// Wrap all slides, but only show the active one .carousel-inner { position: relative; overflow: hidden; width: 100%; -} - -// Immediate parent of all slides -.carousel-inner { > .item { display: none; @@ -80,13 +75,8 @@ color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.6); - - // 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); + // We can't have this transition here because webkit cancels the carousel + // animation if you trip this while in the middle of another animation. // Set gradients for backgrounds &.left { diff --git a/less/close.less b/less/close.less index e879da4d6..5fe23b3dc 100644 --- a/less/close.less +++ b/less/close.less @@ -19,15 +19,15 @@ cursor: pointer; .opacity(.5); } -} -// Additional properties for button version -// iOS requires the button element instead of an anchor tag. -// If you want the anchor version, it requires `href="#"`. -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; + // Additional properties for button version + // iOS requires the button element instead of an anchor tag. + // If you want the anchor version, it requires `href="#"`. + button& { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + } } diff --git a/less/labels.less b/less/labels.less index 92fe8f89e..3d863f7df 100644 --- a/less/labels.less +++ b/less/labels.less @@ -15,7 +15,7 @@ background-color: @gray-light; border-radius: .25em; - // Add hover effects, but only for links + // Add hover effects, but only for links &[href] { &:hover, &:focus { @@ -32,7 +32,7 @@ .label-danger { background-color: @label-danger-bg; &[href] { - &:hover, + &:hover, &:focus { background-color: darken(@label-danger-bg, 10%); } @@ -67,4 +67,4 @@ background-color: darken(@label-info-bg, 10%); } } -} \ No newline at end of file +} diff --git a/less/list-group.less b/less/list-group.less index f9d9f612c..34718633a 100644 --- a/less/list-group.less +++ b/less/list-group.less @@ -22,16 +22,22 @@ // Place the border on the list items and negative margin up for better styling margin-bottom: -1px; border: 1px solid @list-group-border; -} -// Round the first and last items -.list-group-item:first-child { - .border-top-radius(@border-radius-base); -} -.list-group-item:last-child { - margin-bottom: 0; - .border-bottom-radius(@border-radius-base); -} + // Round the first and last items + &:first-child { + .border-top-radius(@border-radius-base); + } + &:last-child { + margin-bottom: 0; + .border-bottom-radius(@border-radius-base); + } + + // Align badges within list items + > .badge { + float: right; + margin-right: -15px; + } +} // Custom content options // ------------------------- @@ -50,45 +56,34 @@ // Custom content within linked items a.list-group-item { + // Colorize content accordingly .list-group-item-heading { color: #333; } .list-group-item-text { color: #555; } -} -// Hover state -a.list-group-item:hover, -a.list-group-item:focus { - text-decoration: none; - background-color: @list-group-hover-bg; -} - -// Active class on item itself, not parent -a.list-group-item.active { - z-index: 2; // Place active items above their siblings for proper border styling - color: @list-group-active-color; - background-color: @list-group-active-bg; - border-color: @list-group-active-border; - - // Force color to inherit for custom content - .list-group-item-heading { - color: inherit; - } - .list-group-item-text { - color: lighten(@list-group-active-bg, 40%); + // Hover state + &:hover, + &:focus { + text-decoration: none; + background-color: @list-group-hover-bg; } -} -// Chevrons and badges within list items -// ------------------------- + // Active class on item itself, not parent + &.active { + z-index: 2; // Place active items above their siblings for proper border styling + color: @list-group-active-color; + background-color: @list-group-active-bg; + border-color: @list-group-active-border; -.list-group-item > .badge, -.list-group-item > .glyphicon-chevron-right { - float: right; - margin-right: -15px; -} -.list-group-item > .glyphicon + .badge { - margin-right: 5px; + // Force color to inherit for custom content + .list-group-item-heading { + color: inherit; + } + .list-group-item-text { + color: lighten(@list-group-active-bg, 40%); + } + } } -- cgit v1.2.3 From c9df1db50221fe033a0b7bc216fa2de5b6eea17a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Jul 2013 18:16:59 -0700 Subject: fixes #7367: slightly larger carousel indicators --- less/carousel.less | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/carousel.less b/less/carousel.less index d0f636cf8..8834c6f7b 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -120,23 +120,25 @@ left: 50%; z-index: 15; width: 100px; - margin: 0 0 0 -50px; + margin-left: -50px; padding-left: 0; list-style: none; text-align: center; li { display: inline-block; - width: 8px; - height: 8px; - margin-left: 0; - margin-right: 0; + width: 10px; + height: 10px; + margin: 1px; text-indent: -999px; border: 1px solid #fff; - border-radius: 5px; + border-radius: 10px; cursor: pointer; } .active { + margin: 0; + width: 12px; + height: 12px; background-color: #fff; } } -- cgit v1.2.3 From 9da90adb4ca09e4c3b5ec549211c07292ec38d71 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Jul 2013 18:21:19 -0700 Subject: fixes #8068: add .help-block to form field state mixin --- less/mixins.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 24ca797ff..6a24beb03 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -481,6 +481,7 @@ // Generate form validation states .form-field-validation(@text-color: #555, @border-color: #ccc, @background-color: #f5f5f5) { // Color the label text + .help-block, .control-label { color: @text-color; } -- cgit v1.2.3 From 08b3515fd7dfa76cdbb92d52a15d6797f3a1c4ed Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Jul 2013 19:42:26 -0700 Subject: fixes #8345: use inline-block on .img-responsive --- less/mixins.less | 2 -- less/scaffolding.less | 2 +- less/thumbnails.less | 7 ++----- 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 6a24beb03..7d93843b9 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -411,8 +411,6 @@ td& { display: table-cell !important; } } - - // Grid System // ----------- diff --git a/less/scaffolding.less b/less/scaffolding.less index 79447c3f5..88b6c7c6e 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -64,7 +64,7 @@ img { // Responsive images (ensure images don't scale beyond their parents) .img-responsive { - display: block; + display: inline-block; max-width: 100%; // Part 1: Set a maximum relative to the parent height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching } diff --git a/less/thumbnails.less b/less/thumbnails.less index b15b8d25a..1f896708d 100644 --- a/less/thumbnails.less +++ b/less/thumbnails.less @@ -17,15 +17,12 @@ border-radius: @thumbnail-border-radius; .transition(all .2s ease-in-out); } -.thumbnail > img, -.img-thumbnail { - .img-responsive(); -} .thumbnail { display: block; } +.thumbnail > img, .img-thumbnail { - display: inline-block; + .img-responsive(); } // Add a hover state for linked versions only -- cgit v1.2.3 From 5b2d933524616c9948c9e5229c14e109aa83727a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Jul 2013 19:49:29 -0700 Subject: Fixes #8350: unfuck Chrome number input element cursor /cc @cvrebert @eintnohick --- less/forms.less | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index ea340007c..45f453789 100644 --- a/less/forms.less +++ b/less/forms.less @@ -149,6 +149,16 @@ input[type="checkbox"]:focus { .tab-focus(); } +// Fix for Chrome number input +// Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button. +// See https://github.com/twitter/bootstrap/issues/8350 for more. +input[type="number"] { + &::-webkit-outer-spin-button + &::-webkit-inner-spin-button { + height: auto; + } +} + // Placeholder // ------------------------- -- cgit v1.2.3 From 749dc35328862896d613bfe72fc961e490037fad Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Jul 2013 20:18:44 -0700 Subject: comma for the guardian angel /cc @cvrebert --- 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 45f453789..2389036da 100644 --- a/less/forms.less +++ b/less/forms.less @@ -153,7 +153,7 @@ input[type="checkbox"]:focus { // Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button. // See https://github.com/twitter/bootstrap/issues/8350 for more. input[type="number"] { - &::-webkit-outer-spin-button + &::-webkit-outer-spin-button, &::-webkit-inner-spin-button { height: auto; } -- cgit v1.2.3 From da072fff21f565521d3dbe1f5f4f42550ecc989e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 2 Jul 2013 11:25:57 -0700 Subject: refactor tables.less to use nesting more --- less/tables.less | 106 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 44 deletions(-) (limited to 'less') diff --git a/less/tables.less b/less/tables.less index 392593902..ebfb1c656 100644 --- a/less/tables.less +++ b/less/tables.less @@ -19,27 +19,31 @@ th { width: 100%; margin-bottom: @line-height-computed; // Cells - thead > tr > th, - tbody > tr > th, - thead > tr > td, - tbody > tr > td { - padding: 8px; - line-height: @line-height-base; - vertical-align: top; - border-top: 1px solid @table-border-color; + thead, + tbody { + > tr { + > th, + > td { + padding: 8px; + line-height: @line-height-base; + vertical-align: top; + border-top: 1px solid @table-border-color; + } + } } // Bottom align for column headings thead > tr > th { vertical-align: bottom; } // Remove top border from thead by default - caption + thead tr:first-child th, - caption + thead tr:first-child td, - colgroup + thead tr:first-child th, - colgroup + thead tr:first-child td, - thead:first-child tr:first-child th, - thead:first-child tr:first-child td { - border-top: 0; + caption + thead, + colgroup + thead, + thead:first-child { + tr:first-child { + th, td { + border-top: 0; + } + } } // Account for multiple tbody instances tbody + tbody { @@ -58,11 +62,14 @@ th { // ------------------------------- .table-condensed { - thead > tr > th, - tbody > tr > th, - thead > tr > td, - tbody > tr > td { - padding: 4px 5px; + thead, + tbody { + > tr { + > th, + > td { + padding: 4px 5px; + } + } } } @@ -77,11 +84,14 @@ th { border-left: 0; border-radius: @border-radius-base; - > thead > tr > th, - > tbody > tr > th, - > thead > tr > td, - > tbody > tr > td { - border-left: 1px solid @table-border-color; + > thead, + > tbody { + > tr { + > th, + > td { + border-left: 1px solid @table-border-color; + } + } } // Prevent a double border > caption + thead > tr:first-child th, @@ -131,15 +141,16 @@ th { } // Special fixes to round the left border on the first td/th - > caption + thead > tr:first-child > th, - > caption + tbody > tr:first-child > td, - > colgroup + thead > tr:first-child > th, - > colgroup + tbody > tr:first-child > td { - &:first-child{ - border-top-left-radius: @border-radius-base; - } - &:last-child{ - border-top-right-radius: @border-radius-base; + > caption, + > colgroup { + + thead > tr:first-child > th, + + tbody > tr:first-child > td { + &:first-child { + border-top-left-radius: @border-radius-base; + } + &:last-child { + border-top-right-radius: @border-radius-base; + } } } } @@ -152,9 +163,11 @@ th { // Default zebra-stripe styles (alternating gray and transparent backgrounds) .table-striped { > tbody { - > tr:nth-child(odd) > td, - > tr:nth-child(odd) > th { - background-color: @table-bg-accent; + > tr:nth-child(odd) { + > td, + > th { + background-color: @table-bg-accent; + } } } } @@ -167,9 +180,11 @@ th { // Placed here since it has to come after the potential zebra striping .table-hover { > tbody { - > tr:hover > td, - > tr:hover > th { - background-color: @table-bg-hover; + > tr:hover { + > td, + > th { + background-color: @table-bg-hover; + } } } } @@ -184,10 +199,13 @@ table col[class^="col-"] { float: none; display: table-column; } -table td[class^="col-"], -table th[class^="col-"] { - float: none; - display: table-cell; +table { + td, th { + &[class^="col-"] { + float: none; + display: table-cell; + } + } } -- cgit v1.2.3 From 5b69d3405301ebf9f7047a459f727cbe5f73aedd Mon Sep 17 00:00:00 2001 From: liuyl Date: Wed, 3 Jul 2013 20:37:36 +0800 Subject: use sibling selector instead of pseudo selector --- less/breadcrumbs.less | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/breadcrumbs.less b/less/breadcrumbs.less index 2fe8217a3..956944a8b 100644 --- a/less/breadcrumbs.less +++ b/less/breadcrumbs.less @@ -12,15 +12,12 @@ > li { display: inline-block; text-shadow: 0 1px 0 #fff; - &:after { + &+li:before { display: inline-block; - content: "\00a0 /"; // Unicode space added since inline-block means non-collapsing white-space + content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space padding: 0 5px; color: #ccc; } - &:last-child:after { - display: none; // No divider after last element - } } > .active { color: @gray-light; -- cgit v1.2.3 From e6529e9588bed07af84daeb7af2651f05cb9220e Mon Sep 17 00:00:00 2001 From: liuyl Date: Fri, 5 Jul 2013 15:09:16 +0800 Subject: delete typeahead style --- less/dropdowns.less | 6 ------ 1 file changed, 6 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index f2ddc4392..0a412f9c3 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -158,9 +158,3 @@ padding-left: 20px; padding-right: 20px; } - -// Typeahead -// --------------------------- -.typeahead { - z-index: 1051; -} -- cgit v1.2.3 From 3bd42511f41d6ea0ee1aa51535267ab19d3bbd20 Mon Sep 17 00:00:00 2001 From: liuyl Date: Fri, 5 Jul 2013 20:17:20 +0800 Subject: refactor pagination --- less/pagination.less | 94 +++++++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 42 deletions(-) (limited to 'less') diff --git a/less/pagination.less b/less/pagination.less index 320387a67..8050ab90b 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -6,49 +6,59 @@ padding-left: 0; margin: @line-height-computed 0; border-radius: @border-radius-base; + + > li { + display: inline; // Remove list-style and block-level defaults + > a, + > span,{ + float: left; // Collapse white-space + padding: 4px 12px; + line-height: @line-height-base; + text-decoration: none; + background-color: @pagination-bg; + border: 1px solid @pagination-border; + border-left-width: 0; + } + } + + > li > a:hover, + > li > a:focus, + > .active > a, + > .active > span { + background-color: @pagination-active-bg; + } + > .active > a, + > .active > span { + color: @gray-light; + cursor: default; + } + + > .disabled { + span, + a, + a:hover, + a:focus { + color: @gray-light; + background-color: @pagination-bg; + cursor: default; + } + } + + > li:first-child { + > a, + > span { + border-left-width: 1px; + .border-left-radius(@border-radius-base); + } + } + + > li:last-child { + > a, + > span { + .border-right-radius(@border-radius-base); + } + } } -.pagination > li { - display: inline; // Remove list-style and block-level defaults -} -.pagination > li > a, -.pagination > li > span { - float: left; // Collapse white-space - padding: 4px 12px; - line-height: @line-height-base; - text-decoration: none; - background-color: @pagination-bg; - border: 1px solid @pagination-border; - border-left-width: 0; -} -.pagination > li > a:hover, -.pagination > li > a:focus, -.pagination > .active > a, -.pagination > .active > span { - background-color: @pagination-active-bg; -} -.pagination > .active > a, -.pagination > .active > span { - color: @gray-light; - cursor: default; -} -.pagination > .disabled > span, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: @gray-light; - background-color: @pagination-bg; - cursor: default; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - border-left-width: 1px; - .border-left-radius(@border-radius-base); -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - .border-right-radius(@border-radius-base); -} - // Sizing // -------------------------------------------------- -- cgit v1.2.3 From 969529c80eaa4946964c1e393b4cad420d13f4b2 Mon Sep 17 00:00:00 2001 From: liuyl Date: Fri, 5 Jul 2013 20:18:57 +0800 Subject: refactor pagination --- less/pagination.less | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/pagination.less b/less/pagination.less index 8050ab90b..48201b2ef 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -34,10 +34,10 @@ } > .disabled { - span, - a, - a:hover, - a:focus { + > span, + > a, + > a:hover, + > a:focus { color: @gray-light; background-color: @pagination-bg; cursor: default; -- cgit v1.2.3 From 88a266b800a74b8445d06ac2fcb70ab97f035dfd Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 5 Jul 2013 14:15:00 -0500 Subject: Add tfoot back (addresses more than #8387) --- less/tables.less | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/tables.less b/less/tables.less index ebfb1c656..9d39ad39f 100644 --- a/less/tables.less +++ b/less/tables.less @@ -20,7 +20,8 @@ th { margin-bottom: @line-height-computed; // Cells thead, - tbody { + tbody, + tfoot { > tr { > th, > td { @@ -63,7 +64,8 @@ th { .table-condensed { thead, - tbody { + tbody, + tfoot { > tr { > th, > td { @@ -85,7 +87,8 @@ th { border-radius: @border-radius-base; > thead, - > tbody { + > tbody, + > tfoot { > tr { > th, > td { @@ -200,7 +203,8 @@ table col[class^="col-"] { display: table-column; } table { - td, th { + td, + th { &[class^="col-"] { float: none; display: table-cell; -- cgit v1.2.3 From 61823dbff1377443203f6ef6a98b8202b57abb29 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 5 Jul 2013 14:21:05 -0500 Subject: Move `hr` to scaffolding.less (out of type.less) and simplify styles --- less/scaffolding.less | 12 ++++++++++++ less/type.less | 9 --------- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'less') diff --git a/less/scaffolding.less b/less/scaffolding.less index 88b6c7c6e..8fc3a2360 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -81,3 +81,15 @@ img { .img-circle { border-radius: 500px; // crank the border-radius so it works with most reasonably sized images } + + +// Horizontal rules +// ------------------------- + +hr { + margin-top: @line-height-computed; + margin-bottom: @line-height-computed; + border: 0; + border-top: 1px solid @hr-border; +} + diff --git a/less/type.less b/less/type.less index 9892d5589..2f1f42ee3 100644 --- a/less/type.less +++ b/less/type.less @@ -164,15 +164,6 @@ dd { // MISC // ---- -// Horizontal rules -hr { - margin: @line-height-computed 0; - border: 0; - border-top: 1px solid @hr-border; - border-bottom: 1px solid #fff; - border-bottom: 1px solid rgba(255,255,255,.5); -} - // Abbreviations and acronyms abbr[title], // Added data-* attribute to help out our tooltip plugin, per https://github.com/twitter/bootstrap/issues/5257 -- cgit v1.2.3 From e757ddd60fb48849159e19abb9ebbc6df10fc78d Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 22:01:34 -0700 Subject: extract .alert-variant mix-in --- less/alerts.less | 30 +++--------------------------- less/mixins.less | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 27 deletions(-) (limited to 'less') diff --git a/less/alerts.less b/less/alerts.less index 596734152..66aa6cf24 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -43,37 +43,13 @@ // ------------------------- .alert-success { - background-color: @alert-success-bg; - border-color: @alert-success-border; - color: @alert-success-text; - hr { - border-top-color: darken(@alert-success-border, 5%); - } - .alert-link { - color: darken(@alert-success-text, 10%); - } + .alert-variant(@alert-success-bg, @alert-success-border, @alert-success-text); } .alert-danger { - background-color: @alert-danger-bg; - border-color: @alert-danger-border; - color: @alert-danger-text; - hr { - border-top-color: darken(@alert-danger-border, 5%); - } - .alert-link { - color: darken(@alert-danger-text, 10%); - } + .alert-variant(@alert-danger-bg, @alert-danger-border, @alert-danger-text); } .alert-info { - background-color: @alert-info-bg; - border-color: @alert-info-border; - color: @alert-info-text; - hr { - border-top-color: darken(@alert-info-border, 5%); - } - .alert-link { - color: darken(@alert-info-text, 10%); - } + .alert-variant(@alert-info-bg, @alert-info-border, @alert-info-text); } // Block alerts diff --git a/less/mixins.less b/less/mixins.less index eb05623ac..8bbb551a5 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -361,6 +361,20 @@ border-bottom: 1px solid @bottom; } +// Alerts +// ------------------------- +.alert-variant(@background, @border, @text-color) { + background-color: @background; + border-color: @border; + color: @text-color; + hr { + border-top-color: darken(@border, 5%); + } + .alert-link { + color: darken(@text-color, 10%); + } +} + // Button psuedo states // ------------------------- // Easily pump out default styles, as well as :hover, :focus, :active, -- cgit v1.2.3 From f12d6401f22bc4c4f46bb8fa7fb2e7cf087b99d9 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 22:07:03 -0700 Subject: more nesting in button-groups.less --- less/button-groups.less | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 408e7c75d..9500fecbb 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -72,9 +72,11 @@ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } -.btn-group > .btn-group:first-child > .btn:last-child, -.btn-group > .btn-group:first-child > .dropdown-toggle { - .border-right-radius(0); +.btn-group > .btn-group:first-child { + > .btn:last-child, + > .dropdown-toggle { + .border-right-radius(0); + } } .btn-group > .btn-group:last-child > .btn:first-child { .border-left-radius(0); @@ -134,14 +136,16 @@ margin-top: -1px; } } -.btn-group-vertical .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.btn-group-vertical .btn:first-child { - .border-bottom-radius(0); -} -.btn-group-vertical .btn:last-child { - .border-top-radius(0); +.btn-group-vertical .btn { + &:not(:first-child):not(:last-child) { + border-radius: 0; + } + &:first-child { + .border-bottom-radius(0); + } + &:last-child { + .border-top-radius(0); + } } -- cgit v1.2.3 From 15bd6eadf39c4bbd5ac0971e9d77d26ab85635af Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 21:51:47 -0700 Subject: more nesting in navs.less --- less/navs.less | 73 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 32 deletions(-) (limited to 'less') diff --git a/less/navs.less b/less/navs.less index d42ad3588..1b1e18ed0 100644 --- a/less/navs.less +++ b/less/navs.less @@ -31,13 +31,14 @@ // Disabled state sets text to gray and nukes hover/tab effects &.disabled > a { color: @gray-light; - } - &.disabled > a:hover, - &.disabled > a:focus { - color: @gray-light; - text-decoration: none; - background-color: transparent; - cursor: default; + + &:hover, + &:focus { + color: @gray-light; + text-decoration: none; + background-color: transparent; + cursor: default; + } } // Space the headers out when they follow another list item (link) @@ -47,15 +48,17 @@ } // Open dropdowns - &.open > a, - &.open > a:hover, - &.open > a:focus { - color: #fff; - background-color: @link-color; - border-color: @link-color; - .caret { - border-top-color: #fff; - border-bottom-color: #fff; + &.open > a { + &, + &:hover, + &:focus { + color: #fff; + background-color: @link-color; + border-color: @link-color; + .caret { + border-top-color: #fff; + border-bottom-color: #fff; + } } } @@ -99,14 +102,16 @@ } // Active state, and it's :hover to override normal :hover - &.active > a, - &.active > a:hover, - &.active > a:focus { - color: @gray; - background-color: @body-bg; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; + &.active > a { + &, + &:hover, + &:focus { + color: @gray; + background-color: @body-bg; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; + } } } // pulling this in mainly for less shorthand @@ -134,11 +139,13 @@ } // Active state - &.active > a, - &.active > a:hover, - &.active > a:focus { - color: #fff; - background-color: @component-active-bg; + &.active > a { + &, + &:hover, + &:focus { + color: #fff; + background-color: @component-active-bg; + } } } } @@ -218,9 +225,11 @@ .pill-content > .pill-pane { display: none; } -.tab-content > .active, -.pill-content > .active { - display: block; +.tab-content, +.pill-content { + > .active { + display: block; + } } -- cgit v1.2.3 From a7dd1088d247b533c483afb0cde85e9c49ab5ea7 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 7 Jul 2013 14:26:51 -0700 Subject: extract .label-variant mix-in --- less/labels.less | 32 ++++---------------------------- less/mixins.less | 12 ++++++++++++ 2 files changed, 16 insertions(+), 28 deletions(-) (limited to 'less') diff --git a/less/labels.less b/less/labels.less index 3d863f7df..d7852d107 100644 --- a/less/labels.less +++ b/less/labels.less @@ -30,41 +30,17 @@ // Colors // Contextual variations (linked labels get darker on :hover) .label-danger { - background-color: @label-danger-bg; - &[href] { - &:hover, - &:focus { - background-color: darken(@label-danger-bg, 10%); - } - } + .label-variant(@label-danger-bg); } .label-success { - background-color: @label-success-bg; - &[href] { - &:hover, - &:focus { - background-color: darken(@label-success-bg, 10%); - } - } + .label-variant(@label-success-bg); } .label-warning { - background-color: @label-warning-bg; - &[href] { - &:hover, - &:focus { - background-color: darken(@label-warning-bg, 10%); - } - } + .label-variant(@label-warning-bg); } .label-info { - background-color: @label-info-bg; - &[href] { - &:hover, - &:focus { - background-color: darken(@label-info-bg, 10%); - } - } + .label-variant(@label-info-bg); } diff --git a/less/mixins.less b/less/mixins.less index eb05623ac..c4e99f2e2 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -392,6 +392,18 @@ } } +// Labels +// ------------------------- +.label-variant(@color) { + background-color: @color; + &[href] { + &:hover, + &:focus { + background-color: darken(@color, 10%); + } + } +} + // Navbar vertical align // ------------------------- // Vertically center elements in the navbar. -- cgit v1.2.3 From d2fb35d546701325686487fafca73d992b2bb74a Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 7 Jul 2013 15:06:16 -0700 Subject: extract .progress-bar-variant mix-in --- less/mixins.less | 9 +++++++++ less/progress-bars.less | 20 ++++---------------- 2 files changed, 13 insertions(+), 16 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index eb05623ac..a86b7f80e 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -401,6 +401,15 @@ margin-bottom: ((@navbar-height - @element-height) / 2); } +// Progress bars +// ------------------------- +.progress-bar-variant(@color) { + background-color: @color; + .progress-striped & { + #gradient > .striped(@color); + } +} + // Responsive utilities // ------------------------- // More easily include all the states for responsive-utilities.less. diff --git a/less/progress-bars.less b/less/progress-bars.less index e963fa968..59f81048f 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -87,32 +87,20 @@ // Danger (red) .progress-bar-danger { - background-color: @progress-bar-danger-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-danger-bg); - } + .progress-bar-variant(@progress-bar-danger-bg); } // Success (green) .progress-bar-success { - background-color: @progress-bar-success-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-success-bg); - } + .progress-bar-variant(@progress-bar-success-bg); } // Warning (orange) .progress-bar-warning { - background-color: @progress-bar-warning-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-warning-bg); - } + .progress-bar-variant(@progress-bar-warning-bg); } // Info (teal) .progress-bar-info { - background-color: @progress-bar-info-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-info-bg); - } + .progress-bar-variant(@progress-bar-info-bg); } -- cgit v1.2.3 From 6e03639af22e2c1c06c5e146192c79b41f1d7385 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 22:13:37 -0700 Subject: more nesting in buttons.less --- less/buttons.less | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 6280d3448..3cc7da00d 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -81,33 +81,32 @@ // ------------------------- // Make a button look and behave like a link -.btn-link, -.btn-link:active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - background-image: none; - .box-shadow(none); -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} .btn-link { color: @link-color; font-weight: normal; cursor: pointer; border-radius: 0; -} -.btn-link:hover, -.btn-link:focus { - color: @link-hover-color; - text-decoration: underline; - background-color: transparent; -} -.btn-link { + + &, + &:active, + &[disabled], + fieldset[disabled] & { + background-color: transparent; + background-image: none; + .box-shadow(none); + } + &, + &:hover, + &:focus, + &:active { + border-color: transparent; + } + &:hover, + &:focus { + color: @link-hover-color; + text-decoration: underline; + background-color: transparent; + } &[disabled], fieldset[disabled] & { &:hover, -- cgit v1.2.3 From d9cd5e4e0c252ca7db3bc8a217a576ad9e8e6257 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 7 Jul 2013 14:40:18 -0700 Subject: more nesting in navbar.less --- less/navbar.less | 118 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 52 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index b8283601d..7a6e80488 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -30,23 +30,27 @@ color: @navbar-link-color; line-height: 20px; border-radius: @border-radius-base; + &:hover, + &:focus { + color: @navbar-link-hover-color; + background-color: @navbar-link-hover-bg; + } } - > li > a:hover, - > li > a:focus { - color: @navbar-link-hover-color; - background-color: @navbar-link-hover-bg; - } - > .active > a, - > .active > a:hover, - > .active > a:focus { - color: @navbar-link-active-color; - background-color: @navbar-link-active-bg; + > .active > a { + &, + &:hover, + &:focus { + color: @navbar-link-active-color; + background-color: @navbar-link-active-bg; + } } - > .disabled > a, - > .disabled > a:hover, - > .disabled > a:focus { - color: @navbar-link-disabled-color; - background-color: @navbar-link-disabled-bg; + > .disabled > a { + &, + &:hover, + &:focus { + color: @navbar-link-disabled-color; + background-color: @navbar-link-disabled-bg; + } } // Right aligned contents @@ -168,22 +172,22 @@ } // Remove background color from open dropdown - > .open > a, - > .open > a:hover, - > .open > a:focus { - background-color: @navbar-link-active-bg; - color: @navbar-link-active-color; + > .open > a { + &, + &:hover, + &:focus { + background-color: @navbar-link-active-bg; + color: @navbar-link-active-color; + .caret { + border-top-color: @navbar-link-active-color; + border-bottom-color: @navbar-link-active-color; + } + } } > .dropdown > a .caret { border-top-color: @navbar-link-color; border-bottom-color: @navbar-link-color; } - > .open > a .caret, - > .open > a:hover .caret, - > .open > a:focus .caret { - border-top-color: @navbar-link-active-color; - border-bottom-color: @navbar-link-active-color; - } } // Right aligned menus need alt position @@ -217,23 +221,28 @@ .navbar-nav { > li > a { color: @navbar-inverse-link-color; + + &:hover, + &:focus { + color: @navbar-inverse-link-hover-color; + background-color: @navbar-inverse-link-hover-bg; + } } - > li > a:hover, - > li > a:focus { - color: @navbar-inverse-link-hover-color; - background-color: @navbar-inverse-link-hover-bg; - } - > .active > a, - > .active > a:hover, - > .active > a:focus { - color: @navbar-inverse-link-active-color; - background-color: @navbar-inverse-link-active-bg; + > .active > a { + &, + &:hover, + &:focus { + color: @navbar-inverse-link-active-color; + background-color: @navbar-inverse-link-active-bg; + } } - > .disabled > a, - > .disabled > a:hover, - > .disabled > a:focus { - color: @navbar-inverse-link-disabled-color; - background-color: @navbar-inverse-link-disabled-bg; + > .disabled > a { + &, + &:hover, + &:focus { + color: @navbar-inverse-link-disabled-color; + background-color: @navbar-inverse-link-disabled-bg; + } } } @@ -251,11 +260,13 @@ // Dropdowns .navbar-nav { - > .open > a, - > .open > a:hover, - > .open > a:focus { - background-color: @navbar-inverse-link-active-bg; - color: @navbar-inverse-link-active-color; + > .open > a { + &, + &:hover, + &:focus { + background-color: @navbar-inverse-link-active-bg; + color: @navbar-inverse-link-active-color; + } } > .dropdown > a:hover .caret { border-top-color: @navbar-inverse-link-hover-color; @@ -265,13 +276,16 @@ border-top-color: @navbar-inverse-link-color; border-bottom-color: @navbar-inverse-link-color; } - > .open > a .caret, - > .open > a:hover .caret, - > .open > a:focus .caret { - border-top-color: @navbar-inverse-link-active-color; - border-bottom-color: @navbar-inverse-link-active-color; + > .open > a { + &, + &:hover, + &:focus { + .caret { + border-top-color: @navbar-inverse-link-active-color; + border-bottom-color: @navbar-inverse-link-active-color; + } + } } - } } -- cgit v1.2.3 From 6bda16f6beb9db168d52b5e1f291328d8fd5d7c9 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 7 Jul 2013 14:52:00 -0700 Subject: use nesting more in pagination.less --- less/pagination.less | 90 +++++++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 40 deletions(-) (limited to 'less') diff --git a/less/pagination.less b/less/pagination.less index 48201b2ef..45c53ebce 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -10,7 +10,7 @@ > li { display: inline; // Remove list-style and block-level defaults > a, - > span,{ + > span { float: left; // Collapse white-space padding: 4px 12px; line-height: @line-height-base; @@ -19,6 +19,19 @@ border: 1px solid @pagination-border; border-left-width: 0; } + &:first-child { + > a, + > span { + border-left-width: 1px; + .border-left-radius(@border-radius-base); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-base); + } + } } > li > a:hover, @@ -43,21 +56,6 @@ cursor: default; } } - - > li:first-child { - > a, - > span { - border-left-width: 1px; - .border-left-radius(@border-radius-base); - } - } - - > li:last-child { - > a, - > span { - .border-right-radius(@border-radius-base); - } - } } // Sizing @@ -65,34 +63,46 @@ // Large .pagination-large { - > li > a, - > li > span { - padding: @padding-large-vertical @padding-large-horizontal; - font-size: @font-size-large; - } - > li:first-child > a, - > li:first-child > span { - .border-left-radius(@border-radius-large); - } - > li:last-child > a, - > li:last-child > span { - .border-right-radius(@border-radius-large); + > li { + > a, + > span { + padding: @padding-large-vertical @padding-large-horizontal; + font-size: @font-size-large; + } + &:first-child { + > a, + > span { + .border-left-radius(@border-radius-large); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-large); + } + } } } // Small .pagination-small { - > li > a, - > li > span { - padding: @padding-small-vertical @padding-small-horizontal; - font-size: @font-size-small; - } - > li:first-child > a, - > li:first-child > span { - .border-left-radius(@border-radius-small); - } - > li:last-child > a, - > li:last-child > span { - .border-right-radius(@border-radius-small); + > li { + > a, + > span { + padding: @padding-small-vertical @padding-small-horizontal; + font-size: @font-size-small; + } + &:first-child { + > a, + > span { + .border-left-radius(@border-radius-small); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-small); + } + } } } -- cgit v1.2.3 From dcf1b60f2bb9f0aab63f09c1af533cfcedfbc8d2 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 22:02:58 -0700 Subject: refactor {badges,jumbotron,media,popover,print}.less (mostly nesting) --- less/badges.less | 8 +++----- less/jumbotron.less | 5 +---- less/media.less | 12 +++++++----- less/popovers.less | 18 ++++++++++-------- less/print.less | 18 +++++++++++------- 5 files changed, 32 insertions(+), 29 deletions(-) (limited to 'less') diff --git a/less/badges.less b/less/badges.less index 665aed921..e1a2e9c5a 100644 --- a/less/badges.less +++ b/less/badges.less @@ -35,11 +35,9 @@ a.badge { } // Quick fix for labels/badges in buttons -.btn { - .badge { - position: relative; - top: -1px; - } +.btn .badge { + position: relative; + top: -1px; } // Account for counters in navs diff --git a/less/jumbotron.less b/less/jumbotron.less index 39bec9be6..ca51b481a 100644 --- a/less/jumbotron.less +++ b/less/jumbotron.less @@ -18,13 +18,10 @@ p { line-height: 1.4; } -} -@media screen and (min-width: @screen-tablet) { - .jumbotron { + @media screen and (min-width: @screen-tablet) { padding: 50px 60px; border-radius: @border-radius-large; // Only round corners at higher resolutions - h1 { font-size: (@font-size-base * 4.5); } diff --git a/less/media.less b/less/media.less index bcba8081c..5ad22cd6d 100644 --- a/less/media.less +++ b/less/media.less @@ -36,11 +36,13 @@ // Media image alignment // ------------------------- -.media > .pull-left { - margin-right: 10px; -} -.media > .pull-right { - margin-left: 10px; +.media { + > .pull-left { + margin-right: 10px; + } + > .pull-right { + margin-left: 10px; + } } diff --git a/less/popovers.less b/less/popovers.less index 2c79da9a0..33488e885 100644 --- a/less/popovers.less +++ b/less/popovers.less @@ -50,14 +50,16 @@ // // .arrow is outer, .arrow:after is inner -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; +.popover .arrow { + &, + &:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + } } .popover .arrow { border-width: @popover-arrow-outer-width; diff --git a/less/print.less b/less/print.less index 64c1ff9fa..7fe459a2e 100644 --- a/less/print.less +++ b/less/print.less @@ -71,13 +71,17 @@ .navbar { display: none; } - .table td, - .table th { - background-color: #fff !important; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; + .table { + td, + th { + background-color: #fff !important; + } + } + .btn, + .dropup > .btn { + > .caret { + border-top-color: #000 !important; + } } .label { border: 1px solid #000; -- cgit v1.2.3 From 7e154740f3c9a06cfdd406672ba0ba143cd50b4d Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 22:27:56 -0700 Subject: use LESS nesting more in dropdowns.less --- less/dropdowns.less | 54 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 23 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 0a412f9c3..8ae9dbba1 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -62,40 +62,48 @@ // Hover/Focus state // ----------- -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - text-decoration: none; - color: @dropdown-link-hover-color; - #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); +.dropdown-menu > li > a { + &:hover, + &:focus { + text-decoration: none; + color: @dropdown-link-hover-color; + #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); + } } // Active state // ------------ -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: @dropdown-link-active-color; - text-decoration: none; - outline: 0; - #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); +.dropdown-menu > .active > a { + &, + &:hover, + &:focus { + color: @dropdown-link-active-color; + text-decoration: none; + outline: 0; + #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); + } } // Disabled state // -------------- // Gray out text and ensure the hover/focus state remains gray -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: @gray-light; +.dropdown-menu > .disabled > a { + &, + &:hover, + &:focus { + color: @gray-light; + } } // Nuke hover/focus effects -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - background-color: transparent; - background-image: none; // Remove CSS gradient - .reset-filter(); - cursor: default; +.dropdown-menu > .disabled > a { + &:hover, + &:focus { + text-decoration: none; + background-color: transparent; + background-image: none; // Remove CSS gradient + .reset-filter(); + cursor: default; + } } // Open state for the dropdown -- cgit v1.2.3 From e40aee9c9e3e80b03ebe00e812262da09c43bc11 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 6 Jul 2013 22:24:03 -0700 Subject: code.less: cleanup styles that get immediately overriden later in the file --- less/code.less | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/code.less b/less/code.less index 63c255010..8dd34670a 100644 --- a/less/code.less +++ b/less/code.less @@ -6,11 +6,7 @@ // Inline and block code styles code, pre { - padding: 0 3px 2px; font-family: @font-family-monospace; - font-size: (@font-size-base - 2); - color: @gray-dark; - border-radius: 4px; } // Inline code @@ -20,6 +16,7 @@ code { color: #c7254e; background-color: #f9f2f4; white-space: nowrap; + border-radius: 4px; } // Blocks of code @@ -31,6 +28,7 @@ pre { line-height: @line-height-base; word-break: break-all; word-wrap: break-word; + color: @gray-dark; background-color: #f5f5f5; border: 1px solid #ccc; // IE8 fallback border: 1px solid rgba(0,0,0,.15); -- cgit v1.2.3 From 0d5c3c2ecf35d9bcbe4bd1ad67f3144f5341eb20 Mon Sep 17 00:00:00 2001 From: liuyl Date: Tue, 9 Jul 2013 09:22:36 +0800 Subject: simplify type.less --- less/type.less | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index 2f1f42ee3..a9a7e189f 100644 --- a/less/type.less +++ b/less/type.less @@ -107,12 +107,10 @@ ul, ol { margin-top: 0; margin-bottom: (@line-height-computed / 2); -} -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; + ul, + ol{ + margin-bottom: 0; + } } // List options -- cgit v1.2.3 From a41fd16da27da748b76a88a5ac032128cd245df0 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 11 Jul 2013 12:07:35 -0700 Subject: rename .retina-image => .img-retina --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 6d39d2aae..e5643721d 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -331,7 +331,7 @@ // -------------------------------------------------- // Short retina mixin for setting background-image and -size -.retina-image(@file-1x, @file-2x, @width-1x, @height-1x) { +.img-retina(@file-1x, @file-2x, @width-1x, @height-1x) { background-image: url("@{file-1x}"); @media -- cgit v1.2.3 From 3a17578a94427b51841676a75128ba7dc204f1d2 Mon Sep 17 00:00:00 2001 From: Bass Jobsen Date: Thu, 11 Jul 2013 21:24:06 +0200 Subject: Update forms.less All variables should be set in variables.less? --- 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 2389036da..add42ee9f 100644 --- a/less/forms.less +++ b/less/forms.less @@ -437,7 +437,7 @@ input[type="color"] { } // Only right align form labels here when the columns stop stacking -@media (min-width: 768px) { +@media (min-width: @screen-tablet) { .form-horizontal .control-label { text-align: right; } -- cgit v1.2.3 From 76063ea73967928ce648b54fb4088856d9bb32c8 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 16 Jul 2013 10:49:59 -0700 Subject: Add missing backtick in comment --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index e5643721d..440dcd074 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -165,7 +165,7 @@ // Backface visibility // Prevent browsers from flickering when using CSS 3D transforms. -// Default value is `visible`, but can be changed to `hidden +// Default value is `visible`, but can be changed to `hidden` // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples .backface-visibility(@visibility){ -webkit-backface-visibility: @visibility; -- cgit v1.2.3 From 522004e67ae72d48ae6a2aadc304cfdb2af4e92e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 16 Jul 2013 11:26:48 -0700 Subject: remove webkit-overflow-scrolling from modal for now /cc #8495 --- less/modals.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 144588a7b..d79121097 100644 --- a/less/modals.less +++ b/less/modals.less @@ -23,7 +23,6 @@ bottom: 0; left: 0; z-index: @zindex-modal-background; - -webkit-overflow-scrolling: touch; // When fading in the modal, animate it to slide down &.fade { -- cgit v1.2.3 From 5967ef64a3b91b76b6e1ac6e7e61c8306a954f4a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 16 Jul 2013 11:49:04 -0700 Subject: remove margin from left side of navs since it's no longer being set --- less/navs.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less') diff --git a/less/navs.less b/less/navs.less index 1b1e18ed0..87780a156 100644 --- a/less/navs.less +++ b/less/navs.less @@ -7,7 +7,6 @@ // -------------------------------------------------- .nav { - margin-left: 0; margin-bottom: 0; padding-left: 0; // Override default ul/ol list-style: none; -- cgit v1.2.3