freshen app/client/ui2018/cssVars.ts

The cssVars.ts file has changed to include some more knobs
for custom theming.  This commit updates the file, and
introduces a `stubs` directory for stubbing code that is
specific to our deployments of Grist and not of general interest.
This commit is contained in:
Paul Fitzpatrick
2020-06-23 16:16:38 -04:00
parent ad35f54b87
commit c8c5afbbca
7 changed files with 28 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
{
"extends": "../../buildtools/tsconfig-base.json",
"references": [
{ "path": "../common" }
{ "path": "../common" },
{ "path": "../../stubs/app" },
]
}

View File

@@ -6,7 +6,7 @@
* https://css-tricks.com/snippets/css/system-font-stack/
*
*/
import {ProductFlavor} from 'app/common/gristUrls';
import {getTheme, ProductFlavor} from 'app/client/ui/CustomThemes';
import {dom, makeTestId, styled, TestId} from 'grainjs';
import values = require('lodash/values');
@@ -160,4 +160,8 @@ export function attachCssRootVars(productFlavor: ProductFlavor, varsOnly: boolea
dom.update(document.documentElement!, varsOnly ? dom.cls(cssVarsOnly.className) : dom.cls(cssRootVars));
document.documentElement!.classList.add(cssRoot.className);
document.body.classList.add(cssBody.className);
const theme = getTheme(productFlavor);
if (theme.bodyClassName) {
document.body.classList.add(theme.bodyClassName);
}
}