From 0d6d6feac1998647c83e5e55a18c83526461495f Mon Sep 17 00:00:00 2001 From: Prabhdip Gill Date: Tue, 22 Oct 2024 11:35:59 -0700 Subject: [PATCH] Add margin-left to FirstLevelOrderedList in cardboard --- CHANGELOG.md | 1 + styles/books/computer-science/book.scss | 22 +++++++++ styles/output/computer-science-pdf.css | 66 ++++++++++++------------- 3 files changed, 56 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd697ef47..76de1a0bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Make `FirstLevelOrderedList` margins adjustable in `cardboard` - Make `FirstLevelUnorderedList` margins adjustable in `cardboard` +- Set `FirstLevelOrderedList` left to `h-spacing(5)` in `computer-science` ## [v2.6.0] - 2024-10-01 diff --git a/styles/books/computer-science/book.scss b/styles/books/computer-science/book.scss index ef376cdba..7b4fb3a47 100644 --- a/styles/books/computer-science/book.scss +++ b/styles/books/computer-science/book.scss @@ -140,6 +140,28 @@ $bandColor: #24739E; ), )); +@each $key in ( + PageLists, + CompositePageLists, + ExercisesProblemQuestionLists, + ExercisesSolutionLists, + NotesLists, + StepwiseLists, + LearningObjectives, + FakeTitleTable, + DefaultTable, + CondensedDefaultTable, + TextHeavyWithTitleTable, +) { + @include add_settings(( + $key: ( + FirstLevelOrderedList: ( + margin-left: h-spacing(5), + ), + ) + )) +} + // Common settings @include use('BookRoot', "common:::BookRoot"); @include use('Footnote', 'common:::FootnoteShape'); diff --git a/styles/output/computer-science-pdf.css b/styles/output/computer-science-pdf.css index e57fc9802..524018a24 100644 --- a/styles/output/computer-science-pdf.css +++ b/styles/output/computer-science-pdf.css @@ -2420,7 +2420,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table.os-top-titled-container > table > tbody > tr:not(:first-child):not(.gray-shading):not(.yellow-shading):not(.purple-shading) > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table.os-top-titled-container > table > tbody > tr:not(:first-child):not(.gray-shading):not(.yellow-shading):not(.purple-shading)[data-valign=top] { @@ -2466,7 +2466,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table.os-top-titled-container > table > tbody > tr:first-child:not(.gray-shading):not(.yellow-shading):not(.purple-shading) > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table.os-top-titled-container > table > tbody > tr:first-child:not(.gray-shading):not(.yellow-shading):not(.purple-shading)[data-valign=top] { @@ -2569,7 +2569,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table.os-top-titled-container > table > tbody > .gray-shading > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table.os-top-titled-container > table > tbody > .gray-shading[data-valign=top] { @@ -2619,7 +2619,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table.os-top-titled-container > table > tbody > .purple-shading > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table.os-top-titled-container > table > tbody > .purple-shading[data-valign=top] { @@ -2669,7 +2669,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table.os-top-titled-container > table > tbody > .yellow-shading > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table.os-top-titled-container > table > tbody > .yellow-shading[data-valign=top] { @@ -3028,7 +3028,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > tr:not(:first-child):not(.gray-shading):not(.yellow-shading):not(.purple-shading) > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > tr:not(:first-child):not(.gray-shading):not(.yellow-shading):not(.purple-shading)[data-valign=top] { @@ -3074,7 +3074,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > tr:first-child:not(.gray-shading):not(.yellow-shading):not(.purple-shading) > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > tr:first-child:not(.gray-shading):not(.yellow-shading):not(.purple-shading)[data-valign=top] { @@ -3177,7 +3177,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > .gray-shading > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > .gray-shading[data-valign=top] { @@ -3227,7 +3227,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > .purple-shading > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > .purple-shading[data-valign=top] { @@ -3277,7 +3277,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > .yellow-shading > td > ol { - margin-left: 24px; + margin-left: 40px; } .os-table:not(.os-text-heavy-top-titled-container):not(.os-unstyled-container):not(.os-text-heavy-container):not(.os-timeline-table-container):not(.os-data-table-container) > table > tbody > .yellow-shading[data-valign=top] { @@ -3528,7 +3528,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page]:not(.introduction):not(.unit-opener) .learning-objectives > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page]:not(.introduction):not(.unit-opener) .learning-objectives > ol > li { @@ -4374,7 +4374,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=note] > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=note] > ol > li > ol { @@ -4398,7 +4398,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=note] > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=note] > div > ol > li > ol { @@ -4414,7 +4414,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=note] > div > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=composite-page] > section > ul:not([data-labeled-item=true]) { @@ -4430,7 +4430,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=composite-page] > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=composite-page] > section > ol > li > ul { @@ -4454,7 +4454,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=composite-page] > section > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=composite-page] > section > section > ol > li > ul { @@ -4470,7 +4470,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=composite-page] > section > section > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=composite-page] > div > div > section > ul:not([data-labeled-item=true]) { @@ -4486,7 +4486,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=composite-page] > div > div > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=composite-page] > div > div > section > ol > li > ul { @@ -4510,7 +4510,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=composite-page] > section > section > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=composite-page] > section > section > section > ol > li > ul { @@ -4534,7 +4534,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > ol > li > ol { @@ -4546,7 +4546,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > section > ol > li > ol { @@ -4574,7 +4574,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > section > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > section > section > ul:not([data-labeled-item=true]) { @@ -4598,7 +4598,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > section > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > section > section > ol > li > ul { @@ -4630,7 +4630,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > section > section > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > section > section > section > ol > li > ul { @@ -4654,7 +4654,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > section > section > section > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > section > section > section > section > ol > li > ul { @@ -4678,7 +4678,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > div > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=page] > div > div > ol > li > ul { @@ -4694,7 +4694,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=page] > div > div > section > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=problem] > ul:not([data-labeled-item=true]) { @@ -4702,7 +4702,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=problem] > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=problem] > div > ul:not([data-labeled-item=true]) { @@ -4718,7 +4718,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=problem] > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=problem] > div > ol > li > ol { @@ -4742,7 +4742,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=problem] > div > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=problem] > div > div > ol > li > ol { @@ -4758,7 +4758,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=exercise-question] > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=exercise-question] > div > ul:not([data-labeled-item=true]) { @@ -4774,7 +4774,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=exercise-question] > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=exercise-question] > div > ol > li > ol { @@ -4798,7 +4798,7 @@ h4.os-subtitle + .os-figure:not(.has-splash) > figure { } [data-type=exercise-question] > div > div > ol { - margin-left: 24px; + margin-left: 40px; } [data-type=exercise-question] > div > div > ol > li > ol {