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
Add serialization for stroke geometry #459
Conversation
css-typed-om/Overview.bs
Outdated
@@ -2903,6 +2903,52 @@ depending on the property they came from: | |||
return "currentcolor". | |||
2. Otherwise, return the result of serializing the <<color>> value. | |||
|
|||
: 'stroke-align' | |||
:: | |||
1. If 'stroke-align' is one of the following keywords, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if it isn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the if conditions where no other course of action is possible. TAL?
css-typed-om/Overview.bs
Outdated
1. Return the string representation of the keyword: | ||
* center, | ||
* inset, | ||
* outset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know that you need to explicitly list the keywords even. Maybe get @tabatkins to take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, no need to list these explicitly, it just adds an editting hazard for the future. Just say "return the result of serializing the keyword value".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
css-typed-om/Overview.bs
Outdated
: 'stroke-linejoin' | ||
:: | ||
1. Let |values| initially be the empty [=list=]. | ||
2. If 'stroke-linejoin' has one of the following keywords, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead list the keyword that it can't be (the one that it behaves as if omitted). This avoids us having to update this in the future if we add more keywords. Same for step 3.
css-typed-om/Overview.bs
Outdated
* bevel, | ||
* round, | ||
* stupid. | ||
4. Return the result of concatenating all the items in |values|, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be empty, need to handle that case too (emit the shortest value that triggers the initial-value behavior; check browsers to see what they do).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tabatkins I split this PR into two stroke-{align,break,linecap} are in this PR now.
css-typed-om/Overview.bs
Outdated
1. Return the string representation of the keyword: | ||
* center, | ||
* inset, | ||
* outset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@shans TAL? This should be easy?