{"action":"created","issue":{"url":"https://api.github.com/repos/AngleSharp/AngleSharp/issues/38","labels_url":"https://api.github.com/repos/AngleSharp/AngleSharp/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/AngleSharp/AngleSharp/issues/38/comments","events_url":"https://api.github.com/repos/AngleSharp/AngleSharp/issues/38/events","html_url":"https://github.com/AngleSharp/AngleSharp/issues/38","id":49783966,"number":38,"title":"Preserve exact content when round tripping CSS stylesheets","user":{"login":"corliss","id":1443143,"avatar_url":"https://avatars.githubusercontent.com/u/1443143?v=3","gravatar_id":"","url":"https://api.github.com/users/corliss","html_url":"https://github.com/corliss","followers_url":"https://api.github.com/users/corliss/followers","following_url":"https://api.github.com/users/corliss/following{/other_user}","gists_url":"https://api.github.com/users/corliss/gists{/gist_id}","starred_url":"https://api.github.com/users/corliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corliss/subscriptions","organizations_url":"https://api.github.com/users/corliss/orgs","repos_url":"https://api.github.com/users/corliss/repos","events_url":"https://api.github.com/users/corliss/events{/privacy}","received_events_url":"https://api.github.com/users/corliss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AngleSharp/AngleSharp/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"FlorianRappl","id":1766191,"avatar_url":"https://avatars.githubusercontent.com/u/1766191?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianRappl","html_url":"https://github.com/FlorianRappl","followers_url":"https://api.github.com/users/FlorianRappl/followers","following_url":"https://api.github.com/users/FlorianRappl/following{/other_user}","gists_url":"https://api.github.com/users/FlorianRappl/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianRappl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianRappl/subscriptions","organizations_url":"https://api.github.com/users/FlorianRappl/orgs","repos_url":"https://api.github.com/users/FlorianRappl/repos","events_url":"https://api.github.com/users/FlorianRappl/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianRappl/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/AngleSharp/AngleSharp/milestones/4","html_url":"https://github.com/AngleSharp/AngleSharp/milestones/v0.9","labels_url":"https://api.github.com/repos/AngleSharp/AngleSharp/milestones/4/labels","id":921049,"number":4,"title":"v0.9","description":"","creator":{"login":"FlorianRappl","id":1766191,"avatar_url":"https://avatars.githubusercontent.com/u/1766191?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianRappl","html_url":"https://github.com/FlorianRappl","followers_url":"https://api.github.com/users/FlorianRappl/followers","following_url":"https://api.github.com/users/FlorianRappl/following{/other_user}","gists_url":"https://api.github.com/users/FlorianRappl/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianRappl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianRappl/subscriptions","organizations_url":"https://api.github.com/users/FlorianRappl/orgs","repos_url":"https://api.github.com/users/FlorianRappl/repos","events_url":"https://api.github.com/users/FlorianRappl/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianRappl/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":33,"state":"closed","created_at":"2015-01-04T15:40:59Z","updated_at":"2015-08-26T23:10:28Z","due_on":"2015-08-25T22:00:00Z","closed_at":"2015-08-26T23:10:28Z"},"comments":40,"created_at":"2014-11-22T11:29:05Z","updated_at":"2015-09-09T17:06:15Z","closed_at":"2015-08-26T15:18:50Z","body":"Deserialization + serialization of a stylesheet should result in exactly the original stylesheet, including all whitespaces. This is an important guarantee in real-world editing - the user's formatting should not be messed up.\r\n\r\n1) If portions of a stylesheet are modified, only the formatting of those portions should be changed.\r\n2) All content from the source should be represented by something in the DOM. As an example of what I mean see [this](http://joshvarty.wordpress.com/2014/07/11/learn-roslyn-now-part-3-syntax-nodes-and-syntax-tokens/) description of how Roslyn represents .net source code.\r\n\r\nA straightforward way of achieving this is to store the original parsed text of any `ICssObject`. Then when ToCss() is called it can just return the text instead of recomputing it. Recomputing is only required if the `ICssObject` is modified. (As an optimization, rather than copying the text of the original document into every element, one can keep the entire document as a string and reference sections of the string from within the `ICssObject`. But this is just a possible implementation detail.)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AngleSharp/AngleSharp/issues/comments/138977282","html_url":"https://github.com/AngleSharp/AngleSharp/issues/38#issuecomment-138977282","issue_url":"https://api.github.com/repos/AngleSharp/AngleSharp/issues/38","id":138977282,"user":{"login":"corliss","id":1443143,"avatar_url":"https://avatars.githubusercontent.com/u/1443143?v=3","gravatar_id":"","url":"https://api.github.com/users/corliss","html_url":"https://github.com/corliss","followers_url":"https://api.github.com/users/corliss/followers","following_url":"https://api.github.com/users/corliss/following{/other_user}","gists_url":"https://api.github.com/users/corliss/gists{/gist_id}","starred_url":"https://api.github.com/users/corliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corliss/subscriptions","organizations_url":"https://api.github.com/users/corliss/orgs","repos_url":"https://api.github.com/users/corliss/repos","events_url":"https://api.github.com/users/corliss/events{/privacy}","received_events_url":"https://api.github.com/users/corliss/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T17:06:15Z","updated_at":"2015-09-09T17:06:15Z","body":"Could we reopen this issue for the CssNode request? It has all the detailed history. There is just a single set of related changes here, and at this point very contained.\r\n\r\nThe ISelector enhancements should be in a new issue, I agree."}}