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

[Feature] Change background image implementation #350

Closed
joe9663 opened this issue Mar 16, 2021 · 0 comments
Closed

[Feature] Change background image implementation #350

joe9663 opened this issue Mar 16, 2021 · 0 comments
Labels
bug General bug issues Crio
Projects
Milestone

Comments

@joe9663
Copy link

joe9663 commented Mar 16, 2021

Is your feature request related to a problem? Please describe.
Background images configurated with Customize > Background have problems displaying correctly on iOS mobile and tablet devices when both the Cover background size and Fixed position are set for the image. Combining those 2 settings causes the image to appear pixelated and much larger than expected.

Describe the solution you'd like
We might be able to use a pseudo element to handle background Instead of assigning our rules directly to the element. Using a pseudo element allows us to use position: fixed instead of background-attachment: fixed to create the same effect and work around the limitations of iOS mobile browsers. The following example code was implemented on a user's website to allowed a fixed background image to work on an iPhone.

.palette-primary.custom-background:before {
        content: "";
        top: 0;
        left: 0;
        position: fixed;
        background-size: cover;
        width: 100%;
        height: 100%;
        z-index: -1;
        background-image: url("image/url.png");
        background-position: center top;
}
@jamesros161 jamesros161 added this to the 2.8.1 milestone May 20, 2021
@jamesros161 jamesros161 added bug General bug issues Crio labels May 21, 2021
@bwmarkle bwmarkle added this to To do in 2.8.1 May 26, 2021
@jamesros161 jamesros161 moved this from To do to In progress in 2.8.1 May 27, 2021
@jamesros161 jamesros161 moved this from In progress to Needs Review in 2.8.1 Jun 1, 2021
@nicolepaschen nicolepaschen moved this from Needs Review to Done in 2.8.1 Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug General bug issues Crio
Projects
No open projects
2.8.1
Done
Development

Successfully merging a pull request may close this issue.

2 participants