diff options
author | Jason Long <jlong@github.com> | 2018-01-17 04:21:53 +0300 |
---|---|---|
committer | Jason Long <jlong@github.com> | 2018-01-17 04:21:53 +0300 |
commit | f4df954d387dbc8c0624773c80dac1f43200ed0f (patch) | |
tree | 79512460d7c5b23a0072511122a128d47d2db70b | |
parent | b560dacf8839cce3165f36c4d21b8a849f91920e (diff) |
And more basic lint fixes
-rw-r--r-- | app/assets/stylesheets/typography.scss | 125 |
1 files changed, 76 insertions, 49 deletions
diff --git a/app/assets/stylesheets/typography.scss b/app/assets/stylesheets/typography.scss index cb7acb7d..61575b66 100644 --- a/app/assets/stylesheets/typography.scss +++ b/app/assets/stylesheets/typography.scss @@ -5,6 +5,7 @@ p { margin: 0 0 $base-line-height / 2; font-size: $base-font-size; line-height: $base-line-height; + small { font-size: $base-font-size - 2; color: $light-font-color; @@ -14,110 +15,132 @@ p { a { color: $link-color; text-decoration: none; - -webkit-transition-property: color; - -moz-transition-property: color; - transition-property: color; - -webkit-transition-duration: 0.3s; - -moz-transition-duration: 0.3s; transition-duration: 0.3s; + transition-property: color; } - // HEADINGS // -------- -h1, h2, h3, h4, h5, h6 { +h1, +h2, +h3, +h4, +h5, +h6 { margin: 0; font-weight: normal; color: $font-color; text-rendering: optimizelegibility; // Fix the character spacing for headings + small { font-weight: normal; color: $light-font-color; } } + h1 { + margin-bottom: 0.4em; font-size: 36px; line-height: $base-line-height * 2; - margin-bottom: 0.4em; + small { font-size: 18px; } } + h2 { + margin-top: 20px; font-size: 18px; + font-weight: bold; line-height: $base-line-height * 2; color: $orange; - font-weight: bold; - margin-top: 20px; + small { font-size: 18px; } } + .callout h2:first-child { - margin-top: 0; + margin-top: 0; } + h3 { line-height: $base-line-height * 1.5; font-size: 16px; font-weight: bold; + small { font-size: 14px; } } -h4, h5, h6 { + +h4, +h5, +h6 { line-height: $base-line-height; } + h4 { font-size: 14px; font-weight: bold; + small { font-size: 12px; } } + aside h4 { + margin-bottom: 1em; color: $light-font-color; line-height: 1.4; - margin-bottom: 1em; } + h5 { font-size: 12px; } + h6 { font-size: 11px; color: $light-font-color; text-transform: uppercase; } - // LISTS // ----- // Unordered and Ordered lists -ul, ol { +ul, +ol { padding: 0; margin: 0 0 $base-line-height / 2 25px; } + ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } + ul { list-style: disc; } + ol { list-style: decimal; } + li { line-height: $base-line-height; } + ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } + ul.bullets li { padding-bottom: 10px; } @@ -126,25 +149,30 @@ ul.bullets li { dl { margin-bottom: $base-line-height; } + dt, dd { line-height: $base-line-height; } + dt { font-weight: bold; line-height: $base-line-height - 1; // fix jank Helvetica Neue font bug } + dd { margin-left: $base-line-height / 2; } + // Horizontal layout (like forms) .dl-horizontal { dt { float: left; - clear: left; width: 120px; + clear: left; text-align: right; } + dd { margin-left: 130px; } @@ -164,9 +192,11 @@ hr { strong { font-weight: bold; } + em { font-style: italic; } + .muted { color: $light-font-color; } @@ -176,6 +206,7 @@ abbr[title] { border-bottom: 1px dotted #ddd; cursor: help; } + abbr.initialism { font-size: 90%; text-transform: uppercase; @@ -186,13 +217,16 @@ blockquote { padding: 0 0 0 15px; margin: 0 0 $base-line-height; border-left: 5px solid $base-border-color; + p { margin-bottom: 0; } + small { display: block; line-height: $base-line-height; color: $light-font-color; + &:before { content: '\2014 \00A0'; } @@ -201,10 +235,11 @@ blockquote { // Float right with text-align: right &.pull-right { float: right; - padding-left: 0; padding-right: 15px; - border-left: 0; + padding-left: 0; border-right: 5px solid $base-border-color; + border-left: 0; + p, small { text-align: right; @@ -215,14 +250,14 @@ blockquote { code { @include border-radius(3px); display: block; - padding: 10px 15px 13px 15px; + padding: 10px 15px 13px; margin-bottom: 1em; - background-color: #fff; - border: solid 1px #efeee6; - color: $orange; + overflow: auto; font-family: $fixed-width-font-family; line-height: $fixed-width-line-height; - overflow: auto; + color: $orange; + background-color: #fff; + border: solid 1px #efeee6; } // Quotes @@ -237,8 +272,8 @@ blockquote:after { address { display: block; margin-bottom: $base-line-height; - line-height: $base-line-height; font-style: normal; + line-height: $base-line-height; } // Tables @@ -246,20 +281,25 @@ table { th { font-weight: bold; } + &.data { margin-bottom: 24px; - th, td { + + th, + td { padding: 2px 0; border-bottom: solid 1px lighten($base-border-color, 10%); } } + td.sweet { - color: #25b028; font-weight: bold; + color: #25b028; } + td.compare { - color: $orange; font-weight: bold; + color: $orange; } } @@ -267,57 +307,44 @@ table { .light { color: $light-font-color; } + small { font-size: 100%; } + cite { font-style: normal; } a.subtle-button { display: inline-block; + padding: 3px 20px; + font-size: 12px; + text-align: center; + background-image: linear-gradient(#f1f1e9, #eae9e1); border-top: solid 1px #dedcd4; - border-left: solid 1px #dedcd4; border-right: solid 1px #dedcd4; border-bottom: solid 1px #cdcbc4; - text-align: center; - font-size: 12px; - padding: 3px 20px; + border-left: solid 1px #dedcd4; @include border-radius(3px); - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f1f1e9), color-stop(100%, #eae9e1)); - background-image: -webkit-linear-gradient(#f1f1e9, #eae9e1); - background-image: -moz-linear-gradient(#f1f1e9, #eae9e1); - background-image: -o-linear-gradient(#f1f1e9, #eae9e1); - background-image: linear-gradient(#f1f1e9, #eae9e1); @include box-shadow(0 1px 0 #f1f1e9); - -webkit-transition-property: background-image; - -moz-transition-property: background-image; - transition-property: background-image; - -webkit-transition-duration: 0.3s; - -moz-transition-duration: 0.3s; transition-duration: 0.3s; + transition-property: background-image; &:hover { color: $link-color; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #edede3), color-stop(100%, #e6e5db)); - background-image: -webkit-linear-gradient(#edede3, #e6e5db); - background-image: -moz-linear-gradient(#edede3, #e6e5db); - background-image: -o-linear-gradient(#edede3, #e6e5db); background-image: linear-gradient(#edede3, #e6e5db); } } a.subtle-button.selected { - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d7d7c1), color-stop(100%, #cbc9b4)); - background-image: -webkit-linear-gradient(#d7d7c1, #cbc9b4); - background-image: -moz-linear-gradient(#d7d7c1, #cbc9b4); - background-image: -o-linear-gradient(#d7d7c1, #cbc9b4); background-image: linear-gradient(#d7d7c1, #cbc9b4); } a#gui-os-filter { display: none; margin-top: 15px; + &.visible { display: inline-block; } |