chore(css): add ios_saf to default lightningcss targets #21342
+3
−0
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.
Current default target for Lightning CSS
The current default target for Lightning CSS is resolved by converting the default ESBuild targets to Lightning CSS targets. However, the default ESBuild targets does not differentiate between Safari and Safari on iOS:
Thus the converted default Lightning CSS targets does not include Safari on iOS, or
ios_saf.The problem is, Safari on iOS and Safari have some slightly different behaviors when handling CSS. For example, the
text-size-adjustproperty. As of now:text-size-adjust-webkit-text-size-adjusttext-size-adjust-moz-text-size-adjustThe upper window is for Safari on iOS, and the lower for Safari
However, Lightning CSS treats Safari on iOS and Safari differently, introducing some problems with vendor prifixing. With the default targets, Lighting CSS does not provide prefix for
-webkit, only for-moz:Adding the
ios_saftargetWe can resolve the issue by simply providing a default target for

ios_saf, taking the same value ofsafari, if not otherwise specifiedAbout this PR
This PR copies the
targets.safarivalue totargets.ios_safvalue when converting ESBuild targets to Lightning CSS targets, ifios_safis not otherwise specified.This PR passes relevant tests.