Skip to content

Commit

Permalink
Use :root prefix to ensure correct background-image paths (#506)
Browse files Browse the repository at this point in the history
Using embroider does not appear to use the same CSS import order as a regular Ember CLI build, and we haven't found a way to enforce it. While using `:root` to increase the specificity is certainly not great, it is probably better than using `!important` and appears to be the best workaround for now until we can find a better solution.
  • Loading branch information
Turbo87 authored Nov 29, 2022
1 parent 6cbb9dc commit ddd9b5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vendor/ember-phone-input.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.iti__flag {
/* Using `:root` prefix here to increase the specificity to avoid a CSS import order bug when using embroider */
:root .iti__flag {
background-image: url('ember-phone-input/images/flags.png');
}

Expand All @@ -8,7 +9,7 @@
only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi),
only screen and (min-resolution: 2dppx) {
.iti__flag {
:root .iti__flag {
background-image: url('ember-phone-input/images/[email protected]');
}
}

0 comments on commit ddd9b5a

Please sign in to comment.