aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-18 20:15:45 -0700
committerMark Otto <[email protected]>2013-08-18 20:15:45 -0700
commita9378a92670f4bf5ccb753191af795c45bb64998 (patch)
tree9690c9a1c123c3103a1f345015f93aac8b43e983 /less
parentcf09e6a6b5e314f4f7433f21bd32287885c95451 (diff)
parentf584500211af84038bcff9b363343eb02cda6ccd (diff)
downloadbootstrap-a9378a92670f4bf5ccb753191af795c45bb64998.tar.xz
bootstrap-a9378a92670f4bf5ccb753191af795c45bb64998.zip
Merge branch '3.0.0-wip' into bs3_homepage
Conflicts: customize.html dist/css/bootstrap.min.css
Diffstat (limited to 'less')
-rw-r--r--less/alerts.less18
-rw-r--r--less/mixins.less2
-rw-r--r--less/panels.less14
-rw-r--r--less/scaffolding.less27
-rw-r--r--less/theme.less4
-rw-r--r--less/thumbnails.less29
-rw-r--r--less/variables.less23
7 files changed, 58 insertions, 59 deletions
diff --git a/less/alerts.less b/less/alerts.less
index 3ba463dba..be09d18d0 100644
--- a/less/alerts.less
+++ b/less/alerts.less
@@ -9,9 +9,7 @@
.alert {
padding: @alert-padding;
margin-bottom: @line-height-computed;
- color: @alert-text;
- background-color: @alert-bg;
- border: 1px solid @alert-border;
+ border: 1px solid transparent;
border-radius: @alert-border-radius;
// Headings for larger alerts
@@ -20,14 +18,9 @@
// Specified for the h4 to prevent conflicts of changing @headingsColor
color: inherit;
}
- // Match the hr to the border of the alert
- hr {
- border-top-color: darken(@alert-border, 5%);
- }
// Provide class for links that match alerts
.alert-link {
font-weight: @alert-link-font-weight;
- color: darken(@alert-text, 10%);
}
// Improve alignment and spacing of inner content
@@ -63,9 +56,12 @@
.alert-success {
.alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
}
-.alert-danger {
- .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
-}
.alert-info {
.alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
}
+.alert-warning {
+ .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
+}
+.alert-danger {
+ .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
+}
diff --git a/less/mixins.less b/less/mixins.less
index 633d02455..3f230205b 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -340,7 +340,7 @@
// Panels
// -------------------------
-.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
+.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border;) {
border-color: @border;
& > .panel-heading {
color: @heading-text-color;
diff --git a/less/panels.less b/less/panels.less
index e39fa3adf..0f454fea0 100644
--- a/less/panels.less
+++ b/less/panels.less
@@ -7,7 +7,7 @@
.panel {
margin-bottom: @line-height-computed;
background-color: @panel-bg;
- border: 1px solid @panel-border;
+ border: 1px solid transparent;
border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05));
}
@@ -71,8 +71,7 @@
// Optional heading
.panel-heading {
padding: 10px 15px;
- background-color: @panel-heading-bg;
- border-bottom: 1px solid @panel-border;
+ border-bottom: 1px solid transparent;
.border-top-radius(@panel-border-radius - 1);
}
@@ -90,7 +89,7 @@
.panel-footer {
padding: 10px 15px;
background-color: @panel-footer-bg;
- border-top: 1px solid @panel-border;
+ border-top: 1px solid @panel-inner-border;
.border-bottom-radius(@panel-border-radius - 1);
}
@@ -114,13 +113,13 @@
.panel-heading {
border-bottom: 0;
+ .panel-collapse .panel-body {
- border-top: 1px solid @panel-border;
+ border-top: 1px solid @panel-inner-border;
}
}
.panel-footer {
border-top: 0;
+ .panel-collapse .panel-body {
- border-bottom: 1px solid @panel-border;
+ border-bottom: 1px solid @panel-inner-border;
}
}
@@ -132,6 +131,9 @@
// Contextual variations
+.panel-default {
+ .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);
+}
.panel-primary {
.panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
}
diff --git a/less/scaffolding.less b/less/scaffolding.less
index 7f6d3bf3a..53e1be5ac 100644
--- a/less/scaffolding.less
+++ b/less/scaffolding.less
@@ -4,7 +4,6 @@
// Reset the box-sizing
-// -------------------------
*,
*:before,
@@ -14,7 +13,6 @@
// Body reset
-// -------------------------
html {
font-size: 62.5%;
@@ -39,7 +37,10 @@ textarea {
line-height: inherit;
}
-// Reset unusual Firefox-on-Android default style, see https://github.com/necolas/normalize.css/issues/214
+// Reset unusual Firefox-on-Android default style.
+//
+// See https://github.com/necolas/normalize.css/issues/214
+
button,
input,
select[multiple],
@@ -49,7 +50,6 @@ textarea {
// Links
-// -------------------------
a {
color: @link-color;
@@ -68,7 +68,6 @@ a {
// Images
-// -------------------------
img {
vertical-align: middle;
@@ -85,7 +84,19 @@ img {
}
// Image thumbnails
-// See thumbnails.less for `.img-thumbnail`
+//
+// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
+.img-thumbnail {
+ padding: @thumbnail-padding;
+ line-height: @line-height-base;
+ background-color: @thumbnail-bg;
+ border: 1px solid @thumbnail-border;
+ border-radius: @thumbnail-border-radius;
+ .transition(all .2s ease-in-out);
+
+ // Keep them at most 100% wide
+ .img-responsive(inline-block);
+}
// Perfect circle
.img-circle {
@@ -94,7 +105,6 @@ img {
// Horizontal rules
-// -------------------------
hr {
margin-top: @line-height-computed;
@@ -103,9 +113,10 @@ hr {
border-top: 1px solid @hr-border;
}
+
// Only display content to screen readers
+//
// See: http://a11yproject.com/posts/how-to-hide-content/
-// -------------------------
.sr-only {
position: absolute;
diff --git a/less/theme.less b/less/theme.less
index d2f98f2fb..92469c429 100644
--- a/less/theme.less
+++ b/less/theme.less
@@ -148,9 +148,9 @@
}
// Apply the mixin to the alerts
-.alert { .alert-styles(@alert-bg); }
.alert-success { .alert-styles(@alert-success-bg); }
.alert-info { .alert-styles(@alert-info-bg); }
+.alert-warning { .alert-styles(@alert-warning-bg); }
.alert-danger { .alert-styles(@alert-danger-bg); }
@@ -211,7 +211,7 @@
}
// Apply the mixin to the panel headings only
-.panel-heading { .panel-heading-styles(@panel-heading-bg); }
+.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }
.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }
.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }
.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }
diff --git a/less/thumbnails.less b/less/thumbnails.less
index 76f79b9e5..1adee9e35 100644
--- a/less/thumbnails.less
+++ b/less/thumbnails.less
@@ -3,30 +3,17 @@
// --------------------------------------------------
-// Base classes
-// For thumbnail block-level composite components and simple image styles
-
-// The actual thumbnailed element
-// Can be `a`, `div`, or `img`
-.thumbnail,
-.img-thumbnail {
- padding: @thumbnail-padding;
- line-height: @line-height-base;
- background-color: @thumbnail-bg;
- border: 1px solid @thumbnail-border;
- border-radius: @thumbnail-border-radius;
- .transition(all .2s ease-in-out);
-}
+// Mixin and adjust the regular image class
.thumbnail {
- display: block;
-}
-.thumbnail > img {
- .img-responsive();
-}
-.img-thumbnail {
- .img-responsive(inline-block);
+ .img-thumbnail();
+ display: block; // Override the inline-block from `.img-thumbnail`
+
+ > img {
+ .img-responsive();
+ }
}
+
// Add a hover state for linked versions only
a.thumbnail:hover,
a.thumbnail:focus {
diff --git a/less/variables.less b/less/variables.less
index 53aad251b..eadd78fb8 100644
--- a/less/variables.less
+++ b/less/variables.less
@@ -439,22 +439,22 @@
@alert-border-radius: @border-radius-base;
@alert-link-font-weight: bold;
-@alert-bg: @state-warning-bg;
-@alert-text: @state-warning-text;
-@alert-border: @state-warning-border;
-
@alert-success-bg: @state-success-bg;
@alert-success-text: @state-success-text;
@alert-success-border: @state-success-border;
-@alert-danger-bg: @state-danger-bg;
-@alert-danger-text: @state-danger-text;
-@alert-danger-border: @state-danger-border;
-
@alert-info-bg: @state-info-bg;
@alert-info-text: @state-info-text;
@alert-info-border: @state-info-border;
+@alert-warning-bg: @state-warning-bg;
+@alert-warning-text: @state-warning-text;
+@alert-warning-border: @state-warning-border;
+
+@alert-danger-bg: @state-danger-bg;
+@alert-danger-text: @state-danger-text;
+@alert-danger-border: @state-danger-border;
+
// Progress bars
// -------------------------
@@ -486,11 +486,14 @@
// Panels
// -------------------------
@panel-bg: #fff;
-@panel-border: #ddd;
+@panel-inner-border: #ddd;
@panel-border-radius: @border-radius-base;
-@panel-heading-bg: #f5f5f5;
@panel-footer-bg: #f5f5f5;
+@panel-default-text: @gray-dark;
+@panel-default-border: #ddd;
+@panel-default-heading-bg: #f5f5f5;
+
@panel-primary-text: #fff;
@panel-primary-border: @brand-primary;
@panel-primary-heading-bg: @brand-primary;