Skip to content

Explicitly configure Lightning CSS features, and prefer user browserslist over default browserslist - #11402

Merged
RobinMalfait merged 9 commits into
masterfrom
feat/explicitly-configure-lightningcss
Jun 9, 2023
Merged

Explicitly configure Lightning CSS features, and prefer user browserslist over default browserslist#11402
RobinMalfait merged 9 commits into
masterfrom
feat/explicitly-configure-lightningcss

Conversation

@RobinMalfait

@RobinMalfait RobinMalfait commented Jun 9, 2023

Copy link
Copy Markdown
Member

This PR explicitly includes or excludes Lightning CSS features to ensure we have the best possible
output while maintaining backwards compatibility.

A few side effects that this PR includes:

  1. We changed the default browserslist we ship in Tailwind itself
  2. Tests had to be updated to reflect the changes in the include/exclude feature and the browserslist changes
  3. Some Lighting CSS bugs popped up while updating the tests. Linking them here to keep track of them:
    1. Selectors including ::marker are split when Safari target is used  parcel-bundler/lightningcss#508
    2. Transforming :is() results in duplicate selectors parcel-bundler/lightningcss#509
  4. Added the ability to default to the browserlist of your project if it is defined.

We don't want this to automatically apply since we have dedicated
logical property based utilities already.

We also have a feature flag to toggle some utilities to make use of
logical property based ones.

This feature should be opt-in to prevent backwards compatibility (e.g.:
RTL sites that _did_ use a mr-4 explicitly).
@RobinMalfait
RobinMalfait force-pushed the feat/explicitly-configure-lightningcss branch from 1903d69 to 84974b2 Compare June 9, 2023 15:39
If a custom browserslist config is used, then we don't explicitly set
the include/exclude features from Lightning CSS (except for nesting, we
always want to process nesting)
@RobinMalfait RobinMalfait changed the title Explicitly configure Lightning CSS features Explicitly configure Lightning CSS features, and prefer user browserslist over default browserslist Jun 9, 2023
@RobinMalfait
RobinMalfait merged commit ef2ebb2 into master Jun 9, 2023
@RobinMalfait
RobinMalfait deleted the feat/explicitly-configure-lightningcss branch June 9, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant