Safari 14.1 support#1
Merged
Merged
Conversation
Consuming apps that still support Safari <15 need to work around two Panda output issues: @layer (dropped wholesale below 15.4) and logical shorthands with var() (silently dropped on 14.x). The de-layering is off-the-shelf (@csstools/postcss-cascade-layers); the logical-shorthand expansion is not, so centralise it here rather than have each app re-derive the workaround. - New ./postcss-legacy-safari export: a dependency-free PostCSS plugin (expandLogicalShorthands) that rewrites inline/block logical shorthands to their -start/-end longhands, kept logical so RTL still flips. Plain .cjs so app postcss configs can require() it; adds no dependency to the package. - README: a 'Legacy browser support' section with the full app-side recipe (postcss plugins + build.cssTarget floor) and how to remove it all. Named 'legacy-safari' deliberately: this is expected to be deleted once apps raise their support floor past the affected browsers.
The lightningcss transformer (which forced the Panda CLI) is gone, so use @pandacss/dev/postcss to generate the CSS instead of cssgen + a static import: - Storybook: add postcss.config.cjs (@pandacss/dev/postcss only — modern, no legacy plugins); panda script is codegen-only; preview.tsx drops the styled-system.css import (layers.css is the plugin's injection entry). - README: rewrite the setup to the plugin approach (codegen prepare-step + the plugin + a layer-declaration entry import; don't set the lightningcss transformer), and fix the CLI/codegen-vs-cssgen wording, the layers.css path reference, and a step-1 typo. The Legacy section's postcss.config now shows the plugins added after Panda's. Verified by build-testing the Storybook: Panda CSS injected, native @layer kept (modern), no legacy flattening.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This keeps the baseline more or less where it already was - we're already in a bad place with Safari 13.x.
14.0 is significantly harder (no gap).