styleDark = function ({ dark = {}, light = {} } = {}) {
const dflt = {
dark: {
background: "#282828",
color: "white",
tableHeaderBorder: "#484848",
tableCellBorder: "#3A3A3A"
},
light: {
color: "black",
background: "white"
}
};
dark = { ...dflt.dark, ...dark };
light = { ...dflt.light, ...light };
return html`
<style>
.theme-light {
background-color: ${light.background};
}
.theme-dark {
background-color: ${dark.background};
color: ${dark.color};
--syntax-normal: currentColor;
}
.theme-dark h1, .theme-dark h2, .theme-dark h3,
.theme-dark h4, .theme-dark h5, .theme-dark h6,
.theme-dark td {
color: currentColor;
}
.theme-dark input {
background-color: transparent;
}
.theme-dark table thead th {
background-color: transparent;
color: currentColor;
}
.theme-dark table tr td, .theme-dark table tr th {border-bottom-color: ${dark.tableHeaderBorder};}
.theme-dark table tr:not(:last-child) td, .theme-dark table tr:not(:last-child) th {border-bottom-color: ${dark.tableCellBorder};}
.theme-dark button {
color: ${light.color}
}
svg[fill=currentColor] {background: transparent;}
svg[class$="-ramp"] {background: transparent;}
svg[fill=currentColor] {background: transparent;}
</style>
`;
}