Skip to content

Commit bc671e3

Browse files
committed
refactor: improve README, unify structure, simplify targeting
1 parent 4e9aa18 commit bc671e3

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

boostlook.css

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,57 @@
11
/**
22
* README:
3-
* This stylesheet contains styles for both AsciiDoctor and Antora templates.
4-
* The `boostlook` class is applied across both, but due to differences in their HTML structure,
5-
* specific CSS rules are necessary to target each appropriately.
3+
* This stylesheet provides styles for both AsciiDoctor and Antora templates, using the
4+
* `boostlook` class for a consistent appearance across both templates.
5+
*
6+
* Note: This is a work-in-progress and may continue to evolve as templates and requirements
7+
* change.
68
*
79
* High-Level HTML Structure:
810
*
9-
* - Antora Template:
11+
* - Common Structure:
1012
* <div class="boostlook">
11-
* <div class="card nav-container">...</div>
12-
* <div class="doc">...</div>
13+
* <div class="header">...</div>
14+
* <div class="content">...</div>
15+
* <div class="footer">...</div>
1316
* </div>
1417
*
15-
* - AsciiDoctor Template:
18+
* - AsciiDoctor Example:
1619
* <div class="boostlook">
17-
* <div id="header">...</div>
18-
* <div id="content">...</div>
20+
* <div class="header">
21+
* <h1>...</h1>
22+
* <button id="toggle-toc">Show Table of Contents</button>
23+
* <div id="toc" class="toc2"></div>
24+
* </div>
25+
* <div id="content">
26+
* <div class="sect1">...</div>
27+
* </div>
1928
* <div id="footer">...</div>
2029
* </div>
2130
*
22-
* - For Antora templates:
23-
* The `.boostlook .doc` selector targets elements within the `.doc` class, and the
24-
* `.boostlook .nav-container` selector targets elements within the `.nav-container` class,
25-
* both of which are specific to the Antora HTML structure.
31+
* - Antora Example:
32+
* <div class="boostlook">
33+
* <div class="header">
34+
* <div class="nav-container toc2">...</div>
35+
* </div>
36+
* <div id="content">
37+
* <article class="doc max-width-reset">
38+
* <h1>Getting Started</h1>
39+
* <div class="sect1">...</div>
40+
* </article>
41+
* </div>
42+
* <div id="footer">...</div>
43+
* </div>
2644
*
27-
* - For AsciiDoctor templates:
28-
* The `.boostlook:not(:has(.doc))` selector is used to target elements that do not have
29-
* a `.doc` child, applying styles specific to AsciiDoctor content.
30-
31-
* Since the `.doc` class is not present in the structure above, the styles defined for
32-
* `.boostlook:not(:has(.doc))` will apply.
45+
* - Shared Styles:
46+
* Selectors like `.boostlook .header`, `.boostlook .content`, and `.boostlook .footer`
47+
* apply common styles across both templates.
48+
*
49+
* - Specific Styles:
50+
* Use `.boostlook:not(:has(.doc))` for AsciiDoctor-specific styles and
51+
* `.boostlook .doc` for Antora-specific styles to target unique elements accordingly.
52+
*
53+
* This CSS file aims to simplify maintenance by aligning the HTML structure and
54+
* reducing the need for complex selectors.
3355
*/
3456

3557
/*----------------- Root Variables - Start -----------------*/
@@ -308,7 +330,7 @@ p, h1, h2, h3, h4, h5, h6 {
308330
.boostlook p kbd,
309331
.boostlook p samp,
310332
.boostlook p pre {
311-
background-color: transparent !important;
333+
overflow-x: hidden;
312334
}
313335

314336
.boostlook .content div:has(> table) {
@@ -696,6 +718,7 @@ p, h1, h2, h3, h4, h5, h6 {
696718

697719
.boostlook .doc pre {
698720
padding: initial;
721+
overflow-x: hidden;
699722
}
700723

701724
/* Layout */

0 commit comments

Comments
 (0)