Skip to content

Commit 9196477

Browse files
Improve input rendering
1 parent 5883743 commit 9196477

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

templates/style/_themes.scss

+15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
html {
33
--color-background-code: #f5f5f5;
44
--color-background: #fff;
5+
--input-color: #000;
6+
--input-box-shadow-focus: 0 0 8px #078dd8;
57
--color-border-light: #eaeaea;
68
--color-border: #ddd;
79
--color-doc-link-background: #333;
@@ -23,6 +25,9 @@ html {
2325
--color-background-input: #fff;
2426
--color-table-header-background: #e0e0e0;
2527
--color-table-header: #000;
28+
--color-search-focus: #078dd8;
29+
--chart-title-color: #000;
30+
--chart-grid: #ddd;
2631
}
2732

2833
// To add a new theme, copy the above theme into a new `html[data-theme="name"]`
@@ -31,6 +36,8 @@ html {
3136
html[data-theme="dark"] {
3237
--color-background-code: #2a2a2a;
3338
--color-background: #353535;
39+
--input-color: #111;
40+
--input-box-shadow-focus: 0 0 8px 4px #078dd8;
3441
--color-border-light: #eaeaea;
3542
--color-border: #4e4e4e;
3643
--color-doc-link-background: #c0c0c0;
@@ -52,11 +59,16 @@ html[data-theme="dark"] {
5259
--color-background-input: #f0f0f0;
5360
--color-table-header-background: #e0e0e0;
5461
--color-table-header: #000;
62+
--color-search-focus: #078dd8;
63+
--chart-title-color: #c0c0c0;
64+
--chart-grid: #4e4e4e;
5565
}
5666

5767
html[data-theme="ayu"] {
5868
--color-background-code: #191f26;
5969
--color-background: #0f1419;
70+
--input-color: #c5c5c5;
71+
--input-box-shadow-focus: 0 0 0 1px #148099,0 0 0 2px transparent;
6072
--color-border-light: #eaeaea;
6173
--color-border: #424c57;
6274
--color-doc-link-background: #d5d5d5;
@@ -78,4 +90,7 @@ html[data-theme="ayu"] {
7890
--color-background-input: #141920;
7991
--color-table-header-background: #364759;
8092
--color-table-header: #eee;
93+
--color-search-focus: #148099;
94+
--chart-title-color: #e6e6e6;
95+
--chart-grid: #5c6773;
8196
}

templates/style/base.scss

+19-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ body {
2727

2828
input, #search {
2929
background-color: var(--color-background-input);
30-
color: var(--color-standard);
30+
color: var(--input-color);
3131
}
3232

3333
#search {
@@ -36,7 +36,7 @@ body {
3636
}
3737

3838
#search:focus {
39-
box-shadow: 0 0 0 1px #148099, 0 0 0 1px #148099;
39+
box-shadow: var(--input-box-shadow-focus);
4040
}
4141

4242
// rustdocs have 200px sidebar and
@@ -76,6 +76,23 @@ body {
7676
> h1 {
7777
color: var(--color-standard);
7878
}
79+
80+
// This is used to improve charts rendering on all themes.
81+
rect.highcharts-background {
82+
fill: var(--color-background);
83+
}
84+
85+
text.highcharts-title, g.highcharts-axis-labels > text {
86+
fill: var(--chart-title-color) !important;
87+
}
88+
89+
g.highcharts-legend-item > text {
90+
fill: var(--chart-grid) !important;
91+
}
92+
93+
g.highcharts-grid > path {
94+
stroke: var(--chart-grid) !important;
95+
}
7996
}
8097

8198
html {

0 commit comments

Comments
 (0)