2020-09-15 15:01:07 +02:00
|
|
|
import { Theme } from './themes/type';
|
|
|
|
|
|
|
|
import theme_light from './themes/light';
|
|
|
|
import theme_dark from './themes/dark';
|
|
|
|
import theme_dracula from './themes/dracula';
|
|
|
|
import theme_solarizedLight from './themes/solarizedLight';
|
|
|
|
import theme_solarizedDark from './themes/solarizedDark';
|
|
|
|
import theme_nord from './themes/nord';
|
|
|
|
import theme_aritimDark from './themes/aritimDark';
|
|
|
|
import theme_oledDark from './themes/oledDark';
|
2020-11-05 18:58:23 +02:00
|
|
|
import Setting from './models/Setting';
|
2020-09-15 15:01:07 +02:00
|
|
|
|
2020-05-02 17:41:07 +02:00
|
|
|
const Color = require('color');
|
2020-04-07 10:19:53 +02:00
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
const themes: any = {
|
2020-09-15 15:01:07 +02:00
|
|
|
[Setting.THEME_LIGHT]: theme_light,
|
|
|
|
[Setting.THEME_DARK]: theme_dark,
|
|
|
|
[Setting.THEME_DRACULA]: theme_dracula,
|
|
|
|
[Setting.THEME_SOLARIZED_LIGHT]: theme_solarizedLight,
|
|
|
|
[Setting.THEME_SOLARIZED_DARK]: theme_solarizedDark,
|
|
|
|
[Setting.THEME_NORD]: theme_nord,
|
|
|
|
[Setting.THEME_ARITIM_DARK]: theme_aritimDark,
|
|
|
|
[Setting.THEME_OLED_DARK]: theme_oledDark,
|
2020-04-07 10:19:53 +02:00
|
|
|
};
|
2017-11-06 22:54:58 +02:00
|
|
|
|
2022-09-30 12:46:26 +02:00
|
|
|
export function themeById(themeId: string) {
|
2020-06-10 23:08:59 +02:00
|
|
|
if (!themes[themeId]) throw new Error(`Invalid theme ID: ${themeId}`);
|
2023-06-01 13:02:36 +02:00
|
|
|
const output = { ...themes[themeId] };
|
2020-06-10 23:08:59 +02:00
|
|
|
|
|
|
|
if (!output.headerBackgroundColor) {
|
|
|
|
output.headerBackgroundColor = output.appearance === 'light' ? '#F0F0F0' : '#2D3136';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!output.textSelectionColor) {
|
|
|
|
output.textSelectionColor = output.appearance === 'light' ? '#0096FF' : '#00AEFF';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!output.colorBright2) {
|
|
|
|
output.colorBright2 = output.appearance === 'light' ? '#ffffff' : '#ffffff';
|
|
|
|
}
|
|
|
|
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
2018-11-08 00:37:13 +02:00
|
|
|
// globalStyle should be used for properties that do not change across themes
|
|
|
|
// i.e. should not be used for colors
|
2020-11-12 21:13:28 +02:00
|
|
|
const globalStyle: any = {
|
2023-01-11 20:37:22 +02:00
|
|
|
fontFamily: 'Roboto', // 'sans-serif',
|
2017-11-06 22:54:58 +02:00
|
|
|
margin: 15, // No text and no interactive component should be within this margin
|
|
|
|
itemMarginTop: 10,
|
|
|
|
itemMarginBottom: 10,
|
|
|
|
disabledOpacity: 0.3,
|
2017-11-08 19:51:55 +02:00
|
|
|
buttonMinWidth: 50,
|
|
|
|
buttonMinHeight: 30,
|
2019-01-10 20:34:58 +02:00
|
|
|
editorFontSize: 12,
|
|
|
|
textAreaLineHeight: 17,
|
2020-06-10 23:08:59 +02:00
|
|
|
lineHeight: '1.6em',
|
2017-11-09 00:23:26 +02:00
|
|
|
headerButtonHPadding: 6,
|
2020-09-15 15:01:07 +02:00
|
|
|
toolbarHeight: 26,
|
|
|
|
toolbarPadding: 6,
|
2020-05-17 16:34:42 +02:00
|
|
|
appearance: 'light',
|
2020-09-15 15:01:07 +02:00
|
|
|
mainPadding: 12,
|
2023-03-13 18:26:56 +02:00
|
|
|
topRowHeight: 50,
|
2021-01-02 19:27:37 +02:00
|
|
|
editorPaddingLeft: 8,
|
2017-11-06 22:54:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
globalStyle.marginRight = globalStyle.margin;
|
|
|
|
globalStyle.marginLeft = globalStyle.margin;
|
|
|
|
globalStyle.marginTop = globalStyle.margin;
|
|
|
|
globalStyle.marginBottom = globalStyle.margin;
|
|
|
|
|
|
|
|
globalStyle.icon = {
|
|
|
|
fontSize: 30,
|
|
|
|
};
|
|
|
|
|
|
|
|
globalStyle.lineInput = {
|
2018-03-26 19:33:55 +02:00
|
|
|
fontFamily: globalStyle.fontFamily,
|
2019-05-06 22:35:29 +02:00
|
|
|
maxHeight: 22,
|
|
|
|
height: 22,
|
|
|
|
paddingLeft: 5,
|
2017-11-06 22:54:58 +02:00
|
|
|
};
|
|
|
|
|
2019-01-28 01:15:56 +02:00
|
|
|
globalStyle.headerStyle = {
|
|
|
|
fontFamily: globalStyle.fontFamily,
|
|
|
|
};
|
2018-11-08 00:37:13 +02:00
|
|
|
|
|
|
|
globalStyle.inputStyle = {
|
|
|
|
border: '1px solid',
|
2019-04-01 21:43:13 +02:00
|
|
|
height: 24,
|
2019-05-06 22:35:29 +02:00
|
|
|
maxHeight: 24,
|
2019-04-01 21:43:13 +02:00
|
|
|
paddingLeft: 5,
|
|
|
|
paddingRight: 5,
|
|
|
|
boxSizing: 'border-box',
|
2018-11-08 00:37:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
globalStyle.containerStyle = {
|
|
|
|
overflow: 'auto',
|
|
|
|
overflowY: 'auto',
|
|
|
|
};
|
|
|
|
|
|
|
|
globalStyle.buttonStyle = {
|
2019-05-06 22:35:29 +02:00
|
|
|
// marginRight: 10,
|
2018-11-08 00:37:13 +02:00
|
|
|
border: '1px solid',
|
2019-05-06 22:35:29 +02:00
|
|
|
minHeight: 26,
|
2019-01-28 01:44:16 +02:00
|
|
|
minWidth: 80,
|
2020-03-13 19:42:50 +02:00
|
|
|
// maxWidth: 220,
|
2019-01-29 20:02:34 +02:00
|
|
|
paddingLeft: 12,
|
|
|
|
paddingRight: 12,
|
2019-09-11 01:53:01 +02:00
|
|
|
paddingTop: 6,
|
|
|
|
paddingBottom: 6,
|
2020-09-15 15:01:07 +02:00
|
|
|
// boxShadow: '0px 1px 1px rgba(0,0,0,0.3)',
|
2019-09-11 01:53:01 +02:00
|
|
|
fontSize: globalStyle.fontSize,
|
|
|
|
borderRadius: 4,
|
2018-11-08 00:37:13 +02:00
|
|
|
};
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
function addMissingProperties(theme: Theme) {
|
2020-09-15 15:01:07 +02:00
|
|
|
// if (!('backgroundColor3' in theme)) theme.backgroundColor3 = theme.backgroundColor;
|
|
|
|
// if (!('color3' in theme)) theme.color3 = theme.color;
|
|
|
|
// if (!('selectionBackgroundColor3' in theme)) {
|
|
|
|
// if (theme.appearance === 'dark') {
|
|
|
|
// theme.selectionBackgroundColor3 = '#ffffff77';
|
|
|
|
// } else {
|
|
|
|
// theme.selectionBackgroundColor3 = '#00000077';
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// if (!('backgroundColorHover3' in theme)) theme.backgroundColorHover3 = Color(theme.selectionBackgroundColor3).alpha(0.5).rgb();
|
|
|
|
// if (!('selectionBorderColor3' in theme)) theme.selectionBorderColor3 = theme.backgroundColor3;
|
|
|
|
|
|
|
|
// TODO: pick base theme based on appearence
|
|
|
|
|
|
|
|
// const lightTheme = themes[Setting.THEME_LIGHT];
|
|
|
|
|
|
|
|
// for (const n in lightTheme) {
|
|
|
|
// if (!(n in theme)) theme[n] = lightTheme[n];
|
|
|
|
// }
|
|
|
|
|
|
|
|
return theme;
|
|
|
|
}
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
function addExtraStyles(style: any) {
|
2020-05-02 17:41:07 +02:00
|
|
|
style.selectedDividerColor = Color(style.dividerColor).darken(0.2).hex();
|
2020-05-17 16:34:42 +02:00
|
|
|
style.iconColor = Color(style.color).alpha(0.8);
|
2020-05-02 17:41:07 +02:00
|
|
|
|
2020-09-15 15:01:07 +02:00
|
|
|
style.colorFaded2 = Color(style.color2).alpha(0.5).rgb();
|
|
|
|
style.colorHover2 = Color(style.color2).alpha(0.7).rgb();
|
|
|
|
style.colorActive2 = Color(style.color2).alpha(0.9).rgb();
|
|
|
|
|
|
|
|
style.backgroundColorHoverDim3 = Color(style.backgroundColorHover3).alpha(0.3).rgb();
|
|
|
|
style.backgroundColorActive3 = Color(style.backgroundColorHover3).alpha(0.5).rgb();
|
|
|
|
|
|
|
|
const bgColor4 = style.backgroundColor4;
|
|
|
|
|
|
|
|
style.backgroundColorHover2 = Color(style.selectedColor2).alpha(0.4).rgb();
|
|
|
|
|
|
|
|
style.backgroundColorHover4 = Color(style.backgroundColorHover3).alpha(0.3).rgb();
|
|
|
|
style.backgroundColorActive4 = Color(style.backgroundColorHover3).alpha(0.8).rgb();
|
|
|
|
style.borderColor4 = Color(style.color).alpha(0.3);
|
|
|
|
style.backgroundColor4 = bgColor4;
|
|
|
|
|
|
|
|
style.color5 = bgColor4;
|
|
|
|
style.backgroundColor5 = style.color4;
|
|
|
|
style.backgroundColorHover5 = Color(style.backgroundColor5).darken(0.2).hex();
|
|
|
|
style.backgroundColorActive5 = Color(style.backgroundColor5).darken(0.4).hex();
|
|
|
|
|
|
|
|
style.configScreenPadding = style.mainPadding * 2;
|
|
|
|
|
2023-06-01 13:02:36 +02:00
|
|
|
style.icon = {
|
|
|
|
...style.icon,
|
|
|
|
color: style.color,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.lineInput = {
|
|
|
|
...style.lineInput,
|
|
|
|
color: style.color,
|
|
|
|
backgroundColor: style.backgroundColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.headerStyle = {
|
|
|
|
...style.headerStyle,
|
|
|
|
color: style.color,
|
|
|
|
backgroundColor: style.backgroundColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.inputStyle = {
|
|
|
|
...style.inputStyle,
|
|
|
|
color: style.color,
|
|
|
|
backgroundColor: style.backgroundColor,
|
|
|
|
borderColor: style.dividerColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.containerStyle = {
|
|
|
|
...style.containerStyle,
|
|
|
|
color: style.color,
|
|
|
|
backgroundColor: style.backgroundColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.buttonStyle = {
|
|
|
|
...style.buttonStyle,
|
|
|
|
color: style.color4,
|
|
|
|
backgroundColor: style.backgroundColor4,
|
|
|
|
borderColor: style.borderColor4,
|
|
|
|
userSelect: 'none',
|
|
|
|
// cursor: 'pointer',
|
|
|
|
|
|
|
|
};
|
2020-09-15 15:01:07 +02:00
|
|
|
|
2018-11-08 00:47:34 +02:00
|
|
|
style.tagStyle = {
|
|
|
|
fontSize: style.fontSize,
|
|
|
|
fontFamily: style.fontFamily,
|
2020-09-15 15:01:07 +02:00
|
|
|
paddingTop: 4,
|
|
|
|
paddingBottom: 4,
|
|
|
|
paddingRight: 10,
|
|
|
|
paddingLeft: 10,
|
|
|
|
backgroundColor: style.backgroundColor3,
|
|
|
|
color: style.color3,
|
2020-05-02 17:41:07 +02:00
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
2020-09-15 15:01:07 +02:00
|
|
|
marginRight: 8,
|
|
|
|
borderRadius: 100,
|
2022-01-09 13:32:21 +02:00
|
|
|
borderWidth: 0,
|
2018-11-08 00:47:34 +02:00
|
|
|
};
|
|
|
|
|
2019-01-10 20:34:58 +02:00
|
|
|
style.toolbarStyle = {
|
|
|
|
height: style.toolbarHeight,
|
2020-05-04 02:14:28 +02:00
|
|
|
minWidth: style.toolbarHeight,
|
2019-01-10 20:34:58 +02:00
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
paddingLeft: style.headerButtonHPadding,
|
|
|
|
paddingRight: style.headerButtonHPadding,
|
|
|
|
textDecoration: 'none',
|
|
|
|
fontFamily: style.fontFamily,
|
|
|
|
fontSize: style.fontSize,
|
|
|
|
boxSizing: 'border-box',
|
|
|
|
cursor: 'default',
|
|
|
|
justifyContent: 'center',
|
|
|
|
color: style.color,
|
2019-03-15 23:57:58 +02:00
|
|
|
whiteSpace: 'nowrap',
|
2019-01-10 20:34:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
style.textStyle = {
|
|
|
|
fontFamily: globalStyle.fontFamily,
|
|
|
|
fontSize: style.fontSize,
|
|
|
|
lineHeight: '1.6em',
|
2019-07-30 09:35:42 +02:00
|
|
|
color: style.color,
|
2019-01-10 20:34:58 +02:00
|
|
|
};
|
|
|
|
|
2023-06-01 13:02:36 +02:00
|
|
|
style.clickableTextStyle = { ...style.textStyle, userSelect: 'none' };
|
|
|
|
|
|
|
|
style.textStyle2 = { ...style.textStyle,
|
|
|
|
color: style.color2,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.textStyleMinor = { ...style.textStyle,
|
|
|
|
color: style.colorFaded,
|
|
|
|
fontSize: style.fontSize * 0.8,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.urlStyle = { ...style.textStyle,
|
|
|
|
textDecoration: 'underline',
|
|
|
|
color: style.urlColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
style.h1Style = {
|
|
|
|
...style.textStyle,
|
|
|
|
color: style.color,
|
|
|
|
fontSize: style.textStyle.fontSize * 1.5,
|
|
|
|
fontWeight: 'bold',
|
|
|
|
};
|
|
|
|
|
|
|
|
style.h2Style = {
|
|
|
|
...style.textStyle,
|
|
|
|
color: style.color,
|
|
|
|
fontSize: style.textStyle.fontSize * 1.3,
|
|
|
|
fontWeight: 'bold',
|
|
|
|
};
|
2019-01-10 20:34:58 +02:00
|
|
|
|
2019-04-01 21:43:13 +02:00
|
|
|
style.dialogModalLayer = {
|
|
|
|
zIndex: 9999,
|
|
|
|
display: 'flex',
|
|
|
|
position: 'absolute',
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
width: '100%',
|
|
|
|
height: '100%',
|
|
|
|
backgroundColor: 'rgba(0,0,0,0.6)',
|
|
|
|
alignItems: 'flex-start',
|
|
|
|
justifyContent: 'center',
|
|
|
|
};
|
|
|
|
|
2020-02-25 11:43:31 +02:00
|
|
|
style.controlBox = {
|
|
|
|
marginBottom: '1em',
|
|
|
|
color: 'black', // This will apply for the calendar
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center',
|
|
|
|
};
|
|
|
|
|
|
|
|
style.controlBoxLabel = {
|
|
|
|
marginRight: '1em',
|
|
|
|
width: '10em',
|
|
|
|
display: 'inline-block',
|
|
|
|
fontWeight: 'bold',
|
|
|
|
};
|
|
|
|
|
|
|
|
style.controlBoxValue = {
|
|
|
|
display: 'inline-block',
|
|
|
|
};
|
|
|
|
|
2019-04-01 21:43:13 +02:00
|
|
|
style.dialogBox = {
|
|
|
|
backgroundColor: style.backgroundColor,
|
|
|
|
padding: 16,
|
|
|
|
boxShadow: '6px 6px 20px rgba(0,0,0,0.5)',
|
|
|
|
marginTop: 20,
|
2020-04-22 00:57:04 +02:00
|
|
|
maxHeight: '80%',
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'column',
|
2019-07-30 09:35:42 +02:00
|
|
|
};
|
2019-04-01 21:43:13 +02:00
|
|
|
|
2019-07-21 17:49:53 +02:00
|
|
|
style.buttonIconStyle = {
|
2020-05-17 16:34:42 +02:00
|
|
|
color: style.iconColor,
|
2019-07-21 17:49:53 +02:00
|
|
|
marginRight: 6,
|
2019-07-30 09:35:42 +02:00
|
|
|
};
|
2019-07-21 17:49:53 +02:00
|
|
|
|
2020-04-08 12:12:25 +02:00
|
|
|
style.notificationBox = {
|
|
|
|
backgroundColor: style.warningBackgroundColor,
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
padding: 10,
|
|
|
|
fontSize: style.fontSize,
|
|
|
|
};
|
|
|
|
|
2023-06-01 13:02:36 +02:00
|
|
|
style.dialogTitle = { ...style.h1Style, marginBottom: '1.2em' };
|
2019-04-01 21:43:13 +02:00
|
|
|
|
2023-06-01 13:02:36 +02:00
|
|
|
style.dropdownList = { ...style.inputStyle };
|
2019-05-06 22:35:29 +02:00
|
|
|
|
2020-04-03 20:12:14 +02:00
|
|
|
style.colorHover = style.color;
|
|
|
|
style.backgroundHover = `${style.selectedColor2}44`;
|
|
|
|
|
2019-09-11 01:53:01 +02:00
|
|
|
// In general the highlighted color, used to highlight text or icons, should be the same as selectedColor2
|
|
|
|
// but some times, depending on the theme, it might be too dark or too light, so it can be
|
|
|
|
// specified directly by the theme too.
|
|
|
|
if (!style.highlightedColor) style.highlightedColor = style.selectedColor2;
|
|
|
|
|
2018-11-08 00:47:34 +02:00
|
|
|
return style;
|
|
|
|
}
|
2018-11-08 00:16:05 +02:00
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
const themeCache_: any = {};
|
2017-11-06 22:54:58 +02:00
|
|
|
|
2021-09-06 17:57:07 +02:00
|
|
|
export function themeStyle(themeId: number) {
|
2020-10-21 01:23:55 +02:00
|
|
|
if (!themeId) throw new Error('Theme must be specified');
|
2019-01-10 20:34:58 +02:00
|
|
|
|
2021-01-29 20:45:11 +02:00
|
|
|
const zoomRatio = 1;
|
2019-01-10 20:34:58 +02:00
|
|
|
|
2021-01-29 20:45:11 +02:00
|
|
|
const cacheKey = themeId;
|
2019-01-10 20:34:58 +02:00
|
|
|
if (themeCache_[cacheKey]) return themeCache_[cacheKey];
|
|
|
|
|
2019-06-06 00:11:18 +02:00
|
|
|
// Font size are not theme specific, but they must be referenced
|
|
|
|
// and computed here to allow them to respond to settings changes
|
|
|
|
// without the need to restart
|
2020-11-12 21:13:28 +02:00
|
|
|
const fontSizes: any = {
|
2020-06-10 23:08:59 +02:00
|
|
|
fontSize: Math.round(12 * zoomRatio),
|
2020-10-21 11:39:53 +02:00
|
|
|
toolbarIconSize: 18,
|
2019-07-30 09:35:42 +02:00
|
|
|
};
|
2017-11-06 22:54:58 +02:00
|
|
|
|
2020-06-10 23:08:59 +02:00
|
|
|
fontSizes.noteViewerFontSize = Math.round(fontSizes.fontSize * 1.25);
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
let output: any = {};
|
2019-01-10 20:34:58 +02:00
|
|
|
output.zoomRatio = zoomRatio;
|
2019-07-29 12:05:58 +02:00
|
|
|
|
|
|
|
// All theme are based on the light style, and just override the
|
|
|
|
// relevant properties
|
2023-06-01 13:02:36 +02:00
|
|
|
output = { ...globalStyle, ...fontSizes, ...themes[themeId] };
|
2020-09-15 15:01:07 +02:00
|
|
|
output = addMissingProperties(output);
|
2018-11-08 00:47:34 +02:00
|
|
|
output = addExtraStyles(output);
|
2020-10-21 01:23:55 +02:00
|
|
|
output.cacheKey = cacheKey;
|
2018-11-08 00:47:34 +02:00
|
|
|
|
2019-01-10 20:34:58 +02:00
|
|
|
themeCache_[cacheKey] = output;
|
|
|
|
return themeCache_[cacheKey];
|
2017-11-06 22:54:58 +02:00
|
|
|
}
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
const cachedStyles_: any = {
|
2020-07-14 21:17:25 +02:00
|
|
|
themeId: null,
|
|
|
|
styles: {},
|
|
|
|
};
|
2019-12-13 03:16:34 +02:00
|
|
|
|
2020-07-14 21:17:25 +02:00
|
|
|
// cacheKey must be a globally unique key, and must change whenever
|
|
|
|
// the dependencies of the style change. If the style depends only
|
|
|
|
// on the theme, a static string can be provided as a cache key.
|
2023-06-30 11:30:29 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
2021-09-06 17:57:07 +02:00
|
|
|
export function buildStyle(cacheKey: any, themeId: number, callback: Function) {
|
2020-07-23 00:26:45 +02:00
|
|
|
cacheKey = Array.isArray(cacheKey) ? cacheKey.join('_') : cacheKey;
|
|
|
|
|
2020-07-14 21:17:25 +02:00
|
|
|
// We clear the cache whenever switching themes
|
|
|
|
if (cachedStyles_.themeId !== themeId) {
|
|
|
|
cachedStyles_.themeId = themeId;
|
|
|
|
cachedStyles_.styles = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cachedStyles_.styles[cacheKey]) return cachedStyles_.styles[cacheKey].style;
|
2019-12-13 03:16:34 +02:00
|
|
|
|
|
|
|
const s = callback(themeStyle(themeId));
|
|
|
|
|
2020-07-14 21:17:25 +02:00
|
|
|
cachedStyles_.styles[cacheKey] = {
|
2019-12-13 03:16:34 +02:00
|
|
|
style: s,
|
|
|
|
timestamp: Date.now(),
|
|
|
|
};
|
|
|
|
|
2020-07-14 21:17:25 +02:00
|
|
|
return cachedStyles_.styles[cacheKey].style;
|
2019-12-13 03:16:34 +02:00
|
|
|
}
|