-
Notifications
You must be signed in to change notification settings - Fork 659
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
[css-values] Add pl
unit for SVG path length
#221
Labels
Comments
(Context: w3c/svgwg#177 (comment)) |
Actually percentages are currently relative to the viewport, which is totally useless. |
Ugh, that's dumb. All the more reason to do this correctly. |
As I've discussed on the SVGwg issue, I am not convinced that a new unit is the best way to address this issue:
|
AmeliaBR
added
SVG
css-values-4
Current Work
and removed
css-values-4
Current Work
labels
Mar 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SVG defined percentages in the dashing properties to be relative to the scaled viewport size (which is useless in most cases), but there are good use-cases for doing dashes relative to the path length, too. In particular, the common "make it look like it's drawing itself" hack needs that; right now you have to guess about path length or use JS to calculate and set it manually.
Since we can't change percentages now, and doing a mode-switch to change the meaning of percentages dynamically is a bit of an anti-pattern, the better solution is to introduce a new unit for path length. Similar to the other "percent-like" viewport units, a path should be
100pl
long.Thoughts on naming?
The text was updated successfully, but these errors were encountered: