Skip to content

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
Collaborator

@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
Collaborator

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.

3 participants