Skip to content

Commit cfe8cfb

Browse files
Ensure side nav is fixed and footer is below body content only (#26)
* add all the styles and layout updates * fix mobile issues
1 parent 31f1253 commit cfe8cfb

25 files changed

+196
-231
lines changed

preview-src/index.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ Eu mea inani iriure.footnote:[Quisque porta facilisis tortor, vitae bibendum vel
212212

213213
==== Ordered list numeration styles
214214

215+
[.scrolltable]
216+
--
215217
[cols="6*a"]
216218
|===
217219
|`decimal`
@@ -251,6 +253,7 @@ a|[lowergreek]
251253
. Electrons
252254
. Neutrons
253255
|===
256+
--
254257

255258
.Ordered list w/ customized numeration
256259
[upperalpha]

src/css/base.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ html {
1818
}
1919

2020
body {
21+
@include text-body;
22+
2123
background: var(--body-background);
2224
color: var(--body-font-color);
2325
font-family: var(--body-font-family);
2426
line-height: var(--body-line-height);
2527
margin: 0;
2628
tab-size: 4;
2729
word-wrap: anywhere; /* aka overflow-wrap; used when hyphens are disabled or aren't sufficient */
28-
/* ds-text-body */
29-
font-size: var(--ds-space-2);
30-
font-weight: 400;
3130
}
3231

3332
a {

src/css/body.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
display: flex;
44
}
55
}
6+
7+
.content-container {
8+
display: flex;
9+
flex-direction: column;
10+
width: 100%;
11+
}

src/css/doc.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
}
2828
}
2929

30+
@media screen and (min-width: 1024px) and (max-width: 1104px) {
31+
.doc {
32+
max-width: calc(var(--doc-max-width--desktop) - 15rem);
33+
}
34+
}
35+
3036
.doc h1,
3137
.doc h2,
3238
.doc h3,
@@ -279,6 +285,10 @@
279285
font-size: calc(14.5 / var(--rem-base) * 1rem);
280286
}
281287

288+
.doc .scrolltable {
289+
overflow-x: auto;
290+
}
291+
282292
.doc .tablecontainer,
283293
.doc .tablecontainer + *,
284294
.doc :not(.tablecontainer) > table.tableblock,

src/css/docsearch.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ html[data-theme="dark"] .DocSearch .DocSearch-Modal {
8686
--docsearch-logo-color: var(--ds-text-primary);
8787

8888
/* modal */
89-
--docsearch-modal-width: 560px;
89+
--docsearch-modal-width: 720px;
9090
--docsearch-modal-height: 600px;
9191
--docsearch-modal-background: var(--ds-background-body);
9292
--docsearch-modal-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.5), 0 3px 8px 0 rgba(85, 90, 100, 1);

src/css/ds-logo.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ html[data-theme="light"] #datastax-docs-logo-text {
1515
}
1616

1717
#datastax-docs-logo-main {
18-
width: calc(287 / var(--rem-base) * 1rem);
19-
height: calc(40 / var(--rem-base) * 1rem);
18+
width: calc(268 / var(--rem-base) * 1rem);
19+
height: calc(37.46 / var(--rem-base) * 1rem);
2020
}
2121

2222
#datastax-docs-logo-text {
@@ -46,8 +46,8 @@ html[data-theme="light"] #datastax-docs-logo-text {
4646

4747
@media screen and (max-width: 768.5px) {
4848
#datastax-docs-logo-main {
49-
width: calc(162 / var(--rem-base) * 1rem);
50-
height: calc(40 / var(--rem-base) * 1rem);
49+
width: calc(151.57 / var(--rem-base) * 1rem);
50+
height: calc(37.46 / var(--rem-base) * 1rem);
5151
}
5252

5353
html[data-theme="dark"] #datastax-docs-logo-main {

src/css/footer.css

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@ footer.footer {
44
font-size: calc(14.5 / var(--rem-base) * 1rem);
55
line-height: var(--footer-line-height);
66
padding: var(--ds-space-5);
7+
display: flex;
8+
flex: 1;
9+
gap: var(--ds-space-3);
10+
padding-left: var(--ds-space-3);
11+
}
12+
13+
.footer-column {
714
display: flex;
815
flex-direction: column;
9-
align-items: flex-start;
1016
gap: var(--ds-space-3);
11-
flex-shrink: 0;
17+
flex: 1 auto;
18+
}
19+
20+
.footer-column.contact {
21+
align-items: flex-end;
1222
}
1323

