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

Added VH and VW units #162

Merged
merged 11 commits into from
Jan 13, 2021
Merged

Added VH and VW units #162

merged 11 commits into from
Jan 13, 2021

Conversation

Dakror
Copy link
Contributor

@Dakror Dakror commented Jan 11, 2021

VH and VW are CSS units to specify sizes in percent of viewport width (vw) and height (vh)

The implementation follows the one of the DP unit

@Dakror Dakror changed the title Added VH and VW units WIP: Added VH and VW units Jan 11, 2021
@Dakror
Copy link
Contributor Author

Dakror commented Jan 11, 2021

I've discovered that the value isnt being invalidated. Fixing.

@Dakror Dakror marked this pull request as draft January 11, 2021 19:16
@Dakror Dakror changed the title WIP: Added VH and VW units Added VH and VW units Jan 11, 2021
@Dakror Dakror marked this pull request as ready for review January 11, 2021 19:22
Copy link
Owner

@mikke89 mikke89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! This is a very welcome addition :)

Generally it looks really good, although I have a few suggestions here.

Include/RmlUi/Core/Context.h Outdated Show resolved Hide resolved
Include/RmlUi/Core/ElementUtilities.h Outdated Show resolved Hide resolved
Include/RmlUi/Core/Context.h Outdated Show resolved Hide resolved
Include/RmlUi/Core/Property.h Outdated Show resolved Hide resolved
Source/Core/ComputeProperty.cpp Outdated Show resolved Hide resolved
Source/Core/Context.cpp Outdated Show resolved Hide resolved
@mikke89 mikke89 added the enhancement New feature or request label Jan 12, 2021
@Dakror
Copy link
Contributor Author

Dakror commented Jan 12, 2021

(i rebased the branch on master, is this done correctly? im not quite sure actually)

@mikke89
Copy link
Owner

mikke89 commented Jan 12, 2021

Yeah, the commits are a bit weird right now, as my master changes got mixed in here. I'll do squash and merge, and it shouldn't be a problem I think. Otherwise you could do an interactive rebase to clean up the commits if you prefer.

Looks like you need to include the context header to ElementStyle.cpp. You can see if there are any other missing headers by turning off precompiled headers in CMake. I'll merge it as soon as it builds on the CI, thanks!

@mikke89 mikke89 merged commit 48eda79 into mikke89:master Jan 13, 2021
@mikke89
Copy link
Owner

mikke89 commented Jan 13, 2021

Thanks for the PR!

@Dakror Dakror deleted the vh-vw branch January 13, 2021 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants