2015-04-17 02:15:29 +02:00
|
|
|
// Reboot
|
2012-06-29 06:46:45 +02:00
|
|
|
//
|
2015-04-17 02:15:29 +02:00
|
|
|
// Global resets to common HTML elements and more for easier usage by Bootstrap.
|
|
|
|
// Builds on the resets of Normalize.css.
|
2011-05-04 03:09:25 +02:00
|
|
|
|
2011-08-17 07:58:01 +02:00
|
|
|
|
2013-03-10 19:24:07 +01:00
|
|
|
// Reset the box-sizing
|
2014-01-24 02:23:57 +01:00
|
|
|
//
|
2015-04-17 03:39:45 +02:00
|
|
|
// Change from `box-sizing: content-box` to `border-box` so that when you add
|
|
|
|
// `padding` or `border`s to an element, the overall declared `width` does not
|
|
|
|
// change. For example, `width: 100px;` will always be `100px` despite the
|
|
|
|
// `border: 10px solid red;` and `padding: 20px;`.
|
|
|
|
//
|
2015-04-17 02:15:29 +02:00
|
|
|
// 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.
|
|
|
|
//
|
2015-04-17 03:39:45 +02:00
|
|
|
// Credit: shttp://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
2015-04-17 02:10:47 +02:00
|
|
|
|
2015-01-06 00:20:46 +01:00
|
|
|
html {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
2015-04-17 02:10:47 +02:00
|
|
|
|
2014-07-08 11:04:48 +02:00
|
|
|
*,
|
2013-08-13 06:26:43 +02:00
|
|
|
*:before,
|
|
|
|
*:after {
|
2015-01-06 00:20:46 +01:00
|
|
|
box-sizing: inherit;
|
2013-03-10 19:24:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-01-21 21:41:11 +01:00
|
|
|
// Make viewport responsive
|
|
|
|
//
|
2015-04-17 02:15:29 +02:00
|
|
|
// @viewport is 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/.
|
|
|
|
// Eventually @viewport will replace <meta name="viewport">. It's been manually
|
|
|
|
// prefixed for forward-compatibility.
|
2015-01-21 21:41:11 +01:00
|
|
|
//
|
|
|
|
// However, `device-width` is broken on IE 10 on Windows (Phone) 8,
|
2015-04-17 02:15:29 +02:00
|
|
|
// (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.
|
|
|
|
//
|
2015-01-21 21:41:11 +01:00
|
|
|
// 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; }
|
|
|
|
|
|
|
|
|
2015-04-17 03:39:45 +02:00
|
|
|
//
|
2015-04-17 02:10:47 +02:00
|
|
|
// Reset HTML, body, and more
|
2015-04-17 03:39:45 +02:00
|
|
|
//
|
2011-05-04 03:09:25 +02:00
|
|
|
|
2013-01-16 02:55:14 +01:00
|
|
|
html {
|
2015-04-17 03:39:45 +02:00
|
|
|
// Sets a specific default `font-size` for user with `rem` type scales.
|
2014-12-04 09:10:24 +01:00
|
|
|
font-size: $font-size-root;
|
2015-04-17 03:39:45 +02:00
|
|
|
// Changes the default tap highlight to be completely transparent in iOS.
|
2013-01-16 02:55:14 +01:00
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
|
}
|
|
|
|
|
2011-05-04 03:09:25 +02:00
|
|
|
body {
|
2015-04-17 03:39:45 +02:00
|
|
|
// Make the `body` use the `font-size-root`
|
2014-12-02 23:02:35 +01:00
|
|
|
font-family: $font-family-base;
|
|
|
|
font-size: $font-size-base;
|
|
|
|
line-height: $line-height-base;
|
2015-04-17 03:39:45 +02:00
|
|
|
// Go easy on the eyes and use something other than `#000` for text
|
2014-12-02 23:02:35 +01:00
|
|
|
color: $text-color;
|
2015-04-17 03:39:45 +02:00
|
|
|
// By default, `<body>` has no `background-color` so we set one as a best practice.
|
2014-12-02 23:02:35 +01:00
|
|
|
background-color: $body-bg;
|
2012-11-30 09:24:17 +01:00
|
|
|
}
|
|
|
|
|
2015-04-17 03:39:45 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Typography
|
|
|
|
//
|
|
|
|
|
|
|
|
// Remove top margins from headings
|
|
|
|
//
|
|
|
|
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
|
|
|
// margin for easier control within type scales as it avoids margin collapsing.
|
|
|
|
h1, h2, h3, h4, h5, h6 {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reset margins on paragraphs
|
|
|
|
//
|
|
|
|
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
|
|
|
|
// bottom margin to use `rem` units instead of `em`.
|
|
|
|
p {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
abbr[title] {
|
|
|
|
cursor: help;
|
|
|
|
border-bottom-color: #ccc;
|
|
|
|
}
|
|
|
|
|
|
|
|
address {
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
font-style: normal;
|
2013-03-27 01:12:17 +01:00
|
|
|
line-height: inherit;
|
2011-05-04 03:09:25 +02:00
|
|
|
}
|
|
|
|
|
2015-04-17 03:39:45 +02:00
|
|
|
ol,
|
|
|
|
ul,
|
|
|
|
dl {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
}
|
2011-09-03 08:01:38 +02:00
|
|
|
|
2015-04-17 03:39:45 +02:00
|
|
|
ol ol,
|
|
|
|
ul ul,
|
|
|
|
ol ul,
|
|
|
|
ul ol {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
dt {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
dd {
|
|
|
|
margin-left: 0; // Undo browser default
|
|
|
|
margin-bottom: .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
blockquote {
|
|
|
|
margin: 0 0 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
2012-02-21 17:24:18 +01:00
|
|
|
// Links
|
2015-04-17 03:39:45 +02:00
|
|
|
//
|
2011-05-04 03:09:25 +02:00
|
|
|
|
|
|
|
a {
|
2014-12-02 23:02:35 +01:00
|
|
|
color: $link-color;
|
2011-05-04 03:09:25 +02:00
|
|
|
text-decoration: none;
|
2013-08-18 23:28:55 +02:00
|
|
|
|
2015-01-01 10:05:01 +01:00
|
|
|
@include hover-focus {
|
2014-12-02 23:02:35 +01:00
|
|
|
color: $link-hover-color;
|
|
|
|
text-decoration: $link-hover-decoration;
|
2013-08-18 23:28:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
2014-12-02 23:02:35 +01:00
|
|
|
@include tab-focus();
|
2013-08-18 23:28:55 +02:00
|
|
|
}
|
2012-12-21 05:52:20 +01:00
|
|
|
}
|
2012-07-27 09:06:43 +02:00
|
|
|
|
|
|
|
|
2015-04-17 03:39:45 +02:00
|
|
|
//
|
|
|
|
// Code
|
|
|
|
//
|
|
|
|
|
|
|
|
pre {
|
|
|
|
// Remove browser default top margin
|
|
|
|
margin-top: 0;
|
|
|
|
// Reset browser default of `1em` to use `rem`s
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Figures
|
|
|
|
//
|
|
|
|
|
|
|
|
figure {
|
|
|
|
// Normalize adds `margin` to `figure`s as browsers apply it inconsistently.
|
|
|
|
// We reset that to create a better flow in-page.
|
|
|
|
margin: 0 0 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
2012-07-27 09:06:43 +02:00
|
|
|
// Images
|
2015-04-17 03:39:45 +02:00
|
|
|
//
|
2012-07-27 09:06:43 +02:00
|
|
|
|
2012-12-21 05:52:20 +01:00
|
|
|
img {
|
2015-04-17 03:39:45 +02:00
|
|
|
// By default, `<img>`s are `inline-block`. This assumes that, and vertically
|
|
|
|
// centers them. This won't apply should you reset them to `block` level.
|
2013-06-28 09:09:10 +02:00
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
2013-08-19 04:24:10 +02:00
|
|
|
|
2015-03-29 09:08:54 +02: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;
|
|
|
|
}
|
2015-04-17 03:39:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Tables
|
|
|
|
//
|
|
|
|
|
|
|
|
table {
|
|
|
|
// Reset for nesting within parents with `background-color`.
|
|
|
|
background-color: $table-bg;
|
|
|
|
}
|
|
|
|
|
|
|
|
caption {
|
|
|
|
caption-side: bottom;
|
|
|
|
padding-top: $table-cell-padding;
|
|
|
|
padding-bottom: $table-cell-padding;
|
|
|
|
color: $text-muted;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
th {
|
|
|
|
// Centered by default, but left-align-ed to match the `td`s below.
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Forms
|
|
|
|
//
|
|
|
|
|
|
|
|
label {
|
|
|
|
// Allow labels can use `margin` for spacing.
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
input,
|
|
|
|
button,
|
|
|
|
select,
|
|
|
|
textarea {
|
|
|
|
// Remove all `margin`s so our classes don't have to do it themselves.
|
|
|
|
margin: 0;
|
|
|
|
// Normalize includes `font: inherit;`, so `font-family`. `font-size`, etc are
|
|
|
|
// properly inherited. However, `line-height` isn't addressed there. Using this
|
|
|
|
// ensures we don't need to unnessarily redeclare the global font stack.
|
|
|
|
line-height: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
textarea {
|
|
|
|
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
|
|
|
resize: vertical;
|
|
|
|
}
|
|
|
|
|
|
|
|
fieldset {
|
|
|
|
// Reset the default outline behavior of fieldsets so they don't affect page layout.
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
border: 0;
|
|
|
|
// Chrome and Firefox set a `min-width: min-content;` on fieldsets,
|
|
|
|
// so we reset that to ensure it behaves more like a standard block element.
|
|
|
|
// See https://github.com/twbs/bootstrap/issues/12359.
|
|
|
|
min-width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
legend {
|
|
|
|
// Reset the entire legend element to match the `fieldset`
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
padding: 0;
|
|
|
|
margin-bottom: .5rem;
|
|
|
|
font-size: 1.5rem;
|
|
|
|
line-height: inherit;
|
|
|
|
// border: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
input[type="search"] {
|
2015-04-17 09:22:35 +02:00
|
|
|
// This overrides the extra rounded corners on search inputs in iOS so that our
|
|
|
|
// `.form-control` class can properly style them. Note that this cannot simply
|
|
|
|
// be added to `.form-control` as it's not specific enough. For details, see
|
|
|
|
// https://github.com/twbs/bootstrap/issues/11586.
|
|
|
|
-webkit-appearance: none;
|
2015-04-17 03:39:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// todo: needed?
|
|
|
|
output {
|
2015-04-17 09:22:35 +02:00
|
|
|
display: inline-block;
|
2015-04-17 03:39:45 +02:00
|
|
|
// font-size: $font-size-base;
|
|
|
|
// line-height: $line-height-base;
|
|
|
|
// color: $input-color;
|
|
|
|
}
|