Skip to content

Commit

Permalink
fix(Policy Numbering): Policy numbering moved to its own component fo…
Browse files Browse the repository at this point in the history
…r now until style can be completed
  • Loading branch information
nickdenardis committed Aug 28, 2024
1 parent 0277e4f commit 7547543
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 93 deletions.
93 changes: 0 additions & 93 deletions resources/scss/components/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
93 changes: 93 additions & 0 deletions resources/scss/components/_policy-numbering.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
1 change: 1 addition & 0 deletions resources/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 7547543

Please sign in to comment.