From 422563d767611437e4d117a7f1ae230d806cb1e5 Mon Sep 17 00:00:00 2001 From: marjorie Date: Sun, 3 Mar 2024 15:19:46 -0300 Subject: [PATCH 1/3] style: closes mochajs#3702 - Adds the two-column class with the expected style for two-column unordered lists, making sure to keep the two-column style at Features and Table of Contents - Removes column style from ul element scope --- docs/css/style.css | 9 ++++++--- docs/index.md | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/css/style.css b/docs/css/style.css index 79dbc261e8..86dd53fdd5 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -180,15 +180,18 @@ a.direct-link { ul { box-sizing: content-box; - column-count: 2; - column-gap: 30px; margin-top: 20px; padding: 0 15px; } +h2#table-of-contents + ul, +ul.two-column { + column-count: 2; + column-gap: 30px; +} + ul.single-column, ul.single-column > li > ul { - column-count: 1; margin-top: 0; padding-right: 0; } diff --git a/docs/index.md b/docs/index.md index b6a70eba7c..23a2d2bc4b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -44,6 +44,7 @@ Mocha is a feature-rich JavaScript test framework running on [Node.js][] and in - [before, after, before each, after each hooks](#hooks) - [arbitrary transpiler support (coffee-script etc)](#-compilers) - [TextMate bundle](#textmate) + {:.two-column} ## Table of Contents From 64d8788f01a4348a9c7788a39fe2b79e2bef5936 Mon Sep 17 00:00:00 2001 From: marjorie Date: Tue, 5 Mar 2024 21:56:28 -0300 Subject: [PATCH 2/3] refactor: add two-column class to the toc Use the class two-column instead of applying the style by using its id. --- docs/css/style.css | 1 - docs/index.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/css/style.css b/docs/css/style.css index 86dd53fdd5..c3ad3fa7f9 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -184,7 +184,6 @@ ul { padding: 0 15px; } -h2#table-of-contents + ul, ul.two-column { column-count: 2; column-gap: 30px; diff --git a/docs/index.md b/docs/index.md index 23a2d2bc4b..28013c37dd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -49,6 +49,7 @@ Mocha is a feature-rich JavaScript test framework running on [Node.js][] and in ## Table of Contents {{ toc }} +{:.two-column} ## Installation From cd3c23931442b4d3448ef69d04a8ff629b9ff15b Mon Sep 17 00:00:00 2001 From: marjorie Date: Tue, 5 Mar 2024 21:57:05 -0300 Subject: [PATCH 3/3] refactor: move styles that are overwritten within other classes Move margin-top and padding inside two-column as they are overwritten within single-column. --- docs/css/style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/css/style.css b/docs/css/style.css index c3ad3fa7f9..c36f73c85d 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -180,19 +180,19 @@ a.direct-link { ul { box-sizing: content-box; - margin-top: 20px; - padding: 0 15px; } ul.two-column { column-count: 2; column-gap: 30px; + margin-top: 20px; + padding: 0 15px; } ul.single-column, ul.single-column > li > ul { margin-top: 0; - padding-right: 0; + padding: 0 0 0 15px; } ul li {