From 7547543dae12f6c2af226a464a6c5a0f989b757d Mon Sep 17 00:00:00 2001 From: Nick DeNardis Date: Wed, 28 Aug 2024 11:17:30 -0400 Subject: [PATCH] fix(Policy Numbering): Policy numbering moved to its own component for now until style can be completed --- resources/scss/components/_content.scss | 93 ------------------- .../scss/components/_policy-numbering.scss | 93 +++++++++++++++++++ resources/scss/main.scss | 1 + 3 files changed, 94 insertions(+), 93 deletions(-) create mode 100644 resources/scss/components/_policy-numbering.scss diff --git a/resources/scss/components/_content.scss b/resources/scss/components/_content.scss index 282e1cff..d4e9e7e9 100644 --- a/resources/scss/components/_content.scss +++ b/resources/scss/components/_content.scss @@ -120,96 +120,3 @@ } } } - -.content > ol.policy-numbering { - counter-reset: section; - list-style-type: none; - line-height: 1.5; - - p { - font-size: 0.9rem; - margin-bottom: 1rem; - margin-top: 1rem; - } - - li { - position: relative; - padding-left: 4rem; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 0.9rem; - - &::before { - counter-increment: section; - content: counters(section, ".") ".0 "; - position: absolute; - left: 0; - } - } - - // Reset the counter for nested lists - ol { - counter-reset: section; - list-style-type: none; - - li { - padding-left: 4rem; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 0.9rem; - } - - li::before { - counter-increment: section; - content: counters(section, ".") " "; - } - } - // Avoid incremeting ul bullets - ul { - counter-reset: section; - - li { - padding-left: 2rem; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 0.9rem; - list-style-type: lower-alpha; - } - - li::before { - display: none; - } - } - - ul li ul { - li { - padding-left: 2rem; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 0.9rem; - list-style-type: lower-roman; - } - - li::before { - display: none; - } - } - - // Third level - ol li ol li { - padding-left: 4rem; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 0.9rem; - list-style-type: none; - } - - // Fourth level - ol li ol li ol li { - padding-left: 4rem; - margin-top: 1rem; - margin-bottom: 1rem; - font-size: 0.9rem; - list-style-type: none; - } -} diff --git a/resources/scss/components/_policy-numbering.scss b/resources/scss/components/_policy-numbering.scss new file mode 100644 index 00000000..82e471e4 --- /dev/null +++ b/resources/scss/components/_policy-numbering.scss @@ -0,0 +1,93 @@ +// Policy numbering style +.content ol.policy-numbering { + counter-reset: section; + list-style-type: none; + line-height: 1.5; + + p { + font-size: 0.9rem; + margin-bottom: 1rem; + margin-top: 1rem; + } + + li { + position: relative; + padding-left: 4rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.9rem; + + &::before { + counter-increment: section; + content: counters(section, ".") ".0 "; + position: absolute; + left: 0; + } + } + + // Reset the counter for nested lists + ol { + counter-reset: section; + list-style-type: none; + + li { + padding-left: 4rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.9rem; + } + + li::before { + counter-increment: section; + content: counters(section, ".") " "; + } + } + // Avoid incremeting ul bullets + ul { + counter-reset: section; + + li { + padding-left: 2rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.9rem; + list-style-type: lower-alpha; + } + + li::before { + display: none; + } + } + + ul li ul { + li { + padding-left: 2rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.9rem; + list-style-type: lower-roman; + } + + li::before { + display: none; + } + } + + // Third level + ol li ol li { + padding-left: 4rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.9rem; + list-style-type: none; + } + + // Fourth level + ol li ol li ol li { + padding-left: 4rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.9rem; + list-style-type: none; + } +} diff --git a/resources/scss/main.scss b/resources/scss/main.scss index 0560ca90..cffd66f7 100644 --- a/resources/scss/main.scss +++ b/resources/scss/main.scss @@ -33,6 +33,7 @@ @import "components/play-video-button"; @import "components/pdf"; @import "components/full-width-styleguide-hero"; +@import "components/policy-numbering"; // Site specific @import "site-specific/theme";