diff --git a/examples/rhdocs-content.js b/examples/rhdocs-content.js index a728cff..cb242e3 100644 --- a/examples/rhdocs-content.js +++ b/examples/rhdocs-content.js @@ -3257,13 +3257,10 @@ Prism.languages.py = Prism.languages.python; // Make sure we're dealing with a pre element, which could be the element or it's parent if ($codeBlock.tagName.toLowerCase() !== 'pre') { - if ( - $codeBlock.parentElement && - $codeBlock.parentElement.tagName.toLowerCase() === 'pre' - ) { + if ($codeBlock.parentElement && $codeBlock.parentElement.tagName.toLowerCase() === 'pre') { $codeBlock = $codeBlock.parentElement; } - else { + else { // If the element or it's parent isn't a pre-tag don't format it return; } @@ -3603,4 +3600,4 @@ Prism.languages.py = Prism.languages.python; addPrintButton($headerSecondaryWrapper); } }); -})(); \ No newline at end of file +})(); diff --git a/examples/rhdocs.css b/examples/rhdocs.css index acd93b9..f39307c 100755 --- a/examples/rhdocs.css +++ b/examples/rhdocs.css @@ -302,16 +302,23 @@ background: inherit; } .rhdocs kbd, -.pvof-doc__wrapper kbd { +.rhdocs .keycap, +.pvof-doc__wrapper kbd, +.pvof-doc__wrapper .keycap { margin: 0 0.25rem; padding: 0.125rem 0.375rem; border-radius: 0.1875rem; - font-family: RedHatMono, "Red Hat Mono", "Consolas", monospace; font-size: 90%; + font-family: RedHatMono, "Red Hat Mono", "Consolas", monospace; + font-weight: 400; background-color: #eee; background-image: linear-gradient(to bottom, #ddd, #eee, #fff); box-shadow: 0 -0.0625rem 0 0 #fff, 0 0.0625rem 0 0.1875rem #aaa; } +.rhdocs .keycap strong, +.pvof-doc__wrapper .keycap strong { + font-weight: inherit; +} .rhdocs kbd.keyseq, .pvof-doc__wrapper kbd.keyseq { padding: 0; @@ -776,7 +783,7 @@ th { ._additional-resources[class][class] { margin: 2em 0 4em; - padding: 1.5rem; + padding: 2rem 2rem 1rem; border: 0.0625rem solid #d2d2d2; border-radius: 0.1875rem; background: #fff; @@ -791,17 +798,23 @@ th { ._additional-resources[class][class] h5, ._additional-resources[class][class] h6, ._additional-resources[class][class] .heading, +._additional-resources[class][class] p.title, ._additional-resources[class][class] .additional-resources__heading { - margin: 0 0 1.5rem; + display: block; + margin: 0 0 0.5rem; padding: 0; - font-size: 1.25rem; + font-size: 1.125rem; line-height: 1.5rem; + font-family: RedHatDisplay, "Red Hat Display", "Helvetica Neue", Arial, sans-serif; + font-weight: 400; + text-transform: uppercase; } ._additional-resources[class][class] ul { position: relative; margin: 0; padding: 0; list-style: none; + border: 0; } .related-topic-content__wrapper ._additional-resources[class][class] ul { display: block; @@ -1058,6 +1071,64 @@ th { height: 1rem; } +/** + * These are the styles for line numbers that are highlighted/annotated + */ +.conum, +.colist > ol > li:before, +.pvof-doc__wrapper .callout { + position: relative; + top: -0.125em; + display: inline-block; + width: 1.25rem; + height: 1.25rem; + padding: 0; + border-radius: 50%; + font-size: 0.75rem; + line-height: 1.35rem; + font-family: RedHatText, "Red Hat Text", "Helvetica Neue", Arial, sans-serif; + color: #fff; + font-weight: 600; + font-style: normal; + text-align: center; + vertical-align: middle; + background: #06c; +} + +.colist > ol, +.pvof-doc__wrapper .calloutlist > ol { + margin: 1rem 0 2rem; + padding: 0; + list-style: none; + counter-reset: colist; +} +.colist > ol > li, +.pvof-doc__wrapper .calloutlist > ol > li { + position: relative; + margin: 0.5rem 0; + padding-left: 1.75rem; + counter-increment: colist; + font-size: 1rem; +} +.colist > ol > li .colist-num, +.pvof-doc__wrapper .calloutlist > ol > li .colist-num { + display: none; +} +.colist > ol > li:before, +.pvof-doc__wrapper .calloutlist > ol > li:before { + content: counter(colist); + position: absolute; + top: 0.1875rem; + left: 0; +} + +.pvof-doc__wrapper .calloutlist dt { + float: left; + clear: left; + margin: 0; + padding: 0 0.5rem 0 0; +} + .rhdocs__guides-list__wrapper { margin: 0 0 2em; padding: 1.5rem 1.5rem 2em; @@ -1111,7 +1182,7 @@ th { .included-in-guides[class] { margin: 2em 0 4em; - padding: 1.5rem; + padding: 2rem 2rem 1rem; border: 0.0625rem solid #d2d2d2; border-radius: 0.1875rem; background: #fff; @@ -1126,17 +1197,23 @@ th { .included-in-guides[class] h5, .included-in-guides[class] h6, .included-in-guides[class] .heading, +.included-in-guides[class] p.title, .included-in-guides[class] .additional-resources__heading { - margin: 0 0 1.5rem; + display: block; + margin: 0 0 0.5rem; padding: 0; - font-size: 1.25rem; + font-size: 1.125rem; line-height: 1.5rem; + font-family: RedHatDisplay, "Red Hat Display", "Helvetica Neue", Arial, sans-serif; + font-weight: 400; + text-transform: uppercase; } .included-in-guides[class] ul { position: relative; margin: 0; padding: 0; list-style: none; + border: 0; } .related-topic-content__wrapper .included-in-guides[class] ul { display: block; @@ -1523,49 +1600,6 @@ rh-table table { margin-top: 0; } -.conum, -.colist > ol > li:before { - position: relative; - top: -0.125em; - display: inline-block; - width: 1.25rem; - height: 1.25rem; - padding: 0; - border-radius: 50%; - font-size: 0.75rem; - line-height: 1.35rem; - font-family: RedHatText, "Red Hat Text", "Helvetica Neue", Arial, sans-serif; - color: #fff; - font-weight: 600; - font-style: normal; - text-align: center; - vertical-align: middle; - background: #06c; -} - -.colist > ol { - margin: 1rem 0 2rem; - padding: 0; - list-style: none; - counter-reset: colist; -} -.colist > ol > li { - position: relative; - margin: 0.5rem 0; - padding-left: 1.75rem; - counter-increment: colist; - font-size: 1rem; -} -.colist > ol > li .colist-num { - display: none; -} -.colist > ol > li:before { - content: counter(colist); - position: absolute; - top: 0.1875rem; - left: 0; -} - .literalblock, .listingblock { margin: 1rem 0; @@ -1933,22 +1967,10 @@ pre[class*=language-] { color: #c9190b; } -.masthead { - position: relative; - z-index: 1; -} - -[data-drupal-messages] { - position: relative; - z-index: 1; -} - -.main-content[class] { - padding: 0; -} - -.rhdocs--pantheon-2 { - padding: 0; +.rhdocs.local-render { + max-width: 45.8125rem; + margin: 0 auto; + padding: 0 1.5rem; } @media (min-width: 1100px) { diff --git a/js/rhdocs-content.js b/js/rhdocs-content.js index eb5482e..8761b31 100644 --- a/js/rhdocs-content.js +++ b/js/rhdocs-content.js @@ -66,13 +66,10 @@ // Make sure we're dealing with a pre element, which could be the element or it's parent if ($codeBlock.tagName.toLowerCase() !== 'pre') { - if ( - $codeBlock.parentElement && - $codeBlock.parentElement.tagName.toLowerCase() === 'pre' - ) { + if ($codeBlock.parentElement && $codeBlock.parentElement.tagName.toLowerCase() === 'pre') { $codeBlock = $codeBlock.parentElement; } - else { + else { // If the element or it's parent isn't a pre-tag don't format it return; } @@ -412,4 +409,4 @@ addPrintButton($headerSecondaryWrapper); } }); -})(); \ No newline at end of file +})(); diff --git a/scss/20_base/_base.scss b/scss/20_base/_base.scss index 6af9ba4..e8a54de 100644 --- a/scss/20_base/_base.scss +++ b/scss/20_base/_base.scss @@ -257,17 +257,23 @@ background: inherit; } - kbd { + kbd, + .keycap { // PV1 margin: 0 4px; padding: 2px 6px; border-radius: 3px; - font-family: $font-family--code; font-size: 90%; + font-family: $font-family--code; + font-weight: 400; background-color: #eee; background-image: linear-gradient(to bottom, #ddd, #eee, #fff); box-shadow: 0 -1px 0 0 #fff, 0 1px 0 3px #aaa; } + .keycap strong { // PV1 + font-weight: inherit; + } + kbd.keyseq { padding: 0; border: 0; diff --git a/scss/30_components/_codeblock.scss b/scss/30_components/_codeblock.scss index 4355684..cd2c54a 100644 --- a/scss/30_components/_codeblock.scss +++ b/scss/30_components/_codeblock.scss @@ -87,3 +87,70 @@ height: 16px; } } + +/** + * These are the styles for line numbers that are highlighted/annotated + */ +.conum, +.colist > ol > li:before, +.pvof-doc__wrapper .callout { // PV1 + position: relative; + top: -0.125em; + display: inline-block; + width: 1.25rem; + height: 1.25rem; + padding: 0; + border-radius: 50%; + font-size: 0.75rem; + line-height: 1.35rem; // For some reason, with Overpass, this looks better. + font-family: $font-family--base; + color: #fff; + font-weight: 600; + font-style: normal; + text-align: center; + vertical-align: middle; + background: $color--link; +} + +.colist, +%colist { + > ol, + %colist-list-wrapper { + margin: 1rem 0 2rem; + padding: 0; + list-style: none; + counter-reset: colist; + + > li, + %colist-list-item { + position: relative; + margin: 0.5rem 0; + padding-left: 1.75rem; + counter-increment: colist; + font-size: 1rem; + + .colist-num { + display: none; + } + + &:before { + content: counter(colist); + position: absolute; + top: 3px; + left: 0; + } + } + } +} + +// PV1 +.pvof-doc__wrapper .calloutlist { + @extend %colist; + + dt { + float: left; + clear: left; + margin: 0; + padding: 0 8px 0 0; + } +} diff --git a/scss/30_components/_styles.scss b/scss/30_components/_styles.scss index 1bdefea..9afd011 100644 --- a/scss/30_components/_styles.scss +++ b/scss/30_components/_styles.scss @@ -157,73 +157,6 @@ rh-table { } } -// This was an element we used in Pantheon 2 to link to certain modules, -// it was injected by the CMS -// .pantheon-anchor-div { -// position: relative; -// top: -70px; - -// .toolbar-fixed & { -// top: -50px; -// } - -// .tool-bar-tray-open { -// top: -90px; -// } - -// @include breakpoint(lima) { -// top: -10px; -// } -// } - -.conum, -.colist > ol > li:before { - position: relative; - top: -0.125em; - display: inline-block; - width: 1.25rem; - height: 1.25rem; - padding: 0; - border-radius: 50%; - font-size: 0.75rem; - line-height: 1.35rem; // For some reason, with Overpass, this looks better. - font-family: $font-family--base; - color: #fff; - font-weight: 600; - font-style: normal; - text-align: center; - vertical-align: middle; - background: $color--link; -} - -.colist { - > ol { - margin: 1rem 0 2rem; - padding: 0; - list-style: none; - counter-reset: colist; - - > li { - position: relative; - margin: 0.5rem 0; - padding-left: 1.75rem; - counter-increment: colist; - font-size: 1rem; - - .colist-num { - display: none; - } - - &:before { - content: counter(colist); - position: absolute; - top: 3px; - left: 0; - } - } - } -} - .literalblock, .listingblock { margin: 1rem 0; diff --git a/scss/40_layout/_page-layout.scss b/scss/40_layout/_page-layout.scss index c1e8b62..ef97ffc 100644 --- a/scss/40_layout/_page-layout.scss +++ b/scss/40_layout/_page-layout.scss @@ -1,26 +1,11 @@ @use 'sass:math'; -// @todo Portal Hacks that probably shouldn't be in this stylesheet -// ----------------------------------------------------- +$content__max-width: 685px; -.masthead { - position: relative; - z-index: 1; -} - -[data-drupal-messages] { - position: relative; - z-index: 1; -} - -.main-content[class] { - padding: 0; -} -// ----------------------------------------------------- -// @note End portal hacks - -.rhdocs--pantheon-2 { - padding: 0; +.rhdocs.local-render { + max-width: ($content__max-width + 48px); + margin: 0 auto; + padding: 0 24px; } .rh-docs__content-wrapper { diff --git a/scss/_core/_mixins.scss b/scss/_core/_mixins.scss index 5ef0c9b..21f1f57 100644 --- a/scss/_core/_mixins.scss +++ b/scss/_core/_mixins.scss @@ -9,7 +9,7 @@ @mixin related-content-box { margin: 2em 0 4em; - padding: 24px; + padding: 32px 32px 16px; border: 1px solid #d2d2d2; border-radius: 3px; background: #fff; @@ -25,11 +25,16 @@ h5, h6, .heading, + p.title, // PV1 .additional-resources__heading { - margin: 0 0 24px; + display: block; + margin: 0 0 8px; padding: 0; - font-size: 20px; + font-size: 18px; line-height: 24px; + font-family: $font-family--title; + font-weight: 400; + text-transform: uppercase; } ul { @@ -37,6 +42,7 @@ margin: 0; padding: 0; list-style: none; + border: 0; // Seen the ul with _additional-resources class .related-topic-content__wrapper & { display: block;