From 31789f3980a128cb4610374110de5dbab6d40710 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Fri, 18 Oct 2024 12:54:42 -0400 Subject: [PATCH 1/9] Updated style for child theme lists to match parent --- web/app/themes/mitlib-child/style.css | 42 +++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/web/app/themes/mitlib-child/style.css b/web/app/themes/mitlib-child/style.css index a946ab43..02efbd83 100644 --- a/web/app/themes/mitlib-child/style.css +++ b/web/app/themes/mitlib-child/style.css @@ -666,12 +666,42 @@ dd.wp-caption-text { margin-top:10px; } -.post ul, -.post ol, -.main-content .entry-content ul, -.main-content .entry-content ol { - margin-left:1em; - margin-bottom: 20px; +.entry-content ol, +.comment-content ol, +.entry-content ul, +.comment-content ul, +.mu_register ul { + margin: 0 0 24px; + margin: 0 0 1.714285714rem; + line-height: 1.714285714; +} +.entry-content ul ul, +.comment-content ul ul, +.entry-content ol ol, +.comment-content ol ol, +.entry-content ul ol, +.comment-content ul ol, +.entry-content ol ul, +.comment-content ol ul { + margin-bottom: 0; +} +.entry-content ul, +.comment-content ul, +.mu_register ul { + list-style: disc outside; +} +.entry-content ul.arrows li{ + list-style: none !important; +} +.entry-content ol, +.comment-content ol { + list-style: decimal outside none; +} +.entry-content li, +.comment-content li, +.mu_register li { + margin: 0 0 0 36px; + margin: 0 0 0 2.571428571rem; } .post:not(:last-of-type):after { From 750e2b7d6cdc05d75eb28fda0ccc4e0a8cc4b06f Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Tue, 22 Oct 2024 10:57:04 -0400 Subject: [PATCH 2/9] Centralized list styles in SCSS --- web/app/themes/mitlib-child/style.css | 46 ------------------- .../themes/mitlib-parent/css/scss/_main.scss | 7 --- .../css/scss/partials/_typography.scss | 31 +++++++++++++ web/app/themes/mitlib-parent/style.css | 38 +-------------- 4 files changed, 32 insertions(+), 90 deletions(-) diff --git a/web/app/themes/mitlib-child/style.css b/web/app/themes/mitlib-child/style.css index 02efbd83..565d8ea1 100644 --- a/web/app/themes/mitlib-child/style.css +++ b/web/app/themes/mitlib-child/style.css @@ -44,14 +44,6 @@ b, strong { word-wrap: normal; } -.childTheme ul { - list-style-type:none; -} - -.childTheme ol { - list-style-type:decimal; -} - .childTheme hr { border:1px solid #eee; margin:2em 0; @@ -666,44 +658,6 @@ dd.wp-caption-text { margin-top:10px; } -.entry-content ol, -.comment-content ol, -.entry-content ul, -.comment-content ul, -.mu_register ul { - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - line-height: 1.714285714; -} -.entry-content ul ul, -.comment-content ul ul, -.entry-content ol ol, -.comment-content ol ol, -.entry-content ul ol, -.comment-content ul ol, -.entry-content ol ul, -.comment-content ol ul { - margin-bottom: 0; -} -.entry-content ul, -.comment-content ul, -.mu_register ul { - list-style: disc outside; -} -.entry-content ul.arrows li{ - list-style: none !important; -} -.entry-content ol, -.comment-content ol { - list-style: decimal outside none; -} -.entry-content li, -.comment-content li, -.mu_register li { - margin: 0 0 0 36px; - margin: 0 0 0 2.571428571rem; -} - .post:not(:last-of-type):after { background:#ccc; content:''; diff --git a/web/app/themes/mitlib-parent/css/scss/_main.scss b/web/app/themes/mitlib-parent/css/scss/_main.scss index 3797d913..3bbc00e6 100644 --- a/web/app/themes/mitlib-parent/css/scss/_main.scss +++ b/web/app/themes/mitlib-parent/css/scss/_main.scss @@ -82,13 +82,6 @@ img { padding: 20px 20px 20px 20px; } -.entry-content ul li { - list-style: disc; - margin-left: 40px; - margin-bottom: 5px; - line-height: 23px; -} - .entry-content ul, #mainContent ul { margin-bottom: 10px; } diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss index ce55fde6..94e4b7e0 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss @@ -32,6 +32,37 @@ h3 { } } +.post, +.entry-content, +.comment-content, +.mu_register { + + ul { + margin: 0 0 1.715rem; + list-style: disc outside; + } + + ol { + list-style: decimal outside none; + } + + ul ul, ol ol, ol ol, ul ol, ol ul { margin-bottom: 0; } + + li { + margin: 0 0 4px 2.25rem; + line-height: 1.6em; + + ol, ul { + margin-top: 4px; + } + } + + ul.arrows li{ + list-style: none !important; + } +} + + a { color: $brand-primary; text-decoration: none; diff --git a/web/app/themes/mitlib-parent/style.css b/web/app/themes/mitlib-parent/style.css index d14a6559..2679c7f0 100644 --- a/web/app/themes/mitlib-parent/style.css +++ b/web/app/themes/mitlib-parent/style.css @@ -728,43 +728,7 @@ article.sticky .featured-post { margin: 0 0 1.714285714rem; line-height: 1.714285714; } -.entry-content ol, -.comment-content ol, -.entry-content ul, -.comment-content ul, -.mu_register ul { - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - line-height: 1.714285714; -} -.entry-content ul ul, -.comment-content ul ul, -.entry-content ol ol, -.comment-content ol ol, -.entry-content ul ol, -.comment-content ul ol, -.entry-content ol ul, -.comment-content ol ul { - margin-bottom: 0; -} -.entry-content ul, -.comment-content ul, -.mu_register ul { - list-style: disc outside; -} -.entry-content ul.arrows li{ - list-style: none !important; -} -.entry-content ol, -.comment-content ol { - list-style: decimal outside none; -} -.entry-content li, -.comment-content li, -.mu_register li { - margin: 0 0 0 36px; - margin: 0 0 0 2.571428571rem; -} + .entry-content blockquote, .comment-content blockquote { margin-bottom: 24px; From 2a354e4d86c81432cf8e2d1f058430557d8afc4d Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Wed, 23 Oct 2024 13:28:37 -0400 Subject: [PATCH 3/9] Tweaks to lists and centralizing heading styles --- web/app/themes/mitlib-child/style.css | 45 +------------ .../css/scss/partials/_typography.scss | 60 +++++++++++++---- web/app/themes/mitlib-parent/style.css | 64 ------------------- 3 files changed, 47 insertions(+), 122 deletions(-) diff --git a/web/app/themes/mitlib-child/style.css b/web/app/themes/mitlib-child/style.css index 565d8ea1..3e4f6aeb 100644 --- a/web/app/themes/mitlib-child/style.css +++ b/web/app/themes/mitlib-child/style.css @@ -597,53 +597,10 @@ dd.wp-caption-text { text-transform: uppercase; } -.entry-content h2 { - font-size:21px; - font-size:1.3rem; - line-height:1.3; - font-weight: 600; - margin-top: .75em; - margin-bottom: .3em; -} - -.entry-content h3 { - margin: 1em 0 .3em 0; - font-size:18px; - font-size:1.1rem; - font-weight: 600; - line-height:1.3; -} - -.entry-content h4 { - margin: 1em 0 .3em 0; - font-size:16px; - font-size:1rem; - font-weight: 600; - line-height:1.3; -} - -.entry-content h5 { - margin: 1em 0 .3em 0; - padding: 0; - font-size:15px; - font-size:.9rem; - font-weight: 600; - line-height:1.3; -} - -.entry-content h6 { - margin: 1em 0 .3em 0; - font-size:13px; - font-size:.8rem; - font-weight: 600; - line-height:1.3; - text-transform: uppercase; -} - .main-content .post h2,.category .post h3,.search .post h3 { font-size:24px; line-height:28px; -} +} */ .post h2 a,.category .post h3 a,.search .post h3 a { color:#333; diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss index 94e4b7e0..7e270fe8 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss @@ -6,44 +6,71 @@ body { } h1 { - @include rem-first(font-size, 2.25); + @include rem-first(font-size, 1.75); font-weight: 400; + line-height: 1.25; } -h2 { - @include rem-first(font-size, 1.825); +h2, h3, h4, h5, h6 { font-weight: 400; - @include bp-tablet--landscape { - font-size: 2.125em; - } - a { - font-weight: 400; - } + margin: 15px 0 10px; + line-height: 1.25; + + a {font-weight: 400;} +} + +h2 { + @include rem-first(font-size, 1.29); + font-weight: 600; } h3 { - font-size: 1.25em; - font-weight: 400; + @include rem-first(font-size, 1.14); + font-weight: 600; +} + +h4 { + @include rem-first(font-size, 1); + font-weight: 700; +} + +h5 { + @include rem-first(font-size, 0.85); + font-weight: 700; +} + +h6 { + @include rem-first(font-size, 0.85); +} + +/* Page specific overrides */ +.page-hours h3 { @include bp-tablet--portrait { font-size: 1.375em; } - a { - font-weight: 400; + margin: 0; +} + +.locationPage h3 { + @include bp-tablet--portrait { + font-size: 1.375em; } } +/* Page / Post Content typography */ .post, .entry-content, .comment-content, .mu_register { ul { - margin: 0 0 1.715rem; list-style: disc outside; + margin: 0 0 1.715rem; } ol { list-style: decimal outside none; + margin: 0 0 1.715rem; } ul ul, ol ol, ol ol, ul ol, ol ul { margin-bottom: 0; } @@ -60,6 +87,11 @@ h3 { ul.arrows li{ list-style: none !important; } + + p { + margin: 0 0 24px; + line-height: 1.7; + } } diff --git a/web/app/themes/mitlib-parent/style.css b/web/app/themes/mitlib-parent/style.css index 2679c7f0..1d38171f 100644 --- a/web/app/themes/mitlib-parent/style.css +++ b/web/app/themes/mitlib-parent/style.css @@ -664,70 +664,6 @@ article.sticky .featured-post { margin-bottom: 1.714285714rem; line-height: 1.25; } -/* .entry-content h2, -.comment-content h2, -.entry-content h3, -.comment-content h3, -.entry-content h4, -.comment-content h4, -.entry-content h5, -.comment-content h5, -.entry-content h6, -.comment-content h6 { - margin: 24px 0; - margin: 1.714285714rem 0; - line-height: 1.714285714; -} */ - - -.entry-content h1, -.comment-content h1 { - font-size: 2rem; - font-size: 28px; - line-height: 1.25; -} -.entry-content h2, -.comment-content h2, -.mu_register h2 { - font-size: 1.285714286rem; - line-height: 1.25; - margin: 15px 0 10px; -} -.entry-content h3, -.comment-content h3 { - font-size: 1.142857143rem; - line-height: 1.25; - margin: 15px 0 10px; -} -.entry-content h4, -.comment-content h4 { - font-size: 14px; - font-size: 1rem; - line-height: 1.846153846; - margin: 15px 0 10px; -} -.entry-content h5, -.comment-content h5 { - font-size: 0.928571429rem; - font-size: 13px; - line-height: 1.846153846; - margin: 15px 0 10px; -} -.entry-content h6, -.comment-content h6 { - font-size: 0.857142857rem; - font-size: 12px; - line-height: 1.846153846; - margin: 15px 0 10px; -} -.entry-content p, -.entry-summary p, -.comment-content p, -.mu_register p { - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - line-height: 1.714285714; -} .entry-content blockquote, .comment-content blockquote { From 9b2d296ee990b6a87632b65a3b7030c6949478c3 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Wed, 30 Oct 2024 09:56:37 -0400 Subject: [PATCH 4/9] Tweaks to line height and spacing between list items --- .../themes/mitlib-parent/css/scss/partials/_typography.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss index 7e270fe8..eb99b6f0 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss @@ -76,11 +76,11 @@ h6 { ul ul, ol ol, ol ol, ul ol, ol ul { margin-bottom: 0; } li { - margin: 0 0 4px 2.25rem; - line-height: 1.6em; + margin: 0 0 8px 2.25rem; + line-height: 1.5em; ol, ul { - margin-top: 4px; + margin-top: 8px; } } From b7310477f5cac1edfeb6f38cbd9c9c9ccb77c9c5 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Wed, 30 Oct 2024 14:35:33 -0400 Subject: [PATCH 5/9] Swapped margin to padding to avoid margin collapse on chrome --- web/app/themes/mitlib-parent/css/scss/partials/_typography.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss index eb99b6f0..abd5af68 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss @@ -80,7 +80,7 @@ h6 { line-height: 1.5em; ol, ul { - margin-top: 8px; + padding-top: 8px; } } From ae6f42635105f35e65e3bdfcc0f7252d852ab0b0 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Thu, 31 Oct 2024 09:53:11 -0400 Subject: [PATCH 6/9] Incrementing versions for parent and child theme style sheets --- web/app/themes/mitlib-child/style.css | 2 +- web/app/themes/mitlib-parent/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/themes/mitlib-child/style.css b/web/app/themes/mitlib-child/style.css index 3e4f6aeb..a7c640c5 100644 --- a/web/app/themes/mitlib-child/style.css +++ b/web/app/themes/mitlib-child/style.css @@ -1,7 +1,7 @@ /* Theme Name: MITlib Child Author: MIT Libraries -Version: 1.0.2 +Version: 1.0.3 Description: A child theme of the MIT Libraries' parent, focused on sites built primarily with static pages. Template: mitlib-parent diff --git a/web/app/themes/mitlib-parent/style.css b/web/app/themes/mitlib-parent/style.css index 1d38171f..c379f07e 100644 --- a/web/app/themes/mitlib-parent/style.css +++ b/web/app/themes/mitlib-parent/style.css @@ -1,7 +1,7 @@ /* Theme Name: MITlib Parent Author: MIT Libraries -Version: 0.5 +Version: 0.6 Description: The parent theme for the MIT Libraries' Pentagram-designed identity. */ From 4d99c29940d84cd7fa3747d4d6c82b71aed783a7 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Thu, 31 Oct 2024 10:18:14 -0400 Subject: [PATCH 7/9] Removing errant end comment --- web/app/themes/mitlib-child/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/themes/mitlib-child/style.css b/web/app/themes/mitlib-child/style.css index a7c640c5..8ca2be33 100644 --- a/web/app/themes/mitlib-child/style.css +++ b/web/app/themes/mitlib-child/style.css @@ -600,7 +600,7 @@ dd.wp-caption-text { .main-content .post h2,.category .post h3,.search .post h3 { font-size:24px; line-height:28px; -} */ +} .post h2 a,.category .post h3 a,.search .post h3 a { color:#333; From ee99a446bdc373ecdcffd27fb91b8710e839a5a5 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Wed, 6 Nov 2024 08:50:15 -0500 Subject: [PATCH 8/9] Changed child theme version from semantic to X.Y --- web/app/themes/mitlib-child/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/themes/mitlib-child/style.css b/web/app/themes/mitlib-child/style.css index 8ca2be33..23f882aa 100644 --- a/web/app/themes/mitlib-child/style.css +++ b/web/app/themes/mitlib-child/style.css @@ -1,7 +1,7 @@ /* Theme Name: MITlib Child Author: MIT Libraries -Version: 1.0.3 +Version: 1.3 Description: A child theme of the MIT Libraries' parent, focused on sites built primarily with static pages. Template: mitlib-parent From 1e2d4822d92feaef8f8bd2a96880e09020250a06 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Wed, 6 Nov 2024 09:18:42 -0500 Subject: [PATCH 9/9] ** Why are these changes being introduced: This commit splits out overrides for typography from the typography partial into existing partials for locations, home, and hours. This commit also includes a couple new overrides for home that were needed to bring centralized typography in line with produciton for the homepage. ** Relevant ticket(s): https://mitlibraries.atlassian.net/browse/PW-112 ** How does this address that need: * ** Document any side effects to this change: None observed. * --- .../mitlib-parent/css/scss/partials/_home.scss | 14 +++++++++++++- .../css/scss/partials/_locations.scss | 5 +++++ .../css/scss/partials/_typography.scss | 14 -------------- .../css/scss/partials/pages/_hours.scss | 8 ++++++++ 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_home.scss b/web/app/themes/mitlib-parent/css/scss/partials/_home.scss index 49d9c442..1c896f69 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_home.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_home.scss @@ -5,7 +5,7 @@ body.page-home { color: #fff; } -// this rule restricts old and poorly scoped header styling to the main libraries homepage +// these rules override our central typography styles to preserve the original design of the homepage .libraries-home { h1, @@ -13,6 +13,18 @@ body.page-home { h3 { font-weight: 300; } + + h2 { + @include rem-first(font-size, 2.125); + margin: 0; + } + + .wrap-loc-info, .excerpt-news { + h3 { + @include rem-first(font-size, 1.375); + margin: 0; + } + } } .home { diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_locations.scss b/web/app/themes/mitlib-parent/css/scss/partials/_locations.scss index e7432c60..2e00717f 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_locations.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_locations.scss @@ -1,4 +1,9 @@ .locationPage { + h3 { + @include bp-tablet--portrait { + font-size: 1.375em; + } + } .reserve { background: #666; color: #fff; diff --git a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss index abd5af68..6a4cedfb 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/_typography.scss @@ -43,20 +43,6 @@ h6 { @include rem-first(font-size, 0.85); } -/* Page specific overrides */ -.page-hours h3 { - @include bp-tablet--portrait { - font-size: 1.375em; - } - margin: 0; -} - -.locationPage h3 { - @include bp-tablet--portrait { - font-size: 1.375em; - } -} - /* Page / Post Content typography */ .post, .entry-content, diff --git a/web/app/themes/mitlib-parent/css/scss/partials/pages/_hours.scss b/web/app/themes/mitlib-parent/css/scss/partials/pages/_hours.scss index ac398e16..1b64def2 100644 --- a/web/app/themes/mitlib-parent/css/scss/partials/pages/_hours.scss +++ b/web/app/themes/mitlib-parent/css/scss/partials/pages/_hours.scss @@ -450,3 +450,11 @@ div.libraryAlert { width: 100% !important; } } + +/* Overriding new centralized heading styles */ +.page-hours h3 { + @include bp-tablet--portrait { + font-size: 1.375em; + } + margin: 0; +}