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

Recognize more size units #647

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raxbg
Copy link
Contributor

@raxbg raxbg commented Jul 10, 2024

This PR adds more size units to be correctly recognized by the parser.

Copy link
Contributor

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

Thanks for this. The changes look fine. However the test case SizeTest should be extended to cover the units now supported. Also, could you add an entry to CHANGELOG.md (newest first)? I've also made a suggestion to make a DocBlock comment more maintainable.

@@ -13,7 +13,7 @@
class Size extends PrimitiveValue
{
/**
* vh/vw/vm(ax)/vmin/rem are absolute insofar as they don’t scale to the immediate parent (only the viewport)
* vh/vw/vm(ax)/vmin/rem/svh/lvh/dvh/svw/lvw/dvw are absolute insofar as they don’t scale to the immediate parent (only the viewport)
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than having to maintain the llist of units in the comment, it might be better to make the comment generic.

Suggested change
* vh/vw/vm(ax)/vmin/rem/svh/lvh/dvh/svw/lvw/dvw are absolute insofar as they don’t scale to the immediate parent (only the viewport)
* These are absolute insofar as they don’t scale to the immediate parent (only the viewport).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants