mini.css/scss/mini/_base.scss

310 lines
6.1 KiB
SCSS
Raw Normal View History

/*
Set font-family, line-height, prevent adjustments of font size after orientation changes in IE and iOS.
Set body colors and margin.
*/
2016-08-22 11:00:03 +00:00
html {
font-family: #{$base-fonts};
font-size: $base-font-size;
line-height: $base-line-height;
2016-08-22 11:00:03 +00:00
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: $body-margin;
2016-08-22 11:00:03 +00:00
color: $body-color;
background-color: $body-bg-color;
2016-08-22 11:00:03 +00:00
}
/*
Correct display in IE 9-.
Give images display: block to be responsive.
*/
article, aside, footer, header, nav, section, figcaption, figure, main, details, menu, img {
2016-08-22 11:00:03 +00:00
display: block;
}
/*
Correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/*
Styles for headers.
*/
h1, h2, h3, h4, h5, h6{
line-height: $base-line-height * $header-line-height-multiplier;
margin: $header-margin ;
font-weight: $header-font-weight ;
2016-08-22 11:00:03 +00:00
small{
color: $header-small-color ;
font-weight: $header-small-font-weight ;
2016-08-22 11:00:03 +00:00
}
}
h1{ font-size: $base-font-size * $h1-multiplier; }
h2{ font-size: $base-font-size * $h2-multiplier; }
h3{ font-size: $base-font-size * $h3-multiplier; }
h4{ font-size: $base-font-size * $h4-multiplier; }
h5{ font-size: $base-font-size * $h5-multiplier; }
h6{ font-size: $base-font-size * $h6-multiplier; }
/*
Correct box-sizing in Firefox.
Style for horizontal rule.
*/
hr {
box-sizing: content-box;
line-height: $base-line-height * $hr-line-height-multiplier ;
margin: $hr-margin ;
height: 0;
border: 0;
border-top: $hr-border-style;
}
/*
Style for all small text and size for sub and sup.
*/
small, sub, sup{
font-size: $small-font-size;
}
/*
Style for paragraph and preformatted elements.
*/
2016-08-22 11:23:41 +00:00
p, pre {
margin: $p-margin;
2016-08-22 11:00:03 +00:00
}
/*
Style for lists.
*/
2016-08-22 11:23:41 +00:00
ul, ol {
margin-top: $list-margin-top;
margin-bottom: $list-margin-bottom;
2016-08-22 11:23:41 +00:00
ul, ol {
2016-08-22 11:00:03 +00:00
margin-bottom: 0;
}
}
/*
Styles for code and preformatted.
*/
samp, kbd, code, pre{
font-family: #{$code-fonts};
font-size: $base-font-size;
2016-08-22 11:00:03 +00:00
}
kbd, code, pre {
padding: $code-padding;
border-radius: $code-border-radius;
2016-08-22 11:00:03 +00:00
}
code, pre{
background-color: $code-bg-color;
2016-08-22 11:00:03 +00:00
}
kbd {
color: $kbd-color;
background-color: $kbd-bg-color;
2016-08-22 11:00:03 +00:00
}
pre {
display: block;
word-break: break-all;
word-wrap: break-word;
code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
}
/*
Style for hyperlinks, remove underline.
Remove gray background on active links in IE 10.
Remove outline on focused links when they are also active or hovered.
*/
2016-08-22 11:00:03 +00:00
a {
background-color: transparent;
text-decoration: none;
2016-08-22 11:00:03 +00:00
color: $a-color;
&:active, &:hover{
outline-width: 0;
color: $a-hover-color;
2016-08-22 11:00:03 +00:00
}
&:visited{
color: $a-visited-color;
2016-08-22 11:00:03 +00:00
&:active, &:hover{
color: $a-visited-hover-color;
2016-08-22 11:00:03 +00:00
}
}
}
/*
Prevent the duplicate application of `bolder` in Safari 6.
*/
2016-08-22 11:00:03 +00:00
b, strong {
font-weight: inherit;
2016-08-22 11:23:41 +00:00
}
/*
Correct font weight in Chrome, Edge, Safari.
*/
2016-08-22 11:23:41 +00:00
b, strong {
2016-08-22 11:00:03 +00:00
font-weight: bolder;
}
/*
Correct font style in Android 4.3-.
*/
2016-08-22 11:00:03 +00:00
dfn {
font-style: italic;
2016-08-22 11:00:03 +00:00
}
/*
Remove botom border in Firefox 39-.
Correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
/*
Style for mark.
*/
2016-08-22 11:00:03 +00:00
mark {
background-color: $mark-bg-color;
color: $mark-color;
}
/*
Styling for hidden elements.
Correct display for template in IE.
Correct display for audio:not([controls]) in iOS 4-7.
*/
[hidden], .hidden, template, audio:not([controls]) {
display: none;
2016-08-22 11:00:03 +00:00
}
audio:not([controls]) {
height: 0;
}
/*
Correct display in IE 9-.
*/
audio, video, progress {
display: inline-block;
}
/*
Styles for sub and sup.
Prevent `sub` and `sup` elements from affecting the line height.
Correct vertical alignment of progress in Chrome, Firefox, and Opera.
*/
sub, sup, progress{
vertical-align: baseline;
}
sub, sup {
2016-08-22 11:00:03 +00:00
line-height: 0;
position: relative;
2016-08-22 11:00:03 +00:00
}
sub {
bottom: $sub-bottom;
2016-08-22 11:00:03 +00:00
}
sup {
top: $sup-top;
2016-08-22 11:00:03 +00:00
}
/*
Remove the border on images inside links in IE 10-.
Make images responsive.
*/
2016-08-22 11:00:03 +00:00
img {
border-style: none;
max-width: 100%;
2016-08-22 11:00:03 +00:00
}
/*
Hide the overflow in IE.
*/
2016-08-22 11:00:03 +00:00
svg:not(:root) {
overflow: hidden;
}
/*
Show the overflow in IE and Edge.
*/
2016-08-22 11:23:41 +00:00
button, input, hr {
2016-08-22 11:00:03 +00:00
overflow: visible;
}
/*
Style for buttons and input elements.
*/
button, input, optgroup, select, textarea {
font-family: #{$button-fonts};
font-size: $button-font-size;
line-height: $base-line-height * $button-line-height-multiplier;
margin: $button-margin;
}
/*
Remove the inheritance of text transform in Edge, Firefox, and IE.
*/
2016-08-22 11:00:03 +00:00
button, select {
text-transform: none;
}
/*
Correct styling for iOS, Safari and Firefox.
*/
2016-08-22 11:00:03 +00:00
button, html [type="button"], [type="reset"], [type="submit"] {
-webkit-appearance: button;
&::-moz-focus-inner{
border-style: none;
padding: 0;
}
&:-moz-focusring{
outline: 1px dotted ButtonText;
}
}
/*
Style for fieldset.
*/
2016-08-22 11:00:03 +00:00
fieldset {
border: $fieldset-border;
border-radius: $fieldset-border-radius;
margin: $fieldset-margin;
padding: $fieldset-padding;
}
/*
Add correct box sizing and remove padding in IE 10-.
*/
2016-08-22 11:23:41 +00:00
[type="checkbox"], [type="radio"], legend {
2016-08-22 11:00:03 +00:00
box-sizing: border-box;
padding: 0;
}
/*
2016-08-22 11:00:03 +00:00
Correct text wrapping and color inheritance from `fieldset` elements in Edge and IE.
Remove the padding so developers are not caught out when they zero out `fieldset`
elements in all browsers.
*/
2016-08-22 11:00:03 +00:00
legend {
color: inherit;
display: table;
max-width: 100%;
white-space: normal;
}
/*
Remove the default vertical scrollbar in IE.
*/
2016-08-22 11:00:03 +00:00
textarea {
overflow: auto;
}
/*
Correct the cursor style of increment and decrement buttons in Chrome.
Make images responsive.
*/
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button, img {
2016-08-22 11:00:03 +00:00
height: auto;
}
/*
Correct styling in Chrome and Safari.
Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
2016-08-22 11:00:03 +00:00
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
&::-webkit-search-cancel-button, &::-webkit-search-decoration {
-webkit-appearance: none;
}
}
/*
Correct the inability to style clickable types in iOS and Safari.
Change font properties to `inherit` in Safari.
*/
2016-08-22 11:00:03 +00:00
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}