{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/13892","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/13892/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/13892/comments","events_url":"https://api.github.com/repos/servo/servo/issues/13892/events","html_url":"https://github.com/servo/servo/issues/13892","id":184630440,"number":13892,"title":"Fix linear gradient's specified form","user":{"login":"canaltinova","id":466239,"avatar_url":"https://avatars.githubusercontent.com/u/466239?v=3","gravatar_id":"","url":"https://api.github.com/users/canaltinova","html_url":"https://github.com/canaltinova","followers_url":"https://api.github.com/users/canaltinova/followers","following_url":"https://api.github.com/users/canaltinova/following{/other_user}","gists_url":"https://api.github.com/users/canaltinova/gists{/gist_id}","starred_url":"https://api.github.com/users/canaltinova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canaltinova/subscriptions","organizations_url":"https://api.github.com/users/canaltinova/orgs","repos_url":"https://api.github.com/users/canaltinova/repos","events_url":"https://api.github.com/users/canaltinova/events{/privacy}","received_events_url":"https://api.github.com/users/canaltinova/received_events","type":"User","site_admin":false},"labels":[{"id":15997587,"url":"https://api.github.com/repos/servo/servo/labels/A-content/css","name":"A-content/css","color":"d7e102","default":false},{"id":89384911,"url":"https://api.github.com/repos/servo/servo/labels/C-assigned","name":"C-assigned","color":"02d7e1","default":false},{"id":83597783,"url":"https://api.github.com/repos/servo/servo/labels/E-less%20easy","name":"E-less easy","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-22T13:28:16Z","updated_at":"2016-12-14T17:09:55Z","closed_at":null,"body":"Currently linear gradient is not preserving the current corner directions if just one corner is specified. We should fix thix. The specified form of the linear gradient should preserve the corners and it should convert to angle in ToComputedValue implementation.\r\n\r\nTo give a  more details, you need to convert [this](https://github.com/servo/servo/blob/dee1a65a6983188a125f820b8bc9505f4909e171/components/style/values/specified/image.rs#L231) enum's `HorizontalDirection` and `VerticalDirection` to `Option<HorizontalDirection>` and `Option<HorizontalDirection>` and set it [here](https://github.com/servo/servo/blob/dee1a65a6983188a125f820b8bc9505f4909e171/components/style/values/specified/image.rs#L262-L279) directly without converting to Angle. \r\n\r\nThis corner to angle conversion should be moved to ToComputedValue implementation, to do this you should remove [this](https://github.com/servo/servo/blob/dee1a65a6983188a125f820b8bc9505f4909e171/components/style/values/specified/image.rs#L289) line and write the implementation in `components/style/values/computed/image.rs` [GradientKind implemetation](https://github.com/servo/servo/blob/5f2e7af864e3d190957f58b317bf56cce8a84795/components/style/values/computed/image.rs#L181-L208) should give a hint to how to do it.\r\n\r\nAlso you can see [this part](https://github.com/servo/servo/wiki/Property-hacking-guide#tocomputedvalue-conversions) of the Property hacking guide to see how to implement a ToComputedValue conversion.\r\n\r\nIt may require some additional changes but compile errors will give you hint about that. And of course you can ask here if you have any questions.\r\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/267093386","html_url":"https://github.com/servo/servo/issues/13892#issuecomment-267093386","issue_url":"https://api.github.com/repos/servo/servo/issues/13892","id":267093386,"user":{"login":"DominoTree","id":5438118,"avatar_url":"https://avatars.githubusercontent.com/u/5438118?v=3","gravatar_id":"","url":"https://api.github.com/users/DominoTree","html_url":"https://github.com/DominoTree","followers_url":"https://api.github.com/users/DominoTree/followers","following_url":"https://api.github.com/users/DominoTree/following{/other_user}","gists_url":"https://api.github.com/users/DominoTree/gists{/gist_id}","starred_url":"https://api.github.com/users/DominoTree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DominoTree/subscriptions","organizations_url":"https://api.github.com/users/DominoTree/orgs","repos_url":"https://api.github.com/users/DominoTree/repos","events_url":"https://api.github.com/users/DominoTree/events{/privacy}","received_events_url":"https://api.github.com/users/DominoTree/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T17:09:55Z","updated_at":"2016-12-14T17:09:55Z","body":"@canaltinova I've been hacking on this some but I'm having trouble wrapping my head around it as a whole.  Could you take a look at https://github.com/servo/servo/compare/master...DominoTree:master and see if it looks like I'm moving in the right direction or if anything jumps out at you?  Right now, I'm trying to figure out the `parse` method."}}
{"actor":{"display_login":"DominoTree"}}