-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Error on indirect dynamic styles and attempt to statically concatenat…
…e where feasible (#1795) * Fixes two scenarios found in #1789 - The static syntax of `"8px ".concat("8px")` which is auto-generated by certain Babel targets generates `props.style` outputs when not necessary—we can simplify this to `"8px 8px"` ourselves. - Mixing "indirect selectors" (eg. `~`, `+`, `|`, `||`) that do not inherit CSS variables with dynamic styles which generates CSS variables and `props.style` will never work in Compiled, this now throws an error. * Add additional commentary, logic, type protection, and minor cleanup. * Update website * Remove snapshot
- Loading branch information
1 parent
87a3ad5
commit 3d10a6d
Showing
5 changed files
with
279 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@compiled/babel-plugin': minor | ||
--- | ||
|
||
Fixes two scenarios found in https://github.com/atlassian-labs/compiled/issues/1789 | ||
|
||
- The static syntax of `"8px ".concat("8px")` which is auto-generated by certain Babel targets generates `props.style` outputs when not necessary—we can simplify this to `"8px 8px"` ourselves. | ||
- Mixing "indirect selectors" (eg. `~`, `+`, `|`, `||`) that do not inherit CSS variables with dynamic styles which generates CSS variables and `props.style` will never work in Compiled, this now throws an error. |
This file contains 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
This file contains 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
Oops, something went wrong.