Commit f6367bc0 authored by Mark Otto's avatar Mark Otto

Implement the new border-radius guard: only round things if global @enable-rounded == true

parent 86099bfb
...@@ -444,6 +444,9 @@ module.exports = function (grunt) { ...@@ -444,6 +444,9 @@ module.exports = function (grunt) {
// Full distribution task. // Full distribution task.
grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']); grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']);
// Custom docs rebuild task.
grunt.registerTask('build', ['clean', 'less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'autoprefixer:docs', 'usebanner', 'csscomb:dist', 'cssmin:core', 'cssmin:docs', 'concat', 'uglify:bootstrap', 'dist-docs']);
// Default task. // Default task.
grunt.registerTask('default', ['test', 'dist']); grunt.registerTask('default', ['test', 'dist']);
......
This diff was suppressed by a .gitattributes entry.
...@@ -734,6 +734,7 @@ pre { ...@@ -734,6 +734,7 @@ pre {
line-height: 1.5; line-height: 1.5;
color: #373a3c; color: #373a3c;
background-color: #f7f7f9; background-color: #f7f7f9;
border-radius: .2rem;
} }
pre code { pre code {
padding: 0; padding: 0;
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
...@@ -734,6 +734,7 @@ pre { ...@@ -734,6 +734,7 @@ pre {
line-height: 1.5; line-height: 1.5;
color: #373a3c; color: #373a3c;
background-color: #f7f7f9; background-color: #f7f7f9;
border-radius: .2rem;
} }
pre code { pre code {
padding: 0; padding: 0;
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
padding: @alert-padding; padding: @alert-padding;
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
border: 1px solid transparent; border: 1px solid transparent;
border-radius: @alert-border-radius; .border-radius(@alert-border-radius);
// Headings for larger alerts // Headings for larger alerts
h4 { h4 {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
white-space: nowrap; white-space: nowrap;
text-align: center; text-align: center;
background-color: @badge-bg; background-color: @badge-bg;
border-radius: @badge-border-radius; .border-radius(@badge-border-radius);
// Empty badges collapse automatically (not available in IE8) // Empty badges collapse automatically (not available in IE8)
&:empty { &:empty {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
list-style: none; list-style: none;
background-color: @breadcrumb-bg; background-color: @breadcrumb-bg;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
> li { > li {
display: inline-block; display: inline-block;
......
...@@ -46,6 +46,7 @@ pre { ...@@ -46,6 +46,7 @@ pre {
line-height: @line-height-base; line-height: @line-height-base;
color: @pre-color; color: @pre-color;
background-color: @pre-bg; background-color: @pre-bg;
.border-radius(@border-radius-base);
// Account for some code outputs that place code tags in pre tags // Account for some code outputs that place code tags in pre tags
code { code {
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
background-color: @dropdown-bg; background-color: @dropdown-bg;
border: 1px solid @dropdown-fallback-border; // IE8 fallback border: 1px solid @dropdown-fallback-border; // IE8 fallback
border: 1px solid @dropdown-border; border: 1px solid @dropdown-border;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
box-shadow: 0 6px 12px rgba(0,0,0,.175); box-shadow: 0 6px 12px rgba(0,0,0,.175);
background-clip: padding-box; background-clip: padding-box;
......
...@@ -123,7 +123,7 @@ output { ...@@ -123,7 +123,7 @@ output {
background-color: @input-bg; background-color: @input-bg;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid @input-border; border: 1px solid @input-border;
border-radius: @input-border-radius; .border-radius(@input-border-radius);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075); box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
......
...@@ -79,18 +79,18 @@ ...@@ -79,18 +79,18 @@
text-align: center; text-align: center;
background-color: @input-group-addon-bg; background-color: @input-group-addon-bg;
border: 1px solid @input-group-addon-border-color; border: 1px solid @input-group-addon-border-color;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
// Sizing // Sizing
&.input-sm { &.input-sm {
padding: @padding-small-vertical @padding-small-horizontal; padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small; font-size: @font-size-small;
border-radius: @border-radius-small; .border-radius(@border-radius-small);
} }
&.input-lg { &.input-lg {
padding: @padding-large-vertical @padding-large-horizontal; padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large; font-size: @font-size-large;
border-radius: @border-radius-large; .border-radius(@border-radius-large);
} }
// Nuke default margins from checkboxes and radios to vertically center within. // Nuke default margins from checkboxes and radios to vertically center within.
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
} }
.container & { .container & {
border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container .border-radius(@border-radius-large); // Only round corners at higher resolutions if contained in a container
} }
.container { .container {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
border-radius: .25em; .border-radius();
// Add hover effects, but only for links // Add hover effects, but only for links
a& { a& {
......
// Mixins // Mixins
// -------------------------------------------------- // --------------------------------------------------
.border-radius(@radius: .25em) when (@enable-rounded = true) {
border-radius: @radius;
}
.box-shadow(@shadow: 0 .1rem .2rem rgba(0,0,0,.1)) when (@enable-shadows = true) {
box-shadow: @shadow;
}
// Utilities // Utilities
@import "mixins/hide-text.less"; @import "mixins/hide-text.less";
@import "mixins/opacity.less"; @import "mixins/opacity.less";
......
...@@ -48,5 +48,5 @@ ...@@ -48,5 +48,5 @@
padding: @padding-vertical @padding-horizontal; padding: @padding-vertical @padding-horizontal;
font-size: @font-size; font-size: @font-size;
line-height: @line-height; line-height: @line-height;
border-radius: @border-radius; .border-radius(@border-radius);
} }
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
padding: @padding-vertical @padding-horizontal; padding: @padding-vertical @padding-horizontal;
font-size: @font-size; font-size: @font-size;
line-height: @line-height; line-height: @line-height;
border-radius: @border-radius; .border-radius(@border-radius);
select& { select& {
height: @input-height; height: @input-height;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
background-color: @modal-content-bg; background-color: @modal-content-bg;
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc) border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
border: 1px solid @modal-content-border-color; border: 1px solid @modal-content-border-color;
border-radius: @border-radius-large; .border-radius(@border-radius-large);
box-shadow: 0 3px 9px rgba(0,0,0,.5); box-shadow: 0 3px 9px rgba(0,0,0,.5);
background-clip: padding-box; background-clip: padding-box;
// Remove focus outline from opened modal // Remove focus outline from opened modal
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
&:extend(.clearfix all); &:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) { @media (min-width: @grid-float-breakpoint) {
border-radius: @navbar-border-radius; .border-radius(@navbar-border-radius);
} }
} }
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
background-color: transparent; background-color: transparent;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent; border: 1px solid transparent;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
// We remove the `outline` here, but later compensate by attaching `:hover` // We remove the `outline` here, but later compensate by attaching `:hover`
// styles to `:focus`. // styles to `:focus`.
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
display: block; display: block;
width: 22px; width: 22px;
height: 2px; height: 2px;
border-radius: 1px; .border-radius(1px);
} }
.icon-bar + .icon-bar { .icon-bar + .icon-bar {
margin-top: 4px; margin-top: 4px;
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
margin-right: 2px; margin-right: 2px;
line-height: @line-height-base; line-height: @line-height-base;
border: 1px solid transparent; border: 1px solid transparent;
border-radius: @border-radius-base @border-radius-base 0 0; .border-radius(@border-radius-base @border-radius-base 0 0);
&:hover { &:hover {
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color; border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
} }
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
// Links rendered as pills // Links rendered as pills
> a { > a {
border-radius: @nav-pills-border-radius; .border-radius(@nav-pills-border-radius);
} }
+ li { + li {
margin-left: 2px; margin-left: 2px;
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
> li > a { > li > a {
// Override margin from .nav-tabs // Override margin from .nav-tabs
margin-right: 0; margin-right: 0;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
} }
> .active > a, > .active > a,
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
> li > a { > li > a {
border-bottom: 1px solid @nav-tabs-justified-link-border-color; border-bottom: 1px solid @nav-tabs-justified-link-border-color;
border-radius: @border-radius-base @border-radius-base 0 0; .border-radius(@border-radius-base @border-radius-base 0 0);
} }
> .active > a, > .active > a,
> .active > a:hover, > .active > a:hover,
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
height: @line-height-computed; height: @line-height-computed;
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
background-color: @progress-bg; background-color: @progress-bg;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
box-shadow: inset 0 1px 2px rgba(0,0,0,.1); box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
} }
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
.navbar-default { .navbar-default {
#gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg); #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);
.reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
border-radius: @navbar-border-radius; .border-radius(@navbar-border-radius);
box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
.navbar-nav > .active > a { .navbar-nav > .active > a {
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
.navbar-static-top, .navbar-static-top,
.navbar-fixed-top, .navbar-fixed-top,
.navbar-fixed-bottom { .navbar-fixed-bottom {
border-radius: 0; .border-radius(0);
} }
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
// -------------------------------------------------- // --------------------------------------------------
.list-group { .list-group {
border-radius: @border-radius-base; .border-radius(@border-radius-base);
box-shadow: 0 1px 2px rgba(0,0,0,.075); box-shadow: 0 1px 2px rgba(0,0,0,.075);
} }
.list-group-item.active, .list-group-item.active,
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
background-color: @tooltip-bg; background-color: @tooltip-bg;
border-radius: @border-radius-base; .border-radius(@border-radius-base);
} }
// Arrows // Arrows
......
...@@ -36,6 +36,15 @@ ...@@ -36,6 +36,15 @@
@link-hover-color: darken(@link-color, 15%); @link-hover-color: darken(@link-color, 15%);
//== Global settings
//
//## Quickly modify global styling by enabling or disabling features.
@enable-rounded: true;
@enable-shadows: true;
@enable-gradients: true;
//== Typography //== Typography
// //
//## Font, line-height, and color for body text, headings, and more. //## Font, line-height, and color for body text, headings, and more.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment