Finesse paragraph indention

This commit is contained in:
Michael Rose 2016-03-25 09:11:13 -04:00
parent 9f63281751
commit 83f519db1e
5 changed files with 19 additions and 17 deletions

View file

@ -62,20 +62,6 @@ del a {
color: inherit; color: inherit;
} }
/* paragraph indents */
p {
margin: 0 0 $indent-var;
// sibling indentation
@if $paragraph-indent == true {
& + p {
text-indent: $indent-var;
margin-top: -($indent-var);
}
}
}
/* reduce orphans and widows when printing */ /* reduce orphans and widows when printing */
p, pre, blockquote, ul, ol, dl, figure, table, fieldset { p, pre, blockquote, ul, ol, dl, figure, table, fieldset {

View file

@ -11,8 +11,9 @@
*/ */
@mixin notice($notice-color) { @mixin notice($notice-color) {
margin: 2em 0; margin: 2em 0 !important; // override
padding: 1em; padding: 1em;
text-indent: initial; // override
background-color: mix(#fff, $notice-color, 90%); background-color: mix(#fff, $notice-color, 90%);
border-radius: $border-radius; border-radius: $border-radius;

View file

@ -64,6 +64,19 @@
p, li { p, li {
font-size: 16px; font-size: 16px;
} }
/* paragraph indents */
p {
margin: 0 0 $indent-var;
// sibling indentation
@if $paragraph-indent == true {
& + p {
text-indent: $indent-var;
margin-top: -($indent-var);
}
}
}
} }
.page__hero { .page__hero {

View file

@ -8,7 +8,9 @@
$doc-font-size : 16; $doc-font-size : 16;
$doc-line-height : 26; $doc-line-height : 26;
$paragraph-indent : false !default;
/* paragraph indention */
$paragraph-indent : false; // true, false (default)
$indent-var : 0rem + ($doc-line-height / $doc-font-size); $indent-var : 0rem + ($doc-line-height / $doc-font-size);
/* system typefaces */ /* system typefaces */

File diff suppressed because one or more lines are too long