twbs--bootstrap/scss/_scaffolding.scss

142 lines
3.3 KiB
SCSS
Raw Normal View History

2012-06-29 04:46:45 +00:00
//
// Scaffolding
2012-06-29 04:46:45 +00:00
// --------------------------------------------------
2011-05-04 01:09:25 +00:00
2011-08-17 05:58:01 +00:00
2013-03-10 18:24:07 +00:00
// 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;
2013-03-10 18:24:07 +00:00
}
// 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
2011-05-04 01:09:25 +00:00
html {
2014-12-04 08:10:24 +00:00
font-size: $font-size-root;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
2011-05-04 01:09:25 +00:00
body {
2014-12-02 22:02:35 +00:00
font-family: $font-family-base;
font-size: $font-size-base;
line-height: $line-height-base;
color: $text-color;
background-color: $body-bg;
}
2013-06-25 23:07:51 +00:00
// Reset fonts for relevant elements
input,
button,
select,
textarea {
2013-03-27 00:12:17 +00:00
font-family: inherit;
font-size: inherit;
line-height: inherit;
2011-05-04 01:09:25 +00:00
}
// Links
2011-05-04 01:09:25 +00:00
a {
2014-12-02 22:02:35 +00:00
color: $link-color;
2011-05-04 01:09:25 +00:00
text-decoration: none;
2013-08-18 21:28:55 +00:00
@include hover-focus {
2014-12-02 22:02:35 +00:00
color: $link-hover-color;
text-decoration: $link-hover-decoration;
2013-08-18 21:28:55 +00:00
}
&:focus {
2014-12-02 22:02:35 +00:00
@include tab-focus();
2013-08-18 21:28:55 +00:00
}
}
// Images
img {
vertical-align: middle;
}
// Responsive images (ensure images don't scale beyond their parents)
.img-responsive {
@include img-responsive();
}
2012-09-04 18:31:48 +00:00
// Rounded corners
.img-rounded {
2014-12-02 22:02:35 +00:00
@include border-radius($border-radius-lg);
}
// Image thumbnails
.img-thumbnail {
2014-12-02 22:02:35 +00:00
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;
2014-12-02 22:02:35 +00:00
@include box-shadow(0 1px 2px rgba(0,0,0,.075));
// Keep them at most 100% wide
@include img-responsive(inline-block);
}
2012-09-04 18:31:48 +00:00
// Perfect circle
.img-circle {
2013-08-09 11:57:49 +00:00
border-radius: 50%; // set radius in percents
}
// Horizontal rules
hr {
margin-top: $spacer;
2014-12-04 23:18:16 +00:00
margin-bottom: $spacer;
border: 0;
2014-12-31 18:20:29 +00:00
border-top: .0625rem solid $hr-border;
}
Merge branch 'master' into v4 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
2015-03-29 07:08:54 +00:00
// 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;
}