We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user-select
Sandbox demo: https://stackblitz.com/edit/stackblitz-starters-ssfut1yt?file=lightningcss.js
I have CSS:
pre { user-select: all; }
On this moment, Safari doesn't support user-select without vendor-prefix.
For adding prefixes i use this browserslist config:
browserslist
last 2 versions not dead
And code for compiling:
import * as lightningcss from 'lightningcss'; import browserslist from 'browserslist'; const browsers = browserslist(); const targets = lightningcss.browserslistToTargets(browsers); console.log('browserslist: ', browsers); console.log('lightningcss: ', targets); const result = await lightningcss.bundleAsync({ targets, filename: './styles.css', }); console.log(result.code.toString());
i get unprefixed code:
but Safari is in the list:
browserslist: [ 'and_chr 133', 'and_ff 135', 'and_qq 14.9', 'and_uc 15.5', 'android 133', 'chrome 133', 'chrome 132', 'edge 133', 'edge 132', 'firefox 135', 'firefox 134', 'ios_saf 18.3', 'ios_saf 18.2', 'kaios 3.0-3.1', 'kaios 2.5', 'op_mini all', 'op_mob 80', 'opera 114', 'opera 113', 'safari 18.3', 'safari 18.2', 'samsung 27', 'samsung 26' ] lightningcss: { and_chr: 8716288, and_ff: 8847360, android: 8716288, chrome: 8650752, edge: 8650752, firefox: 8781824, ios_saf: 1180160, op_mob: 5242880, opera: 7405568, safari: 1180160, samsung: 1703936 }
LightningCSS Playground have correct prefixed code.
Postcss have another result.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sandbox demo: https://stackblitz.com/edit/stackblitz-starters-ssfut1yt?file=lightningcss.js
I have CSS:
On this moment, Safari doesn't support
user-select
without vendor-prefix.For adding prefixes i use this
browserslist
config:And code for compiling:
i get unprefixed code:
but Safari is in the list:
LightningCSS Playground have correct prefixed code.
Postcss have another result.
The text was updated successfully, but these errors were encountered: