Skip to content

Commit 4a24503

Browse files
authored
style: update docs UI styles for improved contrast and clarity (#994)
* style: update UI styles for improved contrast and clarity * style: remove background-blend-mode from base.css * style: update docs nav download button colors * fix: adjust scroll position calculation for toolbar * style: remove height from snippet-image class * fix: anchor scroll positioning & TOC highlighting bugs * style: remove unused alignment helper classes * style: update button styles and navbar links for landing page * style: improve logo contrast and clean up nav styles * style: refactor dark theme styles and button colors for landing page * style: improve UI contrast and navbar interactions * style: add primary color variables and backdrop filter * style: update nav colors and background styles * feat: add static documentation generation script * style: flip ui illustrations horizontally * chore: add generated index.html for Netlify deployment * style: enhance documentation panel typography and layout * style: refine documentation panel font colors and sizes * style: remove contrast class from footer links * style: enhance table icons and add new color variable * style: add box-shadow to table icons for depth * style: update table border color and selector specificity * style: center-align table cells with images * style: make selected bottom border transparent * chore: remove index.html and update .gitignore for merging * style: add background color to first row of tables * style: update first tr background-color only * style: set first row (tbody) background to transparent * style: refine table row background color selectors * style: ensure landing page navbar matches docs
1 parent f7fc156 commit 4a24503

File tree

18 files changed

+542
-311
lines changed

18 files changed

+542
-311
lines changed

docs/shared/logo.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
font-weight: 700;
2626
color: #fff;
2727
white-space: nowrap;
28+
font-size: 1rem;
2829
}
2930

