Skip to content

Commit

Permalink
chore: switch two-column list styles to be opt-in (#5110)
Browse files Browse the repository at this point in the history
* style: closes #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

* refactor: add two-column class to the toc

Use the class two-column instead of applying the style by using its id.

* refactor: move styles that are overwritten within other classes

Move margin-top and padding inside two-column as they are overwritten
within single-column.
  • Loading branch information
marjys committed Jun 19, 2024
1 parent 2f3fedc commit e030115
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ a.direct-link {

ul {
box-sizing: content-box;
}

ul.two-column {
column-count: 2;
column-gap: 30px;
margin-top: 20px;
Expand All @@ -188,9 +191,8 @@ ul {

ul.single-column,
ul.single-column > li > ul {
column-count: 1;
margin-top: 0;
padding-right: 0;
padding: 0 0 0 15px;
}

ul li {
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ 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

{{ toc }}
{:.two-column}

## Installation

Expand Down

0 comments on commit e030115

Please sign in to comment.