Files
gerrit/polygerrit-ui/app/elements/test/plugin.html
Tao Zhou 41af9760f2 Support register themes for all or light / dark specifically
Change-Id: Ia9e98c165ecbfb8dbd0f4e515daf175c37a3120f
2019-09-05 14:17:17 +02:00

45 lines
1.0 KiB
HTML

<dom-module id="my-plugin">
<script>
Gerrit.install(plugin => {
plugin.registerStyleModule('app-theme', 'myplugin-app-theme');
plugin.registerStyleModule('app-theme-light', 'myplugin-app-theme-light');
plugin.registerStyleModule('app-theme-dark', 'myplugin-app-theme-dark');
});
</script>
</dom-module>
<dom-module id="myplugin-app-theme">
<template>
<style>
html {
--primary-text-color: #F00BAA;
}
</style>
</template>
</dom-module>
<dom-module id="myplugin-app-theme-light">
<template>
<style>
html {
--header-background-color: #F01BAA;
--header-title-content: "MyGerrit";
--footer-background-color: #F02BAA;
}
</style>
</template>
</dom-module>
<dom-module id="myplugin-app-theme-dark">
<template>
<style>
html {
--primary-text-color: red;
--header-background-color: black;
--header-title-content: "MyGerrit Dark";
--footer-background-color: yellow;
}
</style>
</template>
</dom-module>