{"action":"created","issue":{"url":"https://api.github.com/repos/leeoniya/domvm/issues/108","repository_url":"https://api.github.com/repos/leeoniya/domvm","labels_url":"https://api.github.com/repos/leeoniya/domvm/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/leeoniya/domvm/issues/108/comments","events_url":"https://api.github.com/repos/leeoniya/domvm/issues/108/events","html_url":"https://github.com/leeoniya/domvm/issues/108","id":193378786,"number":108,"title":"view-scoped CSS via JSS","user":{"login":"leeoniya","id":43234,"avatar_url":"https://avatars.githubusercontent.com/u/43234?v=3","gravatar_id":"","url":"https://api.github.com/users/leeoniya","html_url":"https://github.com/leeoniya","followers_url":"https://api.github.com/users/leeoniya/followers","following_url":"https://api.github.com/users/leeoniya/following{/other_user}","gists_url":"https://api.github.com/users/leeoniya/gists{/gist_id}","starred_url":"https://api.github.com/users/leeoniya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeoniya/subscriptions","organizations_url":"https://api.github.com/users/leeoniya/orgs","repos_url":"https://api.github.com/users/leeoniya/repos","events_url":"https://api.github.com/users/leeoniya/events{/privacy}","received_events_url":"https://api.github.com/users/leeoniya/received_events","type":"User","site_admin":false},"labels":[{"id":283321875,"url":"https://api.github.com/repos/leeoniya/domvm/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":283321876,"url":"https://api.github.com/repos/leeoniya/domvm/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-12-04T21:52:24Z","updated_at":"2016-12-06T21:59:45Z","closed_at":null,"body":"Now that view closures can return `{render: ...}` objects, we should evaluate offering the option of returning `{css: ...}` as part of the mix, possibly accepting a JSS-style [1] stylesheet definition. Each vm is already tagged with a globally unique sequential `.id`, so the styles can be prefixed to isolate/prevent leakage. Another option is to prefix the defs with the `function.name` of the the view closure. This means all views created using the same closure would by styled uniformly. In both cases the view's root nodes would need the generated prefixes auto-appended to their className.\r\n\r\nJSS pairs well with vdom/hyperscript style libs since it's js-assembled CSS, much like like js-assembled DOM.\r\n\r\nThis would make for a good isolated and high-ROI project if anyone wants to take charge, since it wouldn't require intricate familiarity with domvm's internals. 98% of it can live decoupled as an addon.\r\n\r\ncc @grumpi, @yosbelms, @lawrence-dol\r\n\r\n[1] https://github.com/cssinjs/jss"},"comment":{"url":"https://api.github.com/repos/leeoniya/domvm/issues/comments/265286275","html_url":"https://github.com/leeoniya/domvm/issues/108#issuecomment-265286275","issue_url":"https://api.github.com/repos/leeoniya/domvm/issues/108","id":265286275,"user":{"login":"lawrence-dol","id":8662551,"avatar_url":"https://avatars.githubusercontent.com/u/8662551?v=3","gravatar_id":"","url":"https://api.github.com/users/lawrence-dol","html_url":"https://github.com/lawrence-dol","followers_url":"https://api.github.com/users/lawrence-dol/followers","following_url":"https://api.github.com/users/lawrence-dol/following{/other_user}","gists_url":"https://api.github.com/users/lawrence-dol/gists{/gist_id}","starred_url":"https://api.github.com/users/lawrence-dol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawrence-dol/subscriptions","organizations_url":"https://api.github.com/users/lawrence-dol/orgs","repos_url":"https://api.github.com/users/lawrence-dol/repos","events_url":"https://api.github.com/users/lawrence-dol/events{/privacy}","received_events_url":"https://api.github.com/users/lawrence-dol/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T21:59:45Z","updated_at":"2016-12-06T21:59:45Z","body":"> Then you can place any stylesheets that override after this position.\r\n\r\nHmmm. I don't think that will meet the need. This would be totally after the fact customization with zero modifications to the component code. \r\n\r\nSuch as my current project which comes out of the box aesthetically pleasing, but basic, and which the customer can trivially supply any number of CSS files loaded from their area of the web site containing targeted overriding styles. Therefore, it's important that the two style sheets, mine and theirs, are at the same level in the cascade, or that theirs' take precedence. And this can't be done with user stylesheets because they don't control _their_ customers' computers, so from the end-user's point of view, both at just stylesheets coming from the web server."}}
{"actor":{"display_login":"lawrence-dol"}}