正在加载视频...

视频加载失败

Quick demo of JS config file support and plugin support in the latest Tailwind CSS v4 alpha 🫣

91,644 次观看 • 1 年前 •via X (Twitter)

10 条评论

Adam Wathan 的头像
Adam Wathan1 年前

One thing I didn't mention in the video — because plugins can be registered in CSS in v4, you can tuck the registration behind a CSS file that you just import. I expect most plugins in v4 to ship CSS files with an `@​plugin` hidden inside, so your CSS will look super vanilla:

Simon Vrachliotis 的头像
Simon Vrachliotis1 年前

Whoaaa, the block body on the @ plugin is pretty cool!

Jono 的头像
Jono1 年前

Just to confirm, does alpha mean: "wow that guy is such an alpha for running this on prod"? Or is there some other meaning to it?

Brandon McConnell 的头像
Brandon McConnell1 年前

How can we disable the default colors in the v4 config?

Adam Wathan 的头像
Adam Wathan1 年前

Explained here:

Mykhaylo 🇺🇦🌻 的头像
Mykhaylo 🇺🇦🌻1 年前

This is so cool! Question - with prefixing, will there be a way to use external CSS variables inside the `theme` directive, if they follow the naming conventions? Say I have a bunch of tokens already defined like `--acme-color-potato` - can I "import" them somehow?

Adam Wathan 的头像
Adam Wathan1 年前

Not at the moment but maybe something we could figure out. What would you want the external file to look like exactly, just a :root with some variables inside? Would need to be pretty simple for us to map it to a theme.

Kent C. Dodds 🌌 的头像
Kent C. Dodds 🌌1 年前

Love it Adam! Looking forward to more!

Arnaud Barré 的头像
Arnaud Barré1 年前

module.exports 🙈

Adam Wathan 的头像
Adam Wathan1 年前

Will always be better 🙃 But ESM works too 👍

相关视频