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

Add serialization for stroke geometry #459

Closed
wants to merge 1 commit into from
Closed

Conversation

nainar
Copy link
Contributor

@nainar nainar commented Aug 22, 2017

@shans TAL? This should be easy?

@@ -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,
Copy link
Contributor

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?

Copy link
Contributor Author

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?

1. Return the string representation of the keyword:
* center,
* inset,
* outset.
Copy link
Contributor

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.

Copy link
Member

@tabatkins tabatkins Aug 22, 2017

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".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@shans shans requested a review from tabatkins August 22, 2017 06:22
: 'stroke-linejoin'
::
1. Let |values| initially be the empty [=list=].
2. If 'stroke-linejoin' has one of the following keywords,
Copy link
Member

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.

* bevel,
* round,
* stupid.
4. Return the result of concatenating all the items in |values|,
Copy link
Member

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).

Copy link
Contributor Author

@nainar nainar left a 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.

1. Return the string representation of the keyword:
* center,
* inset,
* outset.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@nainar nainar closed this Jan 29, 2018
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 this pull request may close these issues.

None yet

3 participants