1424
.footer p {
@@ -19,18 +29,14 @@ footer.footer {
1929
color: var(--footer-link-font-color);
2030
}
2131

22-
.footer-item {
23-
display: flex;
24-
justify-content: space-between;
25-
align-items: center;
26-
align-self: stretch;
27-
font-size: calc(14.5 / var(--rem-base) * 1rem);
28-
}
29-
3032
.footer--divider {
3133
background: var(--ds-divider);
3234
height: calc(1 / var(--rem-base) * 1rem);
33-
width: 100%;
35+
margin: 0 var(--ds-space-3);
36+
}
37+
38+
.footer--contact-us {
39+
text-align: right;
3440
}
3541

3642
.footer--contact-us a {
@@ -87,6 +93,31 @@ html[data-theme="dark"] {
8793
}
8894
}
8995

96+
@media screen and (max-width: 1023.5px) {
97+
footer.footer {
98+
padding-left: var(--site-padding--mobile);
99+
padding-right: var(--site-padding--mobile);
100+
}
101+
102+
.footer--divider {
103+
margin: 0 var(--site-padding--mobile);
104+
}
105+
}
106+
107+
@media screen and (max-width: 768.5px) {
108+
footer.footer {
109+
flex-wrap: wrap;
110+
}
111+
112+
.footer--contact-us {
113+
text-align: left;
114+
}
115+
116+
.footer-column.contact {
117+
align-items: flex-start;
118+
}
119+
}
120+
90121
@media (prefers-color-scheme: dark) {
91122
:root:not([data-theme="light"]):not([data-theme="dark"]) {
92123
.social-icons a {

src/css/header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ body {
2424
display: flex;
2525
align-items: center;
2626
justify-content: space-between;
27-
padding: 0 var(--site-padding);
27+
padding: 0 var(--ds-space-3) 0 var(--site-padding);
2828
}
2929

3030
.search {

src/css/main.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ main {
22
padding-right: var(--site-padding);
33
}
44

5-
@media screen and (max-width: 1023.5px) {
5+
aside.toc.sidebar {
6+
padding-left: var(--ds-space-3);
7+
}
8+
9+
aside.toc.embedded {
10+
margin-bottom: var(--ds-space-3);
11+
}
12+
13+
@media screen and (max-width: 1329.5px) {
614
aside.toc.sidebar {
715
display: none;
816
}
@@ -16,7 +24,7 @@ main {
1624
}
1725
}
1826

19-
@media screen and (min-width: 1024px) {
27+
@media screen and (min-width: 1330px) {
2028
main {
2129
flex: auto;
2230
min-width: 0; /* min-width: 0 required for flexbox to constrain overflowing elements */
@@ -31,13 +39,13 @@ main {
3139
}
3240

3341
aside.toc.sidebar {
34-
flex: 0 0 var(--toc-width);
42+
flex: 0 0 var(--toc-width--widescreen);
3543
order: 1;
3644
}
3745
}
3846

39-
@media screen and (min-width: 1216px) {
47+
/* @media screen and (min-width: 1330px) {
4048
aside.toc.sidebar {
4149
flex-basis: var(--toc-width--widescreen);
4250
}
43-
}
51+
} */

src/css/pagination.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ nav.pagination {
22
display: flex;
33
border-top: 1px solid var(--toolbar-border-color);
44
line-height: 1;
5-
margin: var(--ds-space-3) calc(var(--ds-space-2h) * -1) calc(var(--ds-space-2h) * -1);
6-
padding: var(--ds-space-1h) var(--ds-space-2) 0;
5+
padding-top: var(--ds-space-2);
6+
margin-top: var(--ds-space-5);
77
}
88

99
nav.pagination span {
@@ -14,12 +14,14 @@ nav.pagination span {
1414

1515
nav.pagination .prev {
1616
padding-right: 0.5rem;
17+
margin-left: var(--ds-space-2);
1718
}
1819

1920
nav.pagination .next {
2021
margin-left: auto;
2122
padding-left: 0.5rem;
2223
text-align: right;
24+
margin-right: var(--ds-space-2);
2325
}
2426

2527
nav.pagination span::before {

0 commit comments

Comments
 (0)