Skip to content

Commit

Permalink
Fix applied LQIP style
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Feb 5, 2021
1 parent 7d33edb commit ccc74bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon/components/responsive-image.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class="eri-{{this.layout}}"
loading="lazy"
...attributes
{{style (if this.showLqipImage (hash background-image=this.lqipImage) background-size="cover")}}
{{style (if this.showLqipImage (hash background-image=this.lqipImage background-size="cover"))}}
{{on "load" this.onLoad}}
/>
</picture>
1 change: 1 addition & 0 deletions tests/integration/components/responsive-image-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ module('Integration: Responsive Image Component', function (hooks) {
.style.backgroundImage?.match(/data:image\/svg/),
'it has a background SVG'
);
assert.dom('img').hasStyle({ 'background-size': 'cover' });
assert.ok(
this.element.querySelector('img').style.backgroundImage?.length > 100,
'the background SVG has a reasonable length'
Expand Down

0 comments on commit ccc74bb

Please sign in to comment.