Skip to content

Commit 9ff11dd

Browse files
committed
css-tidyup
Comments. Merge toc.css and toolbar.css
1 parent dd5e65c commit 9ff11dd

11 files changed

Lines changed: 118 additions & 58 deletions

File tree

src/css/body.css

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
/* NOTE
2-
min-width of flex: 1 container = content-width to prevent wrapping by default;
3-
min-width: 0 lets content wrap */
1+
/** body.css
2+
*
3+
* Styles for body, main, and .nav
4+
* TODO: compare main.css and nav.css
5+
*/
6+
7+
48

59
div.body {
610
display: flex;
@@ -15,6 +19,9 @@ div.body {
1519
margin-top: var(--height-navbar);
1620
}
1721

22+
/* NOTE
23+
min-width of flex: 1 container = content-width to prevent wrapping by default;
24+
min-width: 0 lets content wrap */
1825
main {
1926
flex: 1;
2027
min-width: 0;

src/css/doc.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/** doc.css
2+
*
3+
* Styles for <article class="doc">
4+
*
5+
* Looks like base formatting for the Asciidoc content.
6+
*/
7+
18
.doc {
29
padding-top: 1.25rem;
310
}

src/css/footer.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/** footer.css
2+
*
3+
* Styles for footer
4+
* NB: we have a couple of 'float' declarations below, to investigate.
5+
*/
6+
17
.footer {
28
background-color: var(--color-footer-bg);
39
color: var(--color-footer-text);

src/css/header.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/** header.css
2+
*
3+
* Styles for header
4+
*/
5+
16
.header-top-row {
27
background: var(--color-brand-white);
38
padding: 0 var(--width-container-gutter);
@@ -195,7 +200,7 @@
195200
}
196201

197202
.navbar-dropdown li.current a.navbar-item::before {
198-
content: "\2023";
203+
content: "\2023"; /* ‣ */
199204
position: absolute;
200205
left: -0.75em;
201206
}

src/css/is-this-helpful.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700&display=swap");
3-
42
.is-this-helpful-box * {
53
font-family: "Source Sans Pro", sans-serif;
64
}
@@ -9,7 +7,6 @@
97
display: inline-block;
108
width: 100%;
119
margin-bottom: 25px;
12-
/* border-top: 1px solid #ccc; */
1310
padding-top: 25px;
1411
font-family: "Source Sans Pro", sans-serif;
1512
}

src/css/main.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/** main.css
2+
*
3+
* Styles for:
4+
5+
<main class="article" data-ceiling="topbar">
6+
<div class="article-header">...
7+
<article class="doc">...
8+
9+
*/
10+
111
main {
212
padding-bottom: 4rem;
313
}
@@ -43,6 +53,7 @@ main p {
4353
hyphens: auto; /* NOTE in Chrome, hyphens: auto is only supported on macOS and Android */
4454
}
4555

56+
/* The "You are viewing a pre-release" banner */
4657
.article-banner {
4758
align-items: center;
4859
background: transparent;
@@ -113,7 +124,7 @@ main p {
113124
min-width: 0;
114125
}
115126

116-
/* color css */
127+
/* color css NB: unused? */
117128
.text-color-brand-blue {
118129
color: var(--color-brand-blue);
119130
}

src/css/nav.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/** nav.css
2+
*
3+
* Styles for nav, left-sidebar, menus, and tutorials-filter
4+
*/
5+
16
.left-sidebar {
27
width: 20rem;
38
}

src/css/pagination.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/** pagination.css
2+
*
3+
* Styles for Prev and Next navigation, enabled on some pages
4+
* by e.g.:
5+
* :page-pagination: full
6+
*
7+
* See e.g. https://docs.couchbase.com/php-sdk/current/hello-world/platform-help.html
8+
*/
9+
110
nav.pagination {
211
display: flex;
312
border-top: 1px solid var(--color-border-table);

src/css/site.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
@import "main.css";
2626
@import "pagination.css";
2727
@import "toc.css";
28-
@import "toolbar.css";
2928

3029
/* Landing pages */
3130
@import "home.css";

src/css/toc.css

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/** toc.css
2+
*
3+
* Styles for Table of Contents
4+
* which also includes:
5+
* - Tools (edit on github)
6+
*
7+
* See also: is-it-helpful.css
8+
*/
9+
110
.toc {
211
font-size: 0.875rem;
312
}
@@ -7,22 +16,7 @@
716
line-height: 1;
817
}
918

10-
.sidebar-box {
11-
position: fixed; /* for IE */
12-
width: inherit; /* for position: fixed */
13-
position: sticky; /* stylelint-disable-line declaration-block-no-duplicate-properties */
14-
top: var(--height-to-body);
15-
max-height: var(--height-toc-sidebar);
16-
overflow-y: auto;
17-
-ms-overflow-style: none;
18-
scrollbar-width: none;
19-
padding-right: var(--base-space);
20-
padding-left: var(--base-space);
21-
}
2219

23-
.sidebar-box::-webkit-scrollbar {
24-
width: 0;
25-
}
2620

2721
.toc.embedded .toc-menu {
2822
margin-top: 1rem;
@@ -125,3 +119,57 @@
125119
.toc ul li[data-level="2"] a {
126120
padding-top: 2px;
127121
}
122+
123+
/* Sidebar Box and Tools */
124+
125+
.sidebar-box {
126+
position: fixed; /* for IE */
127+
width: inherit; /* for position: fixed */
128+
position: sticky; /* stylelint-disable-line declaration-block-no-duplicate-properties */
129+
top: var(--height-to-body);
130+
max-height: var(--height-toc-sidebar);
131+
overflow-y: auto;
132+
-ms-overflow-style: none;
133+
scrollbar-width: none;
134+
padding-right: var(--base-space);
135+
padding-left: var(--base-space);
136+
}
137+
138+
.sidebar-box::-webkit-scrollbar {
139+
width: 0;
140+
}
141+
142+
/* Tools e.g. "Edit on Github" */
143+
144+
.sidebar-box .tools {
145+
padding-top: 1.25rem;
146+
display: inline-block;
147+
width: 100%;
148+
}
149+
150+
.tools ul {
151+
margin: 0;
152+
padding: 0;
153+
line-height: 1;
154+
}
155+
156+
.tools .edit {
157+
line-height: 1;
158+
display: inline-block;
159+
width: 100%;
160+
list-style: none;
161+
}
162+
163+
.tools .edit a {
164+
display: inline-block;
165+
white-space: nowrap;
166+
overflow: hidden;
167+
background: url(../img/edit.svg) no-repeat center left;
168+
background-size: 15px;
169+
vertical-align: top;
170+
color: #999;
171+
padding-left: 25px;
172+
padding-top: 0;
173+
padding-bottom: 0;
174+
font-family: "Source Sans Pro", sans-serif;
175+
}

0 commit comments

Comments
 (0)