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

[feat] Hope to support new units 'rpx' #76

Closed
bigmeow opened this issue Mar 30, 2019 · 4 comments · Fixed by #85
Closed

[feat] Hope to support new units 'rpx' #76

bigmeow opened this issue Mar 30, 2019 · 4 comments · Fixed by #85

Comments

@bigmeow
Copy link

bigmeow commented Mar 30, 2019

In China, the Wechat applet is very popular. It defines a responsive unit,'rpx'

code:

width: calc(100% - 10rpx);

I hope the above code will work properly.

Try to modify the following code to make it work

([0-9]+("."[0-9]+)?|"."[0-9]+)px\b return 'LENGTH';

//update after
([0-9]+("."[0-9]+)?|"."[0-9]+)r?px\b              return 'LENGTH';

Is this proposal acceptable to you?

@bigmeow
Copy link
Author

bigmeow commented Mar 30, 2019

Or users can customize unit validation

@alexander-akait
Copy link
Collaborator

Can you provide link on spec or docs

@alexander-akait
Copy link
Collaborator

And what is unit means

@alexander-akait
Copy link
Collaborator

rpx !== px and it is non standard, so we just relax parser to avoid throw error on unknown unit

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 a pull request may close this issue.

2 participants