mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-03 15:24:19 +01:00
d6b0f45fb7
Conflicts: Gruntfile.js dist/css/bootstrap-theme.css dist/css/bootstrap-theme.css.map dist/css/bootstrap-theme.min.css dist/css/bootstrap.css dist/css/bootstrap.css.map dist/css/bootstrap.min.css docs/_includes/components/dropdowns.html docs/_includes/components/media.html docs/_includes/components/navs.html docs/_includes/components/progress-bars.html docs/_includes/components/responsive-embed.html docs/_includes/css/buttons.html docs/_includes/css/forms.html docs/_includes/css/less.html docs/_includes/css/overview.html docs/_includes/css/responsive-utilities.html docs/_includes/customizer-variables.html docs/_includes/getting-started/browser-device-support.html docs/_includes/getting-started/grunt.html docs/_includes/getting-started/template.html docs/_includes/header.html docs/_includes/js/alerts.html docs/_includes/js/buttons.html docs/_includes/js/carousel.html docs/_includes/js/collapse.html docs/_includes/js/dropdowns.html docs/_includes/js/modal.html docs/_includes/js/popovers.html docs/_includes/js/scrollspy.html docs/_includes/js/tabs.html docs/_includes/js/tooltips.html docs/_includes/nav/components.html docs/_includes/nav/getting-started.html docs/_layouts/default.html docs/about.html docs/assets/css/docs.min.css docs/assets/css/src/docs.css docs/assets/js/customize.min.js docs/assets/js/docs.min.js docs/assets/js/raw-files.min.js docs/browser-bugs.html docs/components.html docs/components/navbar.md docs/css.html docs/dist/css/bootstrap-theme.css docs/dist/css/bootstrap-theme.css.map docs/dist/css/bootstrap-theme.min.css docs/dist/css/bootstrap.css docs/dist/css/bootstrap.css.map docs/dist/css/bootstrap.min.css docs/examples/blog/index.html docs/examples/carousel/index.html docs/examples/cover/index.html docs/examples/dashboard/index.html docs/examples/grid/index.html docs/examples/jumbotron-narrow/index.html docs/examples/jumbotron/index.html docs/examples/justified-nav/index.html docs/examples/navbar-fixed-top/index.html docs/examples/navbar-static-top/index.html docs/examples/navbar/index.html docs/examples/non-responsive/index.html docs/examples/offcanvas/index.html docs/examples/signin/index.html docs/examples/starter-template/index.html docs/examples/sticky-footer-navbar/index.html docs/examples/sticky-footer/index.html docs/examples/theme/index.html docs/examples/tooltip-viewport/index.html docs/getting-started.html docs/javascript.html docs/migration.html less/_animation.less less/_modal.less less/_navbar.less less/_variables.less less/glyphicons.less less/navs.less less/panels.less less/progress-bars.less
226 lines
6.0 KiB
Plaintext
226 lines
6.0 KiB
Plaintext
|
|
//
|
|
// Load core variables and mixins
|
|
// --------------------------------------------------
|
|
|
|
@import "variables.less";
|
|
@import "mixins.less";
|
|
|
|
|
|
|
|
//
|
|
// Buttons
|
|
// --------------------------------------------------
|
|
|
|
// Common styles
|
|
.btn-default,
|
|
.btn-primary,
|
|
.btn-success,
|
|
.btn-warning,
|
|
.btn-danger {
|
|
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
|
|
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
|
|
.box-shadow(@shadow);
|
|
|
|
// Reset the shadow
|
|
&:active,
|
|
&.active {
|
|
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
|
}
|
|
|
|
.badge {
|
|
text-shadow: none;
|
|
}
|
|
}
|
|
|
|
// Mixin for generating new styles
|
|
.btn-styles(@btn-color: #555) {
|
|
#gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));
|
|
.reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners
|
|
background-repeat: repeat-x;
|
|
border-color: darken(@btn-color, 14%);
|
|
|
|
&:hover,
|
|
&:focus {
|
|
background-color: darken(@btn-color, 12%);
|
|
background-position: 0 -15px;
|
|
}
|
|
|
|
&:active,
|
|
&.active {
|
|
background-color: darken(@btn-color, 12%);
|
|
border-color: darken(@btn-color, 14%);
|
|
}
|
|
|
|
&:disabled,
|
|
&[disabled] {
|
|
background-color: darken(@btn-color, 12%);
|
|
background-image: none;
|
|
}
|
|
}
|
|
|
|
// Common styles
|
|
.btn {
|
|
// Remove the gradient for the pressed/active state
|
|
&:active,
|
|
&.active {
|
|
background-image: none;
|
|
}
|
|
}
|
|
|
|
// Apply the mixin to the buttons
|
|
.btn-primary { .btn-styles(@btn-primary-bg); }
|
|
.btn-secondary { .btn-styles(@btn-secondary-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
|
|
.btn-info { .btn-styles(@btn-info-bg); }
|
|
.btn-success { .btn-styles(@btn-success-bg); }
|
|
.btn-warning { .btn-styles(@btn-warning-bg); }
|
|
.btn-danger { .btn-styles(@btn-danger-bg); }
|
|
|
|
|
|
|
|
//
|
|
// Images
|
|
// --------------------------------------------------
|
|
|
|
.img-thumbnail {
|
|
.box-shadow(0 1px 2px rgba(0,0,0,.075));
|
|
}
|
|
|
|
|
|
|
|
//
|
|
// Dropdowns
|
|
// --------------------------------------------------
|
|
|
|
.dropdown-menu > li > a:hover,
|
|
.dropdown-menu > li > a:focus {
|
|
#gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
|
|
background-color: darken(@dropdown-link-hover-bg, 5%);
|
|
}
|
|
.dropdown-menu > .active > a,
|
|
.dropdown-menu > .active > a:hover,
|
|
.dropdown-menu > .active > a:focus {
|
|
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
|
|
background-color: darken(@dropdown-link-active-bg, 5%);
|
|
}
|
|
|
|
|
|
|
|
//
|
|
// Navbar
|
|
// --------------------------------------------------
|
|
|
|
// Default navbar
|
|
.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);
|
|
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
|
|
.box-shadow(@shadow);
|
|
|
|
.navbar-nav > .open > a,
|
|
.navbar-nav > .active > a {
|
|
#gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));
|
|
.box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
|
|
}
|
|
}
|
|
.navbar-brand,
|
|
.navbar-nav > li > a {
|
|
text-shadow: 0 1px 0 rgba(255,255,255,.25);
|
|
}
|
|
|
|
// Inverted navbar
|
|
.navbar-inverse {
|
|
#gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);
|
|
.reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
|
|
|
|
.navbar-nav > .open > a,
|
|
.navbar-nav > .active > a {
|
|
#gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));
|
|
.box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
|
|
}
|
|
|
|
.navbar-brand,
|
|
.navbar-nav > li > a {
|
|
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
|
}
|
|
}
|
|
|
|
// Undo rounded corners in static and fixed navbars
|
|
.navbar-static-top,
|
|
.navbar-fixed-top,
|
|
.navbar-fixed-bottom {
|
|
.border-radius(0);
|
|
}
|
|
|
|
|
|
|
|
//
|
|
// Alerts
|
|
// --------------------------------------------------
|
|
|
|
// Common styles
|
|
.alert {
|
|
text-shadow: 0 1px 0 rgba(255,255,255,.2);
|
|
@shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
|
|
.box-shadow(@shadow);
|
|
}
|
|
|
|
// Mixin for generating new styles
|
|
.alert-styles(@color) {
|
|
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));
|
|
border-color: darken(@color, 15%);
|
|
}
|
|
|
|
// Apply the mixin to the alerts
|
|
.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); }
|
|
|
|
|
|
|
|
//
|
|
// Progress bars
|
|
// --------------------------------------------------
|
|
|
|
// Give the progress background some depth
|
|
.progress {
|
|
#gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)
|
|
}
|
|
|
|
// Mixin for generating new styles
|
|
.progress-bar-styles(@color) {
|
|
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));
|
|
}
|
|
|
|
// Apply the mixin to the progress bars
|
|
.progress-bar { .progress-bar-styles(@progress-bar-bg); }
|
|
.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }
|
|
.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }
|
|
.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
|
|
.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
|
|
|
|
// Reset the striped class because our mixins don't do multiple gradients and
|
|
// the above custom styles override the new `.progress-bar-striped` in v3.2.0.
|
|
.progress-bar-striped {
|
|
#gradient > .striped();
|
|
}
|
|
|
|
|
|
//
|
|
// List groups
|
|
// --------------------------------------------------
|
|
|
|
.list-group {
|
|
.border-radius(@border-radius-base);
|
|
.box-shadow(0 1px 2px rgba(0,0,0,.075));
|
|
}
|
|
.list-group-item.active,
|
|
.list-group-item.active:hover,
|
|
.list-group-item.active:focus {
|
|
text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
|
|
#gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));
|
|
border-color: darken(@list-group-active-border, 7.5%);
|
|
}
|