From 3635658e7015a3c1de4503ec6d702aab9f94e2f6 Mon Sep 17 00:00:00 2001 From: Manuel Kocher <manuel.kocher@tugraz.at> Date: Thu, 30 Jun 2022 11:24:12 +0200 Subject: [PATCH] Add commonStyles to dbp-translation component --- packages/common/src/translation.js | 34 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/packages/common/src/translation.js b/packages/common/src/translation.js index 7a659210..ebf230a7 100644 --- a/packages/common/src/translation.js +++ b/packages/common/src/translation.js @@ -1,6 +1,7 @@ import {css, html} from 'lit'; import {unsafeHTML} from 'lit/directives/unsafe-html.js'; import DBPLitElement from '../dbp-lit-element'; +import * as commonStyles from '../styles.js'; import {createInstanceGivenResources, setOverridesByGlobalCache} from './i18n.js'; export class Translation extends DBPLitElement { @@ -26,20 +27,25 @@ export class Translation extends DBPLitElement { static get styles() { // language=css - return css` - .hidden { - display: none; - } - .links { - border-bottom: var(--dbp-border); - border-color: var(--dbp-content); - padding: 0; - transition: background-color 0.15s ease 0s, color 0.15s ease 0s; - color: var(--dbp-content); - cursor: pointer; - text-decoration: none; - } - `; + return [ + + commonStyles.getThemeCSS(), + commonStyles.getGeneralCSS(), + css` + .hidden { + display: none; + } + .links { + border-bottom: var(--dbp-border); + border-color: var(--dbp-content); + padding: 0; + transition: background-color 0.15s ease 0s, color 0.15s ease 0s; + color: var(--dbp-content); + cursor: pointer; + text-decoration: none; + } + `, + ]; } connectedCallback() { -- GitLab