Lightning CSS #1238
thescientist13
started this conversation in
Ideas
Lightning CSS
#1238
Replies: 2 comments 2 replies
-
Wonder if Lightning CSS would help with this issue observed here with content using octal values not being supported in csstree? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Actually, doing some initial testing in the website and seems nesting is actually working!? 🤩 .page-content {
& h1 {
font-size: var(--font-size-5);
margin: var(--size-4) 0 0;
}
} So maybe it's just that css-tree can't give rich information about this as part of the AST, but our basic walking / parsing seems to preserve the ruleset intact, so that's all that really matter, right!? 💯 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
It's quite impressive to see how fast CSS is moving these days, and the incredible features coming to the language are super exciting and valuable to developers, and users since some of these capabilities no longer require JS (if applicable). A little while ago, Greenwood dropped its core dependency on PostCSS](#763) for the sake of bundling / minification and replaced it with an AST tool called csstree.
However, now being at that intersection of new CSS features and using csstree, it seems like csstree is not able to keep up with some of these new features, unfortunately
oklch()
support csstree/csstree#244We also have to keep up with these ourselves at time as well
AttributeSelector
matcher csstree/csstree#207:has
/:is
pseudo-selectors #1106url
properties (like for@font-face
+src
) during CSS file optimization #1199var
) are being incorrectly optimized #1242Proposal
Since Greenwood should absolutely be aligned and support standards based CSS as much as possible, and realizing that short of building this entire dependency ourselves, we should at least recognize if there are alternate options that are standing at the forefront of our ecosystem.
One of these appears to be Lightning CSS, which is absolutely at the forefront of modern CSS features, syntax, bundling and minification, and even has support for CSS Modules, which at least in a naive capacity, Greenwood (plans to) supports as a plugin.
Not only that, Tailwind is betting big on Lightning CSS as well, with the v4 dropping PostCSS entirely in favor of it.
If there's any tool that needs to be at the forefront of CSS features, it's Tailwind. Additionally, the creator of Lightning CSS also created Parcel and React Aria.
Considerations
Interestingly enough, as part #980 we did evaluate Parcel CSS at the time, but there was a particular feature in PostCSS that we leverage that was not supported at the time, the ability to configure a "starting" directory for a given file to be processed
Additionally, would be nice to evaluate
@import
rulesparse
configBeta Was this translation helpful? Give feedback.
All reactions