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) {
// Full distribution task.
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.
grunt.registerTask('default', ['test', 'dist']);
......
This diff was suppressed by a .gitattributes entry.
......@@ -734,6 +734,7 @@ pre {
line-height: 1.5;
color: #373a3c;
background-color: #f7f7f9;
border-radius: .2rem;
}
pre code {
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 {
line-height: 1.5;
color: #373a3c;
background-color: #f7f7f9;
border-radius: .2rem;
}
pre code {
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 @@
padding: @alert-padding;
margin-bottom: @line-height-computed;
border: 1px solid transparent;
border-radius: @alert-border-radius;
.border-radius(@alert-border-radius);
// Headings for larger alerts
h4 {
......
......@@ -16,7 +16,7 @@
white-space: nowrap;
text-align: center;
background-color: @badge-bg;
border-radius: @badge-border-radius;
.border-radius(@badge-border-radius);
// Empty badges collapse automatically (not available in IE8)
&:empty {
......
......@@ -8,7 +8,7 @@
margin-bottom: @line-height-computed;
list-style: none;
background-color: @breadcrumb-bg;
border-radius: @border-radius-base;
.border-radius(@border-radius-base);
> li {
display: inline-block;
......
......@@ -46,6 +46,7 @@ pre {
line-height: @line-height-base;
color: @pre-color;
background-color: @pre-bg;
.border-radius(@border-radius-base);
// Account for some code outputs that place code tags in pre tags
code {
......
......@@ -44,7 +44,7 @@
background-color: @dropdown-bg;
border: 1px solid @dropdown-fallback-border; // IE8 fallback
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);
background-clip: padding-box;
......
......@@ -123,7 +123,7 @@ output {
background-color: @input-bg;
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-radius: @input-border-radius;
.border-radius(@input-border-radius);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
......
......@@ -79,18 +79,18 @@
text-align: center;
background-color: @input-group-addon-bg;
border: 1px solid @input-group-addon-border-color;
border-radius: @border-radius-base;
.border-radius(@border-radius-base);
// Sizing
&.input-sm {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
.border-radius(@border-radius-small);
}
&.input-lg {
padding: @padding-large-vertical @padding-large-horizontal;
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.
......
......@@ -24,7 +24,7 @@
}
.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 {
......
......@@ -12,7 +12,7 @@
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
.border-radius();
// Add hover effects, but only for links
a& {
......
// 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
@import "mixins/hide-text.less";
@import "mixins/opacity.less";
......
......@@ -48,5 +48,5 @@
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
.border-radius(@border-radius);
}
......@@ -70,7 +70,7 @@
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
.border-radius(@border-radius);
select& {
height: @input-height;
......
......@@ -53,7 +53,7 @@
background-color: @modal-content-bg;
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
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);
background-clip: padding-box;
// Remove focus outline from opened modal
......
......@@ -18,7 +18,7 @@
&:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
border-radius: @navbar-border-radius;
.border-radius(@navbar-border-radius);
}
}
......@@ -200,7 +200,7 @@
background-color: transparent;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
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`
// styles to `:focus`.
......@@ -213,7 +213,7 @@
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
.border-radius(1px);
}
.icon-bar + .icon-bar {
margin-top: 4px;
......
......@@ -85,7 +85,7 @@
margin-right: 2px;
line-height: @line-height-base;
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 {
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
}
......@@ -120,7 +120,7 @@
// Links rendered as pills
> a {
border-radius: @nav-pills-border-radius;
.border-radius(@nav-pills-border-radius);
}
+ li {
margin-left: 2px;
......@@ -193,7 +193,7 @@
> li > a {
// Override margin from .nav-tabs
margin-right: 0;
border-radius: @border-radius-base;
.border-radius(@border-radius-base);
}
> .active > a,
......@@ -205,7 +205,7 @@
@media (min-width: @screen-sm-min) {
> li > a {
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:hover,
......
......@@ -29,7 +29,7 @@
height: @line-height-computed;
margin-bottom: @line-height-computed;
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);
}
......
......@@ -111,7 +111,7 @@
.navbar-default {
#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
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);
.navbar-nav > .active > a {
......@@ -144,7 +144,7 @@
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
.border-radius(0);
}
......@@ -206,7 +206,7 @@
// --------------------------------------------------
.list-group {
border-radius: @border-radius-base;
.border-radius(@border-radius-base);
box-shadow: 0 1px 2px rgba(0,0,0,.075);
}
.list-group-item.active,
......
......@@ -28,7 +28,7 @@
text-align: center;
text-decoration: none;
background-color: @tooltip-bg;
border-radius: @border-radius-base;
.border-radius(@border-radius-base);
}
// Arrows
......
......@@ -36,6 +36,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
//
//## 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