@vaadin/themable-element

This package provides ThemableElement, a version of Vaadin.ThemableMixin re-implemented using LitElement.

Usage no npm install needed!

<script type="module">
  import vaadinThemableElement from 'https://cdn.skypack.dev/@vaadin/themable-element';
</script>

README

@vaadin/themable-element

This package provides ThemableElement, a version of Vaadin.ThemableMixin re-implemented using LitElement.

Usage

The API provided by @vaadin/vaadin-themable-mixin should be used to register styles:

import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';

registerStyles(
  'my-lit-element',
  css`
    /* Styles which will be included in my-element local scope */
  `
);

The registerStyles helper uses DomModule from Polymer 3 internally. This is needed in order to provide a common theming mechanism for both Polymer and LitElement versions of Vaadin components.