Horizontal rule styling

This commit is contained in:
Angelos Chalaris 2016-10-13 17:20:09 +03:00
parent f4a868aa17
commit 715f1af41e
6 changed files with 24 additions and 21 deletions

View file

@ -41,3 +41,6 @@
- Added `apply-defaults-to-all` flag to apply fonts and styles to all elements except `html`, setting fonts and sizes for the whole document properly. - Added `apply-defaults-to-all` flag to apply fonts and styles to all elements except `html`, setting fonts and sizes for the whole document properly.
- Set basic styles for headers. - Set basic styles for headers.
- Change to the color of `small` elements in headers from `#555` to `#444`. - Change to the color of `small` elements in headers from `#555` to `#444`.
- Built styling for horizontal rules, fixes apply as before.
- `hr` elements get a margin for left and right (`4px`). This is a design decision for the flavor.
- `hr` top and bottom margins changed to `0.5em` from `0.7em`.

View file

@ -15,7 +15,6 @@
<body> <body>
<h1>mini.css <small>A minimal Sass-y responsive mobile-first style-agnostic CSS framework</small></h1> <h1>mini.css <small>A minimal Sass-y responsive mobile-first style-agnostic CSS framework</small></h1>
<p><strong>v2.0</strong> is currently in development. The following page and any related links are going to be incomplete, buggy and/or unstable. But, if you are interested in seeing what it will look like, have a peek!</p> <p><strong>v2.0</strong> is currently in development. The following page and any related links are going to be incomplete, buggy and/or unstable. But, if you are interested in seeing what it will look like, have a peek!</p>
<br><br>
<hr> <hr>
<h1>Heading 1 <small>small text</small></h1> <h1>Heading 1 <small>small text</small></h1>
<h2>Heading 2 <small>small text</small></h2> <h2>Heading 2 <small>small text</small></h2>

View file

@ -42,17 +42,14 @@ h5 {
h6 { h6 {
font-size: 0.75em; } font-size: 0.75em; }
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr { hr {
box-sizing: content-box; box-sizing: content-box;
/* 1 */ border: 0;
height: 0; height: 0;
/* 1 */
overflow: visible; overflow: visible;
/* 2 */ } line-height: 1.2em;
margin: 0.5em 4px;
border-top: 1px solid #666; }
/** /**
* 1. Correct the inheritance and scaling of font size in all browsers. * 1. Correct the inheritance and scaling of font size in all browsers.

View file

@ -1 +1 @@
*,html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#f9f9f9}article,aside,figcaption,figure,footer,header,main,nav,section{display:block}h1,h2,h3,h4,h5,h6{line-height:1.2em;margin:.7em 0;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#444}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.85em}h6{font-size:.75em}hr{box-sizing:content-box;height:0;overflow:visible}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item} *,html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#f9f9f9}article,aside,figcaption,figure,footer,header,main,nav,section{display:block}h1,h2,h3,h4,h5,h6{line-height:1.2em;margin:.7em 0;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#444}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.85em}h6{font-size:.75em}hr{box-sizing:content-box;border:0;height:0;overflow:visible;line-height:1.2em;margin:.5em 4px;border-top:1px solid #666}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}

View file

@ -27,5 +27,9 @@ $header-line-height: 1.2em; // Line height for all headers
$header-margin: 0.7em 0; // Margin for all headers $header-margin: 0.7em 0; // Margin for all headers
$header-font-weight: 500; // Font weight for all headers $header-font-weight: 500; // Font weight for all headers
$header-smalltext-fore-color: #444; // <small> color in headers $header-smalltext-fore-color: #444; // <small> color in headers
$horizontal-rule-line-height: 1.2em; // <hr> line height
$horizontal-rule-margin: 0.5em 4px; // <hr> margin
$horizontal-rule-border-style: 1px solid #666; // Border style for horizontal rules (used
// in the <hr> element's border-top)
// Enable base // Enable base
@import '../../scss/v2/base'; @import '../../scss/v2/base';

View file

@ -50,23 +50,23 @@ h3 {
h4 { h4 {
font-size: $h4-font-size; font-size: $h4-font-size;
} }
h5{ h5 {
font-size: $h5-font-size; font-size: $h5-font-size;
} }
h6{ h6 {
font-size: $h6-font-size; font-size: $h6-font-size;
} }
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr { hr {
box-sizing: content-box; /* 1 */ // Fixes and defaults for styling
height: 0; /* 1 */ box-sizing: content-box;
overflow: visible; /* 2 */ border: 0;
height: 0;
overflow: visible;
// Actual styling using variables
line-height: $horizontal-rule-line-height;
margin: $horizontal-rule-margin;
border-top: $horizontal-rule-border-style;
} }
/** /**