Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IE/Edge] Not working on element with background-color #470

Open
dels07 opened this issue Jul 20, 2017 · 1 comment
Open

[IE/Edge] Not working on element with background-color #470

dels07 opened this issue Jul 20, 2017 · 1 comment

Comments

@dels07
Copy link

dels07 commented Jul 20, 2017

Hi there,

I tested that backstretch don't work quite well on IE (tested 10) and Edge, when the element have background-color style applied.

Consider this style:
.hero { background-color: #142F4C; }

When DOM generated, backstretch modify .hero element style to this:
background-image: none; position: relative; z-index: 0;

The fix is either to set:
background: none; position: relative; z-index: 0;
or
background-color: transparent; background-image: none; position: relative; z-index: 0;

Another temporary fix is to completely discard background-color in style/css, but fallback wouldn't be nice (when image is still loading for example).

Chrome and Opera don't have this problem, dunno about Firefox.

@rsheasby
Copy link

I discovered a simliar bug in one of my projects. It seems like an edge bug that still has not been fixed 2 years later... Regardless, it seems you can fix it by simply using rgba() syntax instead of hex codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants