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

LibWeb: Implement background-position-x and background-position-y longhand longhands #18157

Merged
merged 5 commits into from Apr 3, 2023

Conversation

MacDue
Copy link
Member

@MacDue MacDue commented Apr 2, 2023

This is technically from CSS Backgrounds and Borders Module Level 4, which has this neat looking banner at the bottom:
New Project (1)

However, these properties are in use on real websites and are needed to fix the left button on https://store.steampowered.com/:

Before After
image image
(Left button faces wrong direction)

This solves the longhands must be initialized before shorthands
problem by just initializing the value when it is first requested.

This will be needed for background-position-x/y which is a longhand
of a longhand, which otherwise breaks the longhands before shorthands
rule.
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Apr 2, 2023
If background-position was not longhand enough for you, we've
now got background-position-x and background-position-y :^)
This represents a single edge and offset, this will be needed for
the values of background-position-x/y.
This parses the new background-position-x/y longhands and properly
hooks up them up. This requires converting PositionStyleValue to
just contain two EdgeStyleValues so that it can be easily expanded
into the longhands.
@awesomekling awesomekling merged commit 0abd469 into SerenityOS:master Apr 3, 2023
12 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Apr 3, 2023
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.

None yet

3 participants