Gem 一覧へ戻る
bennypowers/lit-css(新しいタブで開きます)
主要言語: JavaScript
Build Plugins for CSS tagged-template-literals
- star 数
- 52
- watcher 数
- 3
- fork 数
- 9
- issue 数
- 4
- 最終更新
- 2026/07/21
主要言語: JavaScript
Build Plugins for CSS tagged-template-literals
Build plugins to import css files as JavaScript tagged-template literal objects.
The "Lit" stands for "Literal"
You can use it to import CSS for various libraries like lit-element, @microsoft/fast-element, or others.
No. These are optional packages whose sole purpose is to make it easier to write CSS-in-CSS. You can just as easily write your CSS in some 'styles.css.js' modules a la:
import { css } from 'lit'; export default css`:host { display: block; }`;
And this may actually be preferred.
Hopefully this package will become quickly obsolete when the CSS Modules Proposal (or something like it) is accepted and implemented.
In the mean time, enjoy importing your CSS into your component files.