Skip to content

Commit adcbdcd

Browse files
Fix minor UI bugs: dropdown text, responsive table, focus outline checkboxes (#1051)
* fix dropdown cutoff, fix bug focus outlines * linting * rgba to rgb * rgba -> rgb * Standardise format --------- Co-authored-by: Barry Pollard <barrypollard@google.com>
1 parent 1aff3ca commit adcbdcd

File tree

5 files changed

+33
-17
lines changed

5 files changed

+33
-17
lines changed

src/js/colors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const OPACITY = 0.4;
22
const RGBA = [
3-
`rgba(4, 199, 253, ${OPACITY})`,
4-
`rgba(166, 42, 164, ${OPACITY})`,
5-
`rgba(18, 174, 248, ${OPACITY})`,
6-
`rgba(132, 36, 134, ${OPACITY})`
3+
`rgb(4, 199, 253, ${OPACITY})`,
4+
`rgb(166, 42, 164, ${OPACITY})`,
5+
`rgb(18, 174, 248, ${OPACITY})`,
6+
`rgb(132, 36, 134, ${OPACITY})`
77
];
88
const HEX = ['#04c7fd', '#a62aa4', '#12aef8', '#842486'];
99

src/js/histogram.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function drawChart(series, containerId, options) {
326326
tooltip: {
327327
shared: true,
328328
useHTML: true,
329-
borderColor: 'rgba(247,247,247,0.85)',
329+
borderColor: 'rgb(247,247,247,0.85)',
330330
formatter: function() {
331331
const metric = new Metric(options, Math.round(this.points[0].x * 100) / 100);
332332
const tooltips = this.points.filter(p => !p.series.name.includes('CDF')).map((point) => {

src/js/timeseries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ function drawChart(options, series) {
309309
crosshairs: true,
310310
shared: true,
311311
useHTML: true,
312-
borderColor: 'rgba(247,247,247,0.85)',
312+
borderColor: 'rgb(247,247,247,0.85)',
313313
formatter: function() {
314314
function getChangelog(changelog) {
315315
if (!changelog) return '';

static/css/styles.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ nav#mobile.active nav {
455455

456456
nav#mobile li {
457457
display: block;
458-
border-bottom: 1px solid rgba(0, 0, 0, 10%);
458+
border-bottom: 1px solid rgb(0, 0, 0, 10%);
459459
margin: 0;
460460
background-color: #667a7d;
461461
color: #fff;
@@ -667,9 +667,9 @@ ul.bulleted li ul {
667667

668668
.figure {
669669
box-shadow:
670-
0 10px 20px rgba(0, 0, 0, 19%),
671-
0 6px 6px rgba(0, 0, 0, 23%),
672-
inset 0px 10px 50px 0px rgba(0, 0, 0, 15%);
670+
0 10px 20px rgb(0, 0, 0, 19%),
671+
0 6px 6px rgb(0, 0, 0, 23%),
672+
inset 0px 10px 50px 0px rgb(0, 0, 0, 15%);
673673
}
674674

675675
select,
@@ -703,7 +703,7 @@ input {
703703
top: 10px;
704704
left: 10px;
705705
font: bold 120px/1 monospace;
706-
color: rgba(0, 0, 0, 10%);
706+
color: rgb(0, 0, 0, 10%);
707707
}
708708

709709
.report-graphic .primary-icon,

static/css/techreport/techreport.css

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
--font-size-xlarge: 2.25rem;
9595

9696
/* Components */
97-
--card-shadow: 0 3px 12px 0px rgba(106, 121, 124, 0.2);
97+
--card-shadow: 0 3px 12px 0px rgb(106, 121, 124, 20%);
9898
--card-radius: 0.625rem;
9999
--color-panel-text: #203b40;
100100
--color-panel-background: #bfe1e7;
@@ -123,7 +123,7 @@
123123
/* Cards */
124124
--color-card-background: #111;
125125
--color-card-border: #000;
126-
--card-shadow: 0 3px 12px 0px rgba(4, 8, 8, 0.2);
126+
--card-shadow: 0 3px 12px 0px rgb(4, 8, 8, 20%);
127127
--color-page-background: #292828;
128128

129129
/* Checkboxes */
@@ -935,16 +935,26 @@ select {
935935
/* General tables */
936936
.table-ui-wrapper {
937937
overflow: auto;
938+
margin: 1rem 0;
939+
background: /* Shadow covers */
940+
linear-gradient(90deg, var(--color-card-background) 30%, var(--color-card-background)),
941+
linear-gradient(90deg, transparent, var(--color-card-background) 70%) 100% 0,
942+
/* Shadows */
943+
linear-gradient(90deg, rgb(0, 0, 0, 15%), rgb(0, 0, 0, 0%)),
944+
linear-gradient(90deg, rgb(0, 0, 0, 0), rgb(0, 0, 0, 15%)) 100% 0;
945+
background-repeat: no-repeat;
946+
background-color: var(--color-card-background);
947+
background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
948+
background-attachment: local, local, scroll, scroll;
938949
}
939950

940-
.table-ui-wrapper:focus-visible {
941-
outline: 1.5px solid var(--color-teal-dark);
951+
.table-ui-wrapper:focus {
952+
outline: 1.5px dotted var(--color-teal-dark);
942953
outline-offset: 1.5px;
943954
}
944955

945956
.table-ui {
946957
width: 100%;
947-
margin: 1rem 0;
948958
border-collapse: collapse;
949959
}
950960

@@ -1198,6 +1208,7 @@ select {
11981208

11991209
.component-filters select {
12001210
font-size: 1rem;
1211+
line-height: 1.25em;
12011212
}
12021213

12031214
/* -------------------- */
@@ -1295,7 +1306,7 @@ select {
12951306
}
12961307

12971308
.data-sections {
1298-
background-image: linear-gradient(var(--color-bg-gradient), rgba(238, 238, 238, 0));
1309+
background-image: linear-gradient(var(--color-bg-gradient), rgb(238, 238, 238, 0));
12991310
background-size: 100% 50rem;
13001311
background-repeat: no-repeat;
13011312
background-position: 0 0;
@@ -1630,6 +1641,11 @@ path.highcharts-tick {
16301641
height: 0;
16311642
}
16321643

1644+
.check-wrapper:has(input:focus-visible) {
1645+
outline: 1.5px solid var(--focus-default);
1646+
outline-offset: 1.5px;
1647+
}
1648+
16331649
.check-wrapper input::after {
16341650
position: absolute;
16351651
top: 0;

0 commit comments

Comments
 (0)