mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
58082cd83e
Conflicts: .gitignore Gruntfile.js _config.yml dist/css/bootstrap-theme.css dist/css/bootstrap-theme.min.css dist/css/bootstrap.css dist/css/bootstrap.css.map dist/css/bootstrap.min.css dist/js/bootstrap.js dist/js/bootstrap.min.js docs/_includes/components/navbar.html docs/_includes/components/progress-bars.html docs/_includes/css/grid.html docs/_includes/css/overview.html docs/_includes/customizer-variables.html docs/_includes/getting-started/accessibility.html docs/_includes/getting-started/browser-device-support.html docs/_includes/getting-started/community.html docs/_includes/getting-started/disabling-responsiveness.html docs/_includes/getting-started/download.html docs/_includes/getting-started/examples.html docs/_includes/getting-started/license.html docs/_includes/getting-started/third-party-support.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/js/transitions.html docs/_includes/nav/javascript.html docs/_includes/nav/main.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/raw-files.min.js docs/assets/js/src/customizer.js docs/dist/css/bootstrap-theme.css 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/dist/js/bootstrap.js docs/dist/js/bootstrap.min.js docs/migration.html js/affix.js js/alert.js js/button.js js/carousel.js js/collapse.js js/dropdown.js js/modal.js js/popover.js js/scrollspy.js js/tab.js js/tests/unit/affix.js js/tests/unit/button.js js/tests/unit/carousel.js js/tests/unit/modal.js js/tests/unit/tooltip.js js/tests/visual/modal.html js/tooltip.js less/component-animations.less less/jumbotron.less less/mixins/background-variant.less less/mixins/buttons.less less/mixins/responsive-visibility.less less/mixins/text-emphasis.less less/navbar.less less/navs.less less/scaffolding.less less/tooltip.less less/utilities.less less/variables.less package.json scss/_buttons.scss scss/_forms.scss scss/_modal.scss
172 lines
4.0 KiB
SCSS
172 lines
4.0 KiB
SCSS
//
|
|
// Scaffolding
|
|
// --------------------------------------------------
|
|
|
|
|
|
// Reset the box-sizing
|
|
//
|
|
// Heads up! This reset may cause conflicts with some third-party widgets.
|
|
// For recommendations on resolving such conflicts, see
|
|
// http://getbootstrap.com/getting-started/#third-box-sizing
|
|
// Credit: Jon Neal & CSS-Tricks
|
|
// http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
html {
|
|
box-sizing: border-box;
|
|
}
|
|
*,
|
|
*:before,
|
|
*:after {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
|
|
// Make viewport responsive
|
|
//
|
|
// @viewport is supposed to eventually replace <meta name="viewport">. It's manually prefixed for forward-compatibility.
|
|
//
|
|
// @viewport is also needed because IE 10+ doesn't honor <meta name="viewport"> in some cases.
|
|
// (See http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/)
|
|
//
|
|
// However, `device-width` is broken on IE 10 on Windows (Phone) 8,
|
|
// (see http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
|
|
// and https://github.com/twbs/bootstrap/issues/10497)
|
|
// and the fix for that involves a snippet of JavaScript to sniff the user agent and apply some conditional CSS.
|
|
// See http://getbootstrap.com/getting-started/#support-ie10-width for the relevant hack.
|
|
|
|
@-moz-viewport { width: device-width; }
|
|
@-ms-viewport { width: device-width; }
|
|
@-o-viewport { width: device-width; }
|
|
@-webkit-viewport { width: device-width; }
|
|
@viewport { width: device-width; }
|
|
|
|
|
|
// Body reset
|
|
|
|
html {
|
|
font-size: $font-size-root;
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
}
|
|
|
|
body {
|
|
font-family: $font-family-base;
|
|
font-size: $font-size-base;
|
|
line-height: $line-height-base;
|
|
color: $text-color;
|
|
background-color: $body-bg;
|
|
}
|
|
|
|
// Reset fonts for relevant elements
|
|
input,
|
|
button,
|
|
select,
|
|
textarea {
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
}
|
|
|
|
|
|
// Links
|
|
|
|
a {
|
|
color: $link-color;
|
|
text-decoration: none;
|
|
|
|
@include hover-focus {
|
|
color: $link-hover-color;
|
|
text-decoration: $link-hover-decoration;
|
|
}
|
|
|
|
&:focus {
|
|
@include tab-focus();
|
|
}
|
|
}
|
|
|
|
|
|
// Images
|
|
|
|
img {
|
|
// Make them responsive with `max-width` and `height`
|
|
max-width: 100%;
|
|
height: auto;
|
|
// Match vertical alignment of most other Bootstrapped elements
|
|
vertical-align: middle;
|
|
}
|
|
|
|
// Rounded corners
|
|
.img-rounded {
|
|
@include border-radius($border-radius-lg);
|
|
}
|
|
|
|
// Image thumbnails
|
|
.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;
|
|
@include box-shadow(0 1px 2px rgba(0,0,0,.075));
|
|
|
|
// Keep them at most 100% wide
|
|
// @include img-responsive(inline-block);
|
|
}
|
|
|
|
// Perfect circle
|
|
.img-circle {
|
|
border-radius: 50%; // set radius in percents
|
|
}
|
|
|
|
|
|
// Horizontal rules
|
|
|
|
hr {
|
|
margin-top: $spacer;
|
|
margin-bottom: $spacer;
|
|
border: 0;
|
|
border-top: .0625rem solid $hr-border;
|
|
}
|
|
|
|
|
|
// Only display content to screen readers
|
|
//
|
|
// See: http://a11yproject.com/posts/how-to-hide-content/
|
|
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0,0,0,0);
|
|
border: 0;
|
|
}
|
|
|
|
// Use in conjunction with .sr-only to only display content when it's focused.
|
|
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
|
|
// Credit: HTML5 Boilerplate
|
|
|
|
.sr-only-focusable {
|
|
&:active,
|
|
&:focus {
|
|
position: static;
|
|
width: auto;
|
|
height: auto;
|
|
margin: 0;
|
|
overflow: visible;
|
|
clip: auto;
|
|
}
|
|
}
|
|
|
|
// iOS "clickable elements" fix for role="button"
|
|
//
|
|
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
|
|
// for traditionally non-focusable elements with role="button"
|
|
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
|
// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged
|
|
|
|
[role="button"] {
|
|
cursor: pointer;
|
|
}
|