Skip to content

bennypowers/lit-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

247529d · Jan 9, 2025

History

94 Commits
Jan 9, 2025
May 1, 2022
Jan 9, 2025
Jan 9, 2025
Nov 15, 2023
Oct 14, 2021
Nov 15, 2023
Nov 15, 2023
Apr 7, 2024
Nov 8, 2022
Apr 7, 2024
Apr 7, 2024
Jan 9, 2025
Jul 31, 2024
Apr 7, 2024

Repository files navigation

Am Yisrael Chai - עם ישראל חי

lit-CSS Plugins

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.

Do I Need This?

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.