3031
@media (max-width: 576px) {

docs/ui/src/css/base.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ html {
1616
radial-gradient(ellipse 100% 100% at 80% 100%, rgba(89, 36, 99, 0.8), transparent 60%),
1717
linear-gradient(135deg, #124b83, #124b83, #124b83);
1818
background-attachment: fixed;
19-
background-blend-mode: screen;
2019
background-size: cover;
2120
background-repeat: no-repeat;
2221
}
@@ -118,7 +117,7 @@ object[type="image/svg+xml"]:not([width]) {
118117
}
119118

120119
::placeholder {
121-
opacity: 0.5;
120+
opacity: 0.75;
122121
}
123122

124123
@media (pointer: fine) {

docs/ui/src/css/doc.css

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.doc {
2-
color: var(--doc-font-color);
2+
color: var(--doc-font-color) !important;
33
font-size: var(--doc-font-size);
44
hyphens: auto;
55
line-height: var(--doc-line-height);
@@ -250,6 +250,14 @@
250250
margin-top: 1.5rem;
251251
}
252252

253+
.doc table.tableblock tr:first-child {
254+
background-color: rgba(0, 0, 0, 0.1);
255+
}
256+
257+
.doc table.tableblock thead ~ tbody tr:first-child {
258+
background-color: transparent;
259+
}
260+
253261
.doc table.tableblock {
254262
font-size: calc(15 / var(--rem-base) * 1rem);
255263
}
@@ -277,7 +285,7 @@
277285

278286
.doc table.tableblock,
279287
.doc table.tableblock > * > tr > * {
280-
border: 0 solid var(--table-border-color);
288+
border: 0 solid rgba(255, 255, 255, 0.4);
281289
}
282290

283291
.doc table.grid-all > * > tr > * {
@@ -407,13 +415,13 @@
407415

408416
.doc .admonitionblock td.icon i {
409417
align-items: center;
410-
border-radius: 0.45rem;
411418
display: inline-flex;
412419
filter: initial;
413420
height: 1.25rem;
414421
padding: 0 0.5rem;
415422
vertical-align: initial;
416423
width: fit-content;
424+
box-shadow: 2px 2px #000;
417425
}
418426

419427
.doc .admonitionblock td.icon i::after {
@@ -1067,6 +1075,38 @@
10671075
margin: 2rem 0 0;
10681076
}
10691077

1078+
.doc table.tableblock a img {
1079+
width: 28px !important;
1080+
height: 28px !important;
1081+
}
1082+
1083+
.doc table.tableblock a img[src*="asciidoc.svg"] {
1084+
width: 20px !important;
1085+
height: 20px !important;
1086+
}
1087+
1088+
.doc table.tableblock td:has(a):hover {
1089+
background-color: rgba(0, 0, 0, 0.3);
1090+
cursor: pointer;
1091+
}
1092+
1093+
.doc table.tableblock td:has(a) p {
1094+
margin: 0;
1095+
padding: 0;
1096+
}
1097+
1098+
.doc table.tableblock td:has(.image a) .image a {
1099+
display: block;
1100+
width: 100%;
1101+
height: 100%;
1102+
text-align: center;
1103+
}
1104+
1105+
.doc table.tableblock td:has(.image) {
1106+
text-align: center;
1107+
vertical-align: middle;
1108+
}
1109+
10701110
#footnotes hr {
10711111
border-top-width: 1px;
10721112
margin-top: 0;
@@ -1087,3 +1127,41 @@
10871127
text-align: right;
10881128
width: 1.5em;
10891129
}
1130+
1131+
.tableblock [style*="color: darkblue"],
1132+
.paragraph[id] [style*="color: darkblue"] {
1133+
color: #fff5b3 !important;
1134+
}
1135+
1136+
.paragraph span[style*="color: darkblue"] {
1137+
color: #fff !important;
1138+
}
1139+
1140+
.tableblock [style*="color: darkgreen"],
1141+
.paragraph[id] [style*="color: darkgreen"] {
1142+
color: #fff !important;
1143+
}
1144+
1145+
.paragraph span[style*="color: darkgreen"] {
1146+
color: #fff !important;
1147+
}
1148+
1149+
.paragraph span[style*="color: red"] {
1150+
color: #fff !important;
1151+
font-style: italic;
1152+
}
1153+
1154+
.paragraph li span[style*="color: orangered"] {
1155+
color: #fff !important;
1156+
font-weight: bold;
1157+
}
1158+
1159+
.tableblock [style*="color: orangered"],
1160+
.paragraph[id] [style*="color: orangered"] {
1161+
color: #fff !important;
1162+
}
1163+
1164+
.tableblock [style*="color: red"],
1165+
.paragraph[id] [style*="color: red"] {
1166+
color: #fff !important;
1167+
}

docs/ui/src/css/header.css

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,27 @@ body {
2424
text-decoration: none;
2525
}
2626

27+
.navbar-item:hover:not(.search),
28+
.navbar-item:focus:not(.search) {
29+
color: var(--color-white);
30+
transform: translateY(-1px);
31+
transition: all 0.2s ease-in-out;
32+
}
33+
2734
.navbar-brand {
2835
display: flex;
2936
flex: auto;
3037
padding-left: 1rem;
3138
}
3239

3340
.navbar-brand .navbar-item {
34-
color: var(--navbar-font-color);
41+
color: var(--color-white-60);
3542
}
3643

3744
.navbar-brand .navbar-item:first-child {
3845
align-self: center;
3946
padding: 0;
40-
font-size: calc(22 / var(--rem-base) * 1rem);
47+
font-size: calc(18 / var(--rem-base) * 1rem);
4148
flex-wrap: wrap;
4249
line-height: 1;
4350
}
@@ -47,10 +54,6 @@ body {
4754
word-wrap: normal;
4855
}
4956

50-
.navbar-brand .navbar-item:first-child :not(:last-child) {
51-
padding-right: 0.375rem;
52-
}
53-
5457
.navbar-brand .navbar-item.search {
5558
flex: auto;
5659
justify-content: flex-end;
@@ -185,13 +188,20 @@ body {
185188
.navbar .button {
186189
display: inline-flex;
187190
align-items: center;
188-
background: var(--navbar-button-background);
189-
border: 1px solid var(--navbar-button-border-color);
190-
border-radius: 0.15rem;
191+
background: rgb(229, 190, 51);
191192
height: 1.75rem;
192-
color: var(--navbar-button-font-color);
193+
color: #0e0e0e;
194+
font-weight: var(--body-font-weight-bold);
193195
padding: 0 0.75em;
194196
white-space: nowrap;
197+
box-shadow: 4px 4px 0 #000;
198+
transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
199+
}
200+
201+
.navbar .button:hover {
202+
background: rgb(255, 215, 0);
203+
transform: translateY(-2px);
204+
box-shadow: 6px 6px 0 #000;
195205
}
196206

197207
@media screen and (max-width: 768.5px) {
@@ -218,8 +228,8 @@ body {
218228
}
219229

220230
.navbar-menu {
221-
background: var(--navbar-menu-background);
222231
box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
232+
background-color: rgb(47 47 94);
223233
max-height: var(--body-min-height);
224234
overflow-y: auto;
225235
overscroll-behavior: none;
@@ -232,7 +242,9 @@ body {
232242

233243
.navbar-menu a.navbar-item:hover,
234244
.navbar-menu .navbar-link:hover {
235-
background: var(--navbar-menu_hover-background);
245+
color: var(--color-white);
246+
transform: translateY(-1px);
247+
transition: all 0.2s ease-in-out;
236248
}
237249
}
238250

@@ -280,14 +292,15 @@ body {
280292

281293
.navbar-end > .navbar-item,
282294
.navbar-end .navbar-link {
283-
color: var(--navbar-font-color);
295+
color: var(--color-white-60);
284296
}
285297

286298
.navbar-end > a.navbar-item:hover,
287299
.navbar-end .navbar-link:hover,
288300
.navbar-end .navbar-item.has-dropdown:hover .navbar-link {
289-
background: var(--navbar_hover-background);
290-
color: var(--navbar-font-color);
301+
color: var(--color-white);
302+
transform: translateY(-1px);
303+
transition: all 0.2s ease-in-out;
291304
}
292305

293306
.navbar-end .navbar-link::after {

docs/ui/src/css/nav.css

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}
66

77
.nav-container {
8-
background-color: rgba(255, 255, 255, 0.1);
8+
background-color: rgba(47, 44, 94, 0.75);
99
backdrop-filter: blur(10px);
1010
position: fixed;
1111
top: var(--navbar-height);
@@ -19,6 +19,11 @@
1919
@media screen and (min-width: 769px) {
2020
.nav-container {
2121
width: var(--nav-width);
22+
background-color: transparent;
23+
}
24+
25+
.nav-container .nav {
26+
background-color: rgb(255 255 255 / 18%);
2227
}
2328
}
2429

@@ -37,9 +42,8 @@
3742
}
3843

3944
.nav {
40-
/* background: var(--nav-background); */
45+
background: rgba(255, 255, 255, 0.1);
4146
position: relative;
42-
top: var(--toolbar-height);
4347
height: var(--nav-height);
4448
}
4549

@@ -59,14 +63,13 @@
5963
}
6064

6165
.nav a {
62-
color: var(--color-white);
66+
color: var(--color-white-60);
6367
}
6468

6569
.nav .panels {
6670
display: flex;
6771
flex-direction: column;
6872
height: inherit;
69-
background-color: rgba(255, 255, 255, 0.1);
7073
}
7174

7275
.nav-panel-menu {
@@ -183,10 +186,12 @@
183186
.is-current-page > .nav-link,
184187
.is-current-page > .nav-text {
185188
font-weight: var(--body-font-weight-bold);
189+
color: var(--color-white);
186190
}
187191

188192
.nav-panel-explore {
189-
background: rgba(255, 255, 255, 0.3);
193+
background: rgba(47, 44, 94, 0.75);
194+
backdrop-filter: blur(10px);
190195
display: flex;
191196
flex-direction: column;
192197
position: absolute;
@@ -196,12 +201,19 @@
196201
left: 0;
197202
}
198203

204+
@media screen and (min-width: 769px) {
205+
.nav-panel-explore {
206+
background: rgba(255, 255, 255, 0.3);
207+
}
208+
}
209+
199210
.nav-panel-explore:not(:first-child) {
200211
top: auto;
201212
max-height: var(--nav-panel-explore-height);
202213
}
203214

204215
.nav-panel-explore .context {
216+
background: rgba(47, 44, 94, 0.75);
205217
font-size: calc(15 / var(--rem-base) * 1rem);
206218
flex-shrink: 0;
207219
color: var(--color-white);
@@ -233,8 +245,8 @@
233245
.nav-panel-explore .components {
234246
line-height: var(--nav-line-height);
235247
flex-grow: 1;
236-
box-shadow: inset 0 1px 5px var(--nav-panel-divider-color);
237-
background: var(--nav-secondary-background);
248+
box-shadow: 0 2px 8px 0 rgba(30, 50, 70, 0.3);
249+
background-color: rgb(29 28 64);
238250
padding: 0.75rem 0.75rem 0 0.75rem;
239251
margin: 0;
240252
overflow-y: scroll;
@@ -278,7 +290,7 @@
278290
}
279291

280292
.nav-panel-explore .component .version a {
281-
background: var(--nav-border-color);
293+
background: rgba(255, 255, 255, 0.1);
282294
border-radius: 0.25rem;
283295
white-space: nowrap;
284296
padding: 0.25em 0.5em;

docs/ui/src/css/page-versions.css

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@
2828
min-width: 100%;
2929
flex-direction: column;
3030
align-items: flex-end;
31-
background:
32-
linear-gradient(
33-
to bottom,
34-
var(--page-version-menu-background) 0%,
35-
var(--page-version-menu-background) 100%
36-
)
37-
no-repeat;
31+
background-color: rgba(0, 0, 0, 0.2);
32+
-webkit-backdrop-filter: blur(10px);
33+
backdrop-filter: blur(10px);
34+
border: 1px solid rgba(255, 255, 255, 0.15);
3835
padding: 1.375rem 1.5rem 0.5rem 0.5rem;
3936
position: absolute;
4037
top: 0;
4138
right: 0;
4239
white-space: nowrap;
40+
z-index: 1;
4341
}
4442

4543
.page-versions:not(.is-active) .version-menu {

0 commit comments

Comments
 (0)