mirror of
https://github.com/Chalarangelo/mini.css.git
synced 2025-08-15 10:23:57 +02:00
Core cleanup
This commit is contained in:
@@ -376,3 +376,8 @@
|
|||||||
- *TODO* Update the `package.json` and `bower.json` files according to the new framework version.
|
- *TODO* Update the `package.json` and `bower.json` files according to the new framework version.
|
||||||
- Updated live demo page reference to use the new structure.
|
- Updated live demo page reference to use the new structure.
|
||||||
|
|
||||||
|
## 20161110
|
||||||
|
|
||||||
|
- Continued module restructure and cleanup as follows:
|
||||||
|
- Code cleanup in `core`, indentation change to tabs for consistency, indentation fixes etc.
|
||||||
|
|
@@ -1,23 +1,22 @@
|
|||||||
// SECTION: Browsers resets and base typography.
|
// Browsers resets and base typography.
|
||||||
//===================================================
|
|
||||||
$apply-defaults-to-all: true !default;
|
$apply-defaults-to-all: true !default;
|
||||||
@if $apply-defaults-to-all {
|
@if $apply-defaults-to-all {
|
||||||
html, * {
|
html, * {
|
||||||
font-family: #{$base-font-family};
|
font-family: #{$base-font-family};
|
||||||
font-size: $base-font-size;
|
font-size: $base-font-size;
|
||||||
line-height: $base-line-height;
|
line-height: $base-line-height;
|
||||||
// Prevent adjustments of font size after orientation changes in mobile.
|
// Prevent adjustments of font size after orientation changes in mobile.
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else {
|
@else {
|
||||||
html {
|
html {
|
||||||
font-family: #{$base-font-family};
|
font-family: #{$base-font-family};
|
||||||
font-size: $base-font-size;
|
font-size: $base-font-size;
|
||||||
line-height: $base-line-height;
|
line-height: $base-line-height;
|
||||||
// Prevent adjustments of font size after orientation changes in mobile.
|
// Prevent adjustments of font size after orientation changes in mobile.
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -26,8 +25,7 @@ body {
|
|||||||
background: $back-color;
|
background: $back-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Correct display for older versions of IE.
|
// Correct display for older versions of IE. Fix display of some elements in other browsers as well.
|
||||||
// Fix display of some elements in other browsers as well.
|
|
||||||
article, aside, section, figcaption, figure, main, details, menu {
|
article, aside, section, figcaption, figure, main, details, menu {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -40,8 +38,6 @@ summary {
|
|||||||
abbr[title] {
|
abbr[title] {
|
||||||
border-bottom: none; // Remove bottom border in Firefox 39-.
|
border-bottom: none; // Remove bottom border in Firefox 39-.
|
||||||
text-decoration: underline; // Opinionated style-fix for all browsers.
|
text-decoration: underline; // Opinionated style-fix for all browsers.
|
||||||
// This is an artifact, please move along.
|
|
||||||
// &:hover:after { content: " ("attr(title) ")"; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Correct display for older versions of IE.
|
// Correct display for older versions of IE.
|
||||||
@@ -68,9 +64,9 @@ img {
|
|||||||
// Fix display in older versions of Android.
|
// Fix display in older versions of Android.
|
||||||
$include-dfn-fix: true !default;
|
$include-dfn-fix: true !default;
|
||||||
@if $include-dfn-fix {
|
@if $include-dfn-fix {
|
||||||
dfn {
|
dfn {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
@@ -79,16 +75,16 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
font-weight: $header-font-weight;
|
font-weight: $header-font-weight;
|
||||||
small {
|
small {
|
||||||
color: $header-smalltext-fore-color;
|
color: $header-smalltext-fore-color;
|
||||||
$make-header-smalltext-block: false !default;
|
$make-header-smalltext-block: false !default;
|
||||||
@if $make-header-smalltext-block {
|
@if $make-header-smalltext-block {
|
||||||
display: block;
|
display: block;
|
||||||
@if $header-smalltext-b-top-margin != 0 {
|
@if $header-smalltext-b-top-margin != 0 {
|
||||||
margin-top: $header-smalltext-b-top-margin;
|
margin-top: $header-smalltext-b-top-margin;
|
||||||
}
|
}
|
||||||
@if $header-smalltext-b-font-size != $small-font-size {
|
@if $header-smalltext-b-font-size != $small-font-size {
|
||||||
font-size: $header-smalltext-b-font-size;
|
font-size: $header-smalltext-b-font-size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,234 +123,231 @@ hr {
|
|||||||
// Actual styling using variables
|
// Actual styling using variables
|
||||||
line-height: $horizontal-rule-line-height;
|
line-height: $horizontal-rule-line-height;
|
||||||
margin: $horizontal-rule-margin;
|
margin: $horizontal-rule-margin;
|
||||||
$horizontal-rule-fancy-style: false !default;
|
$horizontal-rule-fancy-style: false !default;
|
||||||
@if $horizontal-rule-fancy-style {
|
@if $horizontal-rule-fancy-style {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: -webkit-linear-gradient(#{$horizontal-rule-fancy-gradient});
|
background: -webkit-linear-gradient(#{$horizontal-rule-fancy-gradient});
|
||||||
background: linear-gradient(#{$horizontal-rule-fancy-gradient});
|
background: linear-gradient(#{$horizontal-rule-fancy-gradient});
|
||||||
}
|
}
|
||||||
@else {
|
@else {
|
||||||
height: 0;
|
height: 0;
|
||||||
border-top: $horizontal-rule-border-style;
|
border-top: $horizontal-rule-border-style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$use-default-code-fonts: true !default;
|
$use-default-code-fonts: true !default;
|
||||||
@if $use-default-code-fonts {
|
@if $use-default-code-fonts {
|
||||||
code, kbd, pre, samp{
|
code, kbd, pre, samp{
|
||||||
font-family: monospace, monospace; // Applies display fix for all code elements
|
font-family: monospace, monospace; // Applies display fix for all code elements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else {
|
@else {
|
||||||
code, kbd, pre, samp{
|
code, kbd, pre, samp{
|
||||||
font-family: $code-font-family; // Display fix should be applied manually!
|
font-family: $code-font-family; // Display fix should be applied manually!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
@if $code-element-border-style != 0{
|
@if $code-element-border-style != 0{
|
||||||
border: $code-element-border-style;
|
border: $code-element-border-style;
|
||||||
}
|
}
|
||||||
@if $code-element-border-radius != 0 {
|
@if $code-element-border-radius != 0 {
|
||||||
border-radius: $code-element-border-radius;
|
border-radius: $code-element-border-radius;
|
||||||
}
|
}
|
||||||
@if $code-element-back-color != $back-color {
|
@if $code-element-back-color != $back-color {
|
||||||
background: $code-element-back-color;
|
background: $code-element-back-color;
|
||||||
}
|
}
|
||||||
@if $code-element-fore-color != $fore-color {
|
@if $code-element-fore-color != $fore-color {
|
||||||
color: $code-element-fore-color;
|
color: $code-element-fore-color;
|
||||||
}
|
}
|
||||||
@if $code-element-padding != 0 {
|
@if $code-element-padding != 0 {
|
||||||
padding: $code-element-padding;
|
padding: $code-element-padding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
overflow: auto; // Responsiveness
|
overflow: auto; // Responsiveness
|
||||||
@if $pre-element-border-style != 0 {
|
@if $pre-element-border-style != 0 {
|
||||||
border: $pre-element-border-style;
|
border: $pre-element-border-style;
|
||||||
}
|
}
|
||||||
@if $pre-element-border-radius != 0 {
|
@if $pre-element-border-radius != 0 {
|
||||||
border-radius: $pre-element-border-radius;
|
border-radius: $pre-element-border-radius;
|
||||||
}
|
}
|
||||||
@if $pre-element-back-color != $back-color {
|
@if $pre-element-back-color != $back-color {
|
||||||
background: $pre-element-back-color;
|
background: $pre-element-back-color;
|
||||||
}
|
}
|
||||||
@if $pre-element-fore-color != $fore-color {
|
@if $pre-element-fore-color != $fore-color {
|
||||||
color: $pre-element-fore-color;
|
color: $pre-element-fore-color;
|
||||||
}
|
}
|
||||||
@if $pre-element-padding != 0 {
|
@if $pre-element-padding != 0 {
|
||||||
padding: $pre-element-padding;
|
padding: $pre-element-padding;
|
||||||
}
|
}
|
||||||
@if pre-element-margin != 0 {
|
@if pre-element-margin != 0 {
|
||||||
margin: $pre-element-margin;
|
margin: $pre-element-margin;
|
||||||
}
|
}
|
||||||
$add-pre-element-sidebar: false !default;
|
$add-pre-element-sidebar: false !default;
|
||||||
@if $add-pre-element-sidebar {
|
@if $add-pre-element-sidebar {
|
||||||
border-left: $pre-element-sidebar-style;
|
border-left: $pre-element-sidebar-style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kbd {
|
kbd {
|
||||||
@if $kbd-element-border-style != 0 {
|
@if $kbd-element-border-style != 0 {
|
||||||
border: $kbd-element-border-style;
|
border: $kbd-element-border-style;
|
||||||
}
|
}
|
||||||
@if $kbd-element-border-radius != 0 {
|
@if $kbd-element-border-radius != 0 {
|
||||||
border-radius: $kbd-element-border-radius;
|
border-radius: $kbd-element-border-radius;
|
||||||
}
|
}
|
||||||
@if $kbd-element-back-color != $back-color {
|
@if $kbd-element-back-color != $back-color {
|
||||||
background: $kbd-element-back-color;
|
background: $kbd-element-back-color;
|
||||||
}
|
}
|
||||||
@if $kbd-element-fore-color != $fore-color {
|
@if $kbd-element-fore-color != $fore-color {
|
||||||
color: $kbd-element-fore-color;
|
color: $kbd-element-fore-color;
|
||||||
}
|
}
|
||||||
@if $kbd-element-padding != 0 {
|
@if $kbd-element-padding != 0 {
|
||||||
padding: $kbd-element-padding;
|
padding: $kbd-element-padding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$style-samp-element: false !default;
|
$style-samp-element: false !default;
|
||||||
@if $style-samp-element {
|
@if $style-samp-element {
|
||||||
samp{
|
samp{
|
||||||
@if $samp-element-border-style != 0 {
|
@if $samp-element-border-style != 0 {
|
||||||
border: $samp-element-border-style;
|
border: $samp-element-border-style;
|
||||||
}
|
}
|
||||||
@if $samp-element-border-radius != 0 {
|
@if $samp-element-border-radius != 0 {
|
||||||
border-radius: $samp-element-border-radius;
|
border-radius: $samp-element-border-radius;
|
||||||
}
|
}
|
||||||
@if $samp-element-back-color != $back-color {
|
@if $samp-element-back-color != $back-color {
|
||||||
background: $samp-element-back-color;
|
background: $samp-element-back-color;
|
||||||
}
|
}
|
||||||
@if $samp-element-fore-color != $fore-color {
|
@if $samp-element-fore-color != $fore-color {
|
||||||
color: $samp-element-fore-color;
|
color: $samp-element-fore-color;
|
||||||
}
|
}
|
||||||
@if $samp-element-padding != 0 {
|
@if $samp-element-padding != 0 {
|
||||||
padding: $samp-element-padding;
|
padding: $samp-element-padding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $small-font-size == $sub-font-size and $small-font-size == $sup-font-size {
|
@if $small-font-size == $sub-font-size and $small-font-size == $sup-font-size {
|
||||||
small, sup, sub {
|
small, sup, sub {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
}
|
}
|
||||||
sup {
|
sup {
|
||||||
top: $sup-top;
|
top: $sup-top;
|
||||||
}
|
}
|
||||||
sub{
|
sub{
|
||||||
bottom: $sub-bottom;
|
bottom: $sub-bottom;
|
||||||
}
|
}
|
||||||
sup, sub {
|
sup, sub {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else if $small-font-size == $sub-font-size {
|
@else if $small-font-size == $sub-font-size {
|
||||||
small, sub {
|
small, sub {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
}
|
}
|
||||||
sup {
|
sup {
|
||||||
font-size: $sup-font-size;
|
font-size: $sup-font-size;
|
||||||
top: $sup-top;
|
top: $sup-top;
|
||||||
}
|
}
|
||||||
sub {
|
sub {
|
||||||
bottom: $sub-bottom;
|
bottom: $sub-bottom;
|
||||||
}
|
}
|
||||||
sup, sub {
|
sup, sub {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else if $small-font-size == $sup-font-size {
|
@else if $small-font-size == $sup-font-size {
|
||||||
small, sup {
|
small, sup {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
}
|
}
|
||||||
sup {
|
sup {
|
||||||
top: $sup-top;
|
top: $sup-top;
|
||||||
}
|
}
|
||||||
sub {
|
sub {
|
||||||
font-size: $sub-font-size;
|
font-size: $sub-font-size;
|
||||||
bottom: $sub-bottom;
|
bottom: $sub-bottom;
|
||||||
}
|
}
|
||||||
sup, sub {
|
sup, sub {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else if $sup-font-size == $sub-font-size {
|
@else if $sup-font-size == $sub-font-size {
|
||||||
small {
|
small {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
}
|
}
|
||||||
sup, sub {
|
sup, sub {
|
||||||
font-size: $sup-font-size;
|
font-size: $sup-font-size;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
sup {
|
sup {
|
||||||
top: $sup-top;
|
top: $sup-top;
|
||||||
}
|
}
|
||||||
sub{
|
sub{
|
||||||
bottom: $sub-bottom;
|
bottom: $sub-bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else {
|
@else {
|
||||||
small {
|
small {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
}
|
}
|
||||||
sup {
|
sup {
|
||||||
font-size: $sup-font-size;
|
font-size: $sup-font-size;
|
||||||
top: $sup-top;
|
top: $sup-top;
|
||||||
}
|
}
|
||||||
sub{
|
sub{
|
||||||
font-size: $sub-font-size;
|
font-size: $sub-font-size;
|
||||||
bottom: $sub-bottom;
|
bottom: $sub-bottom;
|
||||||
}
|
}
|
||||||
sup, sub {
|
sup, sub {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$apply-link-underline: true !default;
|
$apply-link-underline: true !default;
|
||||||
$apply-link-hover-fade: true !default;
|
$apply-link-hover-fade: true !default;
|
||||||
a{
|
a{
|
||||||
color: $link-fore-color;
|
color: $link-fore-color;
|
||||||
@if $apply-link-underline {
|
@if $apply-link-underline {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
@else {
|
@else {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
@if $link-font-weight != 500 {
|
@if $link-font-weight != 500 {
|
||||||
font-weight: $link-font-weight;
|
font-weight: $link-font-weight;
|
||||||
}
|
}
|
||||||
@if $apply-link-hover-fade {
|
@if $apply-link-hover-fade {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: all 0.3s ease 0s;
|
transition: all 0.3s ease 0s;
|
||||||
}
|
}
|
||||||
&:visited {
|
&:visited {
|
||||||
color: $link-visited-fore-color;
|
color: $link-visited-fore-color;
|
||||||
}
|
}
|
||||||
@if $apply-link-hover-fade {
|
@if $apply-link-hover-fade {
|
||||||
&:hover, &:focus, &:active {
|
&:hover, &:focus, &:active {
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@else {
|
@else {
|
||||||
&:hover, &:focus, &:active {
|
&:hover, &:focus, &:active {
|
||||||
color: $link-hover-fore-color;
|
color: $link-hover-fore-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
// External file loading. You can comment out modules you do not want to use.
|
||||||
}
|
|
||||||
//===================================================
|
|
||||||
// SECTION: External files - core
|
|
||||||
//===================================================
|
|
||||||
// You can comment out modules you do not want to use.
|
|
||||||
@import 'grid';
|
@import 'grid';
|
||||||
@import 'table';
|
@import 'table';
|
||||||
@import 'form';
|
@import 'form';
|
||||||
@@ -367,4 +360,3 @@ a{
|
|||||||
@import 'card';
|
@import 'card';
|
||||||
@import 'tab';
|
@import 'tab';
|
||||||
@import 'spinner';
|
@import 'spinner';
|
||||||
//===================================================
|
|
Reference in New Issue
Block a user