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

Inline background styling lost when viewing on mobile #274

Open
ghost opened this issue Oct 19, 2018 · 2 comments
Open

Inline background styling lost when viewing on mobile #274

ghost opened this issue Oct 19, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 19, 2018

I have inline-styling applied to the div that I want the parallax to show up, and for desktops this works fine (to overlay a linear gradient over the image to help text inside to show).

However, when viewing on mobile (where the parallax effect is gracefully replaced with a static image), the linear gradient isn't applied, as the inlien styling is re-written to show the image.

How can this be overcome?

Original element:

<div id="gallery" class="text-center frontpage-block" data-parallax="" data-src="/wp-content/uploads/Bella-Vou-Edited-143-LC-1920x640.jpg" style="background:linear-gradient(to right, rgba(97,80,77,0) 0%, rgba(97,80,77,.9) 50%, rgba(97,80,77,0) 100%);">
    <div class="container">
        <h2>Take a <span>look</span> around</h2>
        <p>Our virtual tour lets you see what's it like stepping into our beautiful clinic.</p>
        <a href="/gallery/" class="btn btn-primary">
            <span class="fa fa-fw fa-camera"></span> View our gallery
        </a>
    </div>
</div>

On mobiles this is displayed as:

<div id="gallery" class="text-center frontpage-block" data-parallax="" data-src="/wp-content/uploads/Bella-Vou-Edited-143-LC-1920x640.jpg" style="background: url("/wp-content/uploads/Bella-Vou-Edited-143-LC-1920x640.jpg") center center / cover;">
    <div class="container">
        <h2>Take a <span>look</span> around</h2>
        <p>Our virtual tour lets you see what's it like stepping into our beautiful clinic.</p>
        <a href="/gallery/" class="btn btn-primary">
            <span class="fa fa-fw fa-camera"></span> View our gallery
        </a>
    </div>
</div>
@ghost ghost changed the title Background styling not being applied to mobile Inline background styling not lost when viewing on mobile Oct 19, 2018
@ghost ghost changed the title Inline background styling not lost when viewing on mobile Inline background styling lost when viewing on mobile Oct 19, 2018
@ghost
Copy link
Author

ghost commented Feb 13, 2019

Why has this issue not been addressed? The problem still exists, this was back in October, coming up to four months ago.

Why is no one reading these issues!?

@leqnam
Copy link

leqnam commented Apr 15, 2019

same problem here, but temporary fix as here #67 (comment)

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

1 participant