Skip to content

Commit 7bc0209

Browse files
author
rakeshAlgo
committed
Merge branch 'view-source-url-style' of https://github.com/rakeshAlgo/docs-ui-sandbox-1 into view-source-url-style
2 parents 00cd302 + 39d3a2c commit 7bc0209

File tree

13 files changed

+113
-61
lines changed

13 files changed

+113
-61
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Couchbase Documentation UI
22
// Variables:
3-
:current-release: cloud-17
3+
:current-release: cloud-20
44
// Settings:
55
:!example-caption:
66
:experimental:

src/css/base.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ body {
1616

1717
body {
1818
color: var(--color-text);
19-
font-family: "Open Sans", sans-serif;
20-
/* font-family: "Gotham", sans-serif; */
19+
font-family: "Source Sans Pro", sans-serif;
2120
line-height: var(--line-height-body);
2221
margin: 0;
2322
}
@@ -59,14 +58,14 @@ button::-moz-focus-inner {
5958
code,
6059
kbd,
6160
pre {
62-
/* font-family: "Roboto Mono", monospace; */
63-
font-family: "Source Code Pro", sans-serif;
61+
font-family: 'Source Code Pro', monospace;
6462
}
6563

6664
code {
67-
color: var(--color-brand-black);
68-
font-size: var(--font-base);
65+
background-color: #0074e00e;
66+
font-size: var(--font-small);
6967
word-spacing: -0.125em;
68+
color: var(--color-brand-gray1);
7069
}
7170

7271
html code {
@@ -82,6 +81,13 @@ small {
8281
font-size: 0.8em;
8382
}
8483

84+
em,
85+
i {
86+
font-style: italic;
87+
font-family: "Open Sans", sans-serif;
88+
font-weight: 400;
89+
}
90+
8591
.container,
8692
.container-fluid {
8793
margin: 0 auto;

src/css/component-frame.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161

6262
.frame-dropdown ul {
6363
background: var(--color-brand-white);
64-
min-width: 125px;
6564
border-radius: 0;
6665
/* box-shadow: 0 3px 10px -4px var(--color-brand-gray8); */
6766
margin: 0;
@@ -76,14 +75,13 @@
7675

7776
.frame-dropdown .related {
7877
border-left: 3px solid var(--color-brand-gray8);
78+
min-width: 125px;
7979
}
8080

81-
.frame-dropdown ul.frame-dropdown-list li,
81+
/* .frame-dropdown ul.frame-dropdown-list li,
8282
.frame-dropdown ul.related li {
8383
border-bottom: 1px solid var(--color-brand-gray8);
84-
/* padding-bottom: 5px; */
85-
/* margin-bottom: 5px; */
86-
}
84+
} */
8785

8886
ul.frame-dropdown-list li:last-child,
8987
.frame-dropdown ul.related li:last-child {

src/css/doc.css

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
font-weight: var(--weight-semibold);
1616
letter-spacing: -0.025rem;
1717
line-height: var(--line-height-heading);
18-
margin: 1.5rem 0 -0.25rem;
18+
margin: 1.5rem 0 1rem;
1919
}
2020

2121
.doc h1 {
@@ -32,21 +32,20 @@
3232

3333
.doc h2 {
3434
font-size: var(--heading-h2);
35-
margin: 1.5rem 0 1.5rem;
3635
max-width: fit-content;
3736
display: inline-block;
3837
width: 100%;
3938
/* NOTE used to restrict width of key line */
4039
}
4140

42-
.doc h2::after {
41+
/* .doc h2::after {
4342
content: "";
4443
display: block;
4544
max-width: 5.75rem;
4645
height: 0;
4746
outline: 0.5px solid currentColor;
4847
margin-top: 1.0625rem;
49-
}
48+
} */
5049

5150
.doc h3 {
5251
font-size: var(--heading-h3);
@@ -109,10 +108,10 @@
109108
text-decoration: underline;
110109
}
111110

112-
.doc code {
111+
/* .doc code {
113112
color: var(--color-text);
114113
font-weight: var(--weight-medium);
115-
}
114+
} */
116115

117116
.doc pre code {
118117
display: block;
@@ -484,9 +483,9 @@
484483
}
485484

486485
.doc .exampleblock > .content {
487-
/* background-color: var(--color-shade); */
488-
box-shadow: inset 0 0 1px #bec0c1;
489-
/* padding: 1rem 1.25rem; */
486+
box-shadow: 0 3px 10px #0000000f;
487+
padding: 20px;
488+
border: 1px solid var(--color-brand-gray8);
490489
}
491490

492491
.doc .exampleblock > .content > :first-child {
@@ -540,17 +539,17 @@
540539
position: relative;
541540
}
542541

543-
.doc pre.highlight .hljs-attr {
542+
/* .doc pre.highlight .hljs-attr {
544543
color: var(--hljs-attr);
545-
}
544+
} */
546545

547-
.doc pre.highlight .hljs-string {
546+
/* .doc pre.highlight .hljs-string {
548547
color: var(--hljs-string);
549-
}
548+
} */
550549

551-
.doc pre.highlight .hljs-number {
550+
/* .doc pre.highlight .hljs-number {
552551
color: var(--hljs-number);
553-
}
552+
} */
554553

555554
/* .doc .listingblock code[data-lang]::before {
556555
content: attr(data-lang);
@@ -574,6 +573,11 @@
574573
}
575574
576575
*/
576+
577+
table.tableblock code.language-console.hljs.shell {
578+
white-space: normal;
579+
}
580+
577581
.doc .dlist {
578582
margin: 1.5rem 0;
579583
}

src/css/highlight.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,30 @@ Other CSS rules for styling code blocks:
1818

1919
.hljs-keyword,
2020
.hljs-selector-tag {
21-
color: #66d9ef;
21+
color: var(--hljs-attr);
2222
font-weight: var(--weight-medium);
2323
}
2424

2525
.hljs-subst {
26-
color: #66d9ef;
26+
color: var(--hljs-attr);
2727
}
2828

2929
.hljs-number,
3030
.hljs-literal,
3131
.hljs-variable,
3232
.hljs-tag .hljs-attr {
33-
color: #ae81ff;
33+
color: var(--hljs-number);
3434
}
3535

3636
.hljs-string,
3737
.hljs-doctag {
38-
color: #a6e22e;
38+
color: var(--hljs-string);
3939
}
4040

4141
.hljs-tag,
42-
.hljs-attribute {
43-
color: #f92672;
42+
.hljs-attribute,
43+
.hljs-attr {
44+
color: var(--hljs-attr);
4445
}
4546

4647
.hljs-built_in,

src/css/nav.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
.nav-menu .nav-link,
4848
.nav-menu .nav-text {
4949
display: block;
50+
word-break: break-word;
5051
}
5152

5253
.nav-menu .nav-line {

src/css/site.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700&display=swap");
2-
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');
2+
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&display=swap');
3+
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@300;400;500;600;700&display=swap');
34
@import "common.css";
45
@import "typeface-gotham.css";
56
@import "typeface-roboto-mono.css";

src/css/table.css

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
Responsive Table CSS
33
========================================================================== */
44

5-
table.tableblock * {
5+
table.tableblock,
6+
table.tableblock thead,
7+
table.tableblock tbody,
8+
table.tableblock tfoot,
9+
table.tableblock td,
10+
table.tableblock th {
611
font-family: "Source Sans Pro", sans-serif;
712
}
813

914
table.tableblock {
1015
display: block;
1116
width: 100%;
12-
margin: 1em 0;
1317
border-spacing: 0;
1418
}
1519

@@ -30,16 +34,7 @@ table.tableblock tbody {
3034
overflow-x: auto;
3135
}
3236

33-
table.tableblock td,
34-
table.tableblock th {
35-
line-height: 1.5em;
36-
box-sizing: border-box;
37-
overflow-x: hidden;
38-
overflow-y: auto;
39-
color: var(--color-brand-gray1);
40-
}
41-
42-
table.tableblock th {
37+
table.tableblock thead th {
4338
padding-left: var(--base-small-space);
4439
padding-top: var(--base-space);
4540
padding-bottom: var(--base-space);
@@ -58,7 +53,8 @@ table.tableblock tbody tr {
5853
background: var(--color-brand-gray7);
5954
} */
6055

61-
table.tableblock > tbody td {
56+
table.tableblock > tbody td,
57+
table.tableblock > tbody th {
6258
display: block;
6359
border-bottom: 1px solid var(--color-brand-gray8);
6460
padding-left: var(--base-small-space);
@@ -115,7 +111,6 @@ table.table-tutorial tr td:last-child {
115111
table.tableblock {
116112
display: table;
117113
position: relative;
118-
/* margin-top: 2.5rem; */
119114
}
120115

121116
table.tableblock caption.title {
@@ -124,8 +119,7 @@ table.table-tutorial tr td:last-child {
124119
top: -30px;
125120
}
126121

127-
div + table.tableblock,
128-
div.paragraph + table.tableblock,
122+
div + table.tableblock.caption-table,
129123
div.ulist + table.tableblock,
130124
table.tableblock + table.tableblock {
131125
margin-top: 2.5rem;
@@ -150,7 +144,8 @@ table.table-tutorial tr td:last-child {
150144
}
151145

152146
table.tableblock th,
153-
table.tableblock tbody td {
147+
table.tableblock tbody td,
148+
table.tableblock > tbody th {
154149
display: table-cell;
155150
}
156151

@@ -171,6 +166,15 @@ table.table-tutorial tr td:last-child {
171166
}
172167

173168
@media screen and (max-width: 767px) {
169+
table.tableblock td,
170+
table.tableblock th {
171+
line-height: 1.5em;
172+
box-sizing: border-box;
173+
overflow-x: hidden;
174+
overflow-y: auto;
175+
color: var(--color-brand-gray1);
176+
}
177+
174178
table.tableblock td {
175179
min-width: 14.5rem;
176180
word-break: break-word;

src/css/toc.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
width: inherit; /* for position: fixed */
1212
position: sticky; /* stylelint-disable-line declaration-block-no-duplicate-properties */
1313
top: var(--height-to-body);
14-
max-height: var(--height-nav);
14+
max-height: var(--height-toc-sidebar);
1515
overflow-y: auto;
1616
-ms-overflow-style: none;
1717
scrollbar-width: none;
18+
padding-right: var(--base-space);
1819
}
1920

2021
.sidebar-box::-webkit-scrollbar {

src/css/vars.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
--height-version-control: 4.5rem;
7070
--height-to-body: calc(var(--height-navbar) + var(--height-spacer));
7171
--height-min-body: calc(100vh - var(--height-to-body));
72-
--height-nav: calc(var(--height-min-body) + var(--height-spacer) + var(--height-version-control));
72+
--height-toc-sidebar: calc(var(--height-min-body));
73+
--height-nav: calc(100vh - var(--height-to-body) - var(--height-version-control));
7374
--nav-menu-top-space: calc(var(--height-to-body) + var(--height-version-control));
7475
/* --width-main-gutter: 1.5rem; */
7576
--width-main-gutter: 2.5rem;

0 commit comments

Comments
 (0)