Skip to content

Remove background images redundancy #19

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

missmatsuko
Copy link
Contributor

You don't need to have no-repeat when the background-size is set to cover:

cover
A keyword that is the inverse of contain. Scales the image as large as possible and maintains image aspect ratio (image doesn't get squished). The image "covers" the entire width or height of the container. When the image and container have different dimensions, the image is clipped either left/right or top/bottom.

https://developer.mozilla.org/en/docs/Web/CSS/background-size?v=control

Also changed "50%" to "center center" for understandability.

@missmatsuko
Copy link
Contributor Author

This is still in the updated files:

background: url(../images/background-6.jpg) no-repeat;
background-size: cover;

no-repeat can be excluded because background-size is set to cover, so it wouldn't repeat anyways:

background-image: url(../images/background-6.jpg);
background-size: cover;

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

Successfully merging this pull request may close these issues.

1 participant