-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from soxhub/fix-sub-expression-strings
Fix issue with sub-expressions in class strings
- Loading branch information
Showing
10 changed files
with
189 additions
and
72 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,22 @@ | ||
--- | ||
'ember-scoped-css': patch | ||
--- | ||
|
||
Fix an issue with strings in `class` attributes declared via sub-expressions (such as within if statements), were not properly getting scoped. | ||
|
||
For example: | ||
|
||
```js | ||
<template> | ||
<div class="global-probably {{if @condition "a-local-class"}}"> | ||
Hello there! | ||
</div> | ||
</template> | ||
``` | ||
|
||
When the sibling CSS file only declares `a-local-class`, we would expect that | ||
|
||
- `global-probably` remains unchanged | ||
- `a-local-class` gets hashed | ||
|
||
Note that this bug is not fixed for embroider consumers. |
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
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.