Skip to content

Commit dc9610b

Browse files
author
Omar Adobati
committed
improve readability of the Info tooltip element for dark mode
1 parent 8ef5cab commit dc9610b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

dist/ui.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@
9090
opacity: .85;
9191
}
9292
}
93+
@media (prefers-color-scheme: dark) {
94+
.tooltip {
95+
color: var(--ui-contrast);
96+
background: var(--on--ui-contrast);
97+
}
98+
}
9399
`,Be=({label:n,width:t})=>e.createElement("div",{className:Ve},e.createElement("div",{className:"tooltip",style:{width:`${t}px`}},n),e.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M17.3,13.5A1.85,1.85,0,0,0,16,13.1a1.85,1.85,0,0,0-1.3.42,1.47,1.47,0,0,0-.48,1.17h1.13a.82.82,0,0,1,.09-.38l.09-.11a.52.52,0,0,1,.22-.14A.69.69,0,0,1,16,14q.6,0,.6.66a.81.81,0,0,1,0,.22.88.88,0,0,1-.09.2,2.52,2.52,0,0,1-.47.51,1.8,1.8,0,0,0-.48.64h0a2.3,2.3,0,0,0-.14.87h1v-.24a1.06,1.06,0,0,1,.34-.67l.32-.3a2.7,2.7,0,0,0,.52-.65A1.52,1.52,0,0,0,17.3,13.5Z"}),e.createElement("path",{d:"M16.41,17.89a.62.62,0,0,0-.46-.17.57.57,0,0,0-.26,0,.63.63,0,0,0-.2.13.61.61,0,0,0,0,.85.6.6,0,0,0,.46.17.71.71,0,0,0,.32-.07.45.45,0,0,0,.14-.1.61.61,0,0,0,0-.85Z"}),e.createElement("path",{d:"M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,11a5,5,0,1,1,5-5A5,5,0,0,1,16,21Z"}))),We=De`
94100
&.checkbox {
95101
align-items: center;

dist/ui.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ui/components/Info.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ const style = css`
5050
opacity: .85;
5151
}
5252
}
53+
@media (prefers-color-scheme: dark) {
54+
.tooltip {
55+
color: var(--ui-contrast);
56+
background: var(--on--ui-contrast);
57+
}
58+
}
5359
`
5460

5561
export const Info = ({ label, width }: InfoProps) => {

0 commit comments

Comments
 (0)