0.3.0 • Published 4 years ago

@vaadin/themable-element v0.3.0

Weekly downloads
121
License
Apache-2.0
Repository
github
Last release
4 years ago

@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.