Comments (4)
all the smart lightningcss defaults
Something is providing a default browserslist target list to Lightning CSS, so it really depends on how you're running Lightning CSS (as part of another build tool?)
Once you know that current value, you can just add your Safari range to it.
So it might just be that your browserslist config should be defaults, Safari >= 14
from lightningcss.
I'm running it standalone from the CLI (and as a node library), so for example this is the default:
lightningcss --minify --error-recovery before.css -o after.css
then
lightningcss --minify --targets 'defaults' --error-recovery before.css -o after.css
... gives me a different output than no targets at all
One difference I see is when I specify a Safari >= 14
target a lot of old -webkit-
prefixes are stripped. And these are kept when no target is given (LightningCSS defaults). I think this is cool, but makes me slightly nervous that default LightningCSS keeps them. Even though LightningCSS seems to assume a newer Safari by default (e.g. using inset
property which is not in Safari 14)
Once you know that current value, you can just add your Safari range to it.
My plan exactly, except I cannot figure out that current value
from lightningcss.
Strange, it should by default use defaults
in that case according to this comment:
Lines 54 to 74 in baa1a2b
from lightningcss.
Interesting, I thought it's last 10 browser versions and further tweaking, happening during build time:
lightningcss/scripts/build-prefixes.js
Lines 33 to 42 in baa1a2b
from lightningcss.
Related Issues (20)
- A message about ignoring properties like postcss HOT 1
- Minifier Breaks Black Translucent Colors HOT 2
- Using Lightning as a code generator HOT 2
- Moving back to upstream `selectors`? HOT 2
- transcribes OKLCH poorly HOT 1
- Sourcemap @include paths not updated HOT 2
- Allow use of "resolver" when using through vite HOT 1
- Minification strips required whitespace between consecutive `var(...)` calls HOT 3
- Color value format HOT 4
- Lightningcss randomly drops a selector, breaking styling
- cli: mis-match between --version and npm package version HOT 1
- [Feature Request]: Support `generate(ast)` API like `csstree`
- Support `overlay` property
- Position of `all` property is not maintained HOT 3
- Add support for custom import resolvers in synchronous bundle API
- Use browserslist entry in package.json (vite)
- lots of :lang() in output HOT 3
- Lightning with Astro: Can't resolve background-image path HOT 1
- Unexpected Token Error with "all" property
- Alias another CSS module file to avoid repeating (long) filepaths
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightningcss.