{"action":"created","issue":{"url":"https://api.github.com/repos/devpunks/snuggsi/issues/57","repository_url":"https://api.github.com/repos/devpunks/snuggsi","labels_url":"https://api.github.com/repos/devpunks/snuggsi/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/devpunks/snuggsi/issues/57/comments","events_url":"https://api.github.com/repos/devpunks/snuggsi/issues/57/events","html_url":"https://github.com/devpunks/snuggsi/issues/57","id":235937948,"number":57,"title":"Object definitions for interpolated css styling","user":{"login":"RobertChristopher","id":13370420,"avatar_url":"https://avatars3.githubusercontent.com/u/13370420?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertChristopher","html_url":"https://github.com/RobertChristopher","followers_url":"https://api.github.com/users/RobertChristopher/followers","following_url":"https://api.github.com/users/RobertChristopher/following{/other_user}","gists_url":"https://api.github.com/users/RobertChristopher/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertChristopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertChristopher/subscriptions","organizations_url":"https://api.github.com/users/RobertChristopher/orgs","repos_url":"https://api.github.com/users/RobertChristopher/repos","events_url":"https://api.github.com/users/RobertChristopher/events{/privacy}","received_events_url":"https://api.github.com/users/RobertChristopher/received_events","type":"User","site_admin":false},"labels":[{"id":592131602,"url":"https://api.github.com/repos/devpunks/snuggsi/labels/Feature","name":"Feature","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":{"login":"snuggs","id":38223,"avatar_url":"https://avatars3.githubusercontent.com/u/38223?v=3","gravatar_id":"","url":"https://api.github.com/users/snuggs","html_url":"https://github.com/snuggs","followers_url":"https://api.github.com/users/snuggs/followers","following_url":"https://api.github.com/users/snuggs/following{/other_user}","gists_url":"https://api.github.com/users/snuggs/gists{/gist_id}","starred_url":"https://api.github.com/users/snuggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snuggs/subscriptions","organizations_url":"https://api.github.com/users/snuggs/orgs","repos_url":"https://api.github.com/users/snuggs/repos","events_url":"https://api.github.com/users/snuggs/events{/privacy}","received_events_url":"https://api.github.com/users/snuggs/received_events","type":"User","site_admin":false},"assignees":[{"login":"snuggs","id":38223,"avatar_url":"https://avatars3.githubusercontent.com/u/38223?v=3","gravatar_id":"","url":"https://api.github.com/users/snuggs","html_url":"https://github.com/snuggs","followers_url":"https://api.github.com/users/snuggs/followers","following_url":"https://api.github.com/users/snuggs/following{/other_user}","gists_url":"https://api.github.com/users/snuggs/gists{/gist_id}","starred_url":"https://api.github.com/users/snuggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snuggs/subscriptions","organizations_url":"https://api.github.com/users/snuggs/orgs","repos_url":"https://api.github.com/users/snuggs/repos","events_url":"https://api.github.com/users/snuggs/events{/privacy}","received_events_url":"https://api.github.com/users/snuggs/received_events","type":"User","site_admin":false},{"login":"RobertChristopher","id":13370420,"avatar_url":"https://avatars3.githubusercontent.com/u/13370420?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertChristopher","html_url":"https://github.com/RobertChristopher","followers_url":"https://api.github.com/users/RobertChristopher/followers","following_url":"https://api.github.com/users/RobertChristopher/following{/other_user}","gists_url":"https://api.github.com/users/RobertChristopher/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertChristopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertChristopher/subscriptions","organizations_url":"https://api.github.com/users/RobertChristopher/orgs","repos_url":"https://api.github.com/users/RobertChristopher/repos","events_url":"https://api.github.com/users/RobertChristopher/events{/privacy}","received_events_url":"https://api.github.com/users/RobertChristopher/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2017-06-14T16:29:34Z","updated_at":"2017-07-02T20:01:34Z","closed_at":null,"body":"As of now, declaring functions that return styles to be interpolated into elements requires imperative string concatenation.\r\n\r\nI propose the ability to define an object mapping of styles.\r\n\r\nExample:\r\n```html\r\n<input style={input_style}>\r\n```\r\n```js\r\nget input_style () {\r\n  return {\r\n    'visibility': 'hidden',\r\n    ...\r\n  }\r\n}\r\n```\r\n\r\nA naive implementation would be interpreting objects returned from tokens within the style tag and resolving them to their css representation.  An example abstraction for this is shown below.\r\n\r\n```js\r\nconst\r\n\r\n  createStyle = (params) => {\r\n    return Object.keys(params)\r\n      .filter((i) => params[i])\r\n      .map((param) => {\r\n        return `${param}=${params[param]}`\r\n      }).join(';')\r\n  }\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/devpunks/snuggsi/issues/comments/312513670","html_url":"https://github.com/devpunks/snuggsi/issues/57#issuecomment-312513670","issue_url":"https://api.github.com/repos/devpunks/snuggsi/issues/57","id":312513670,"user":{"login":"snuggs","id":38223,"avatar_url":"https://avatars3.githubusercontent.com/u/38223?v=3","gravatar_id":"","url":"https://api.github.com/users/snuggs","html_url":"https://github.com/snuggs","followers_url":"https://api.github.com/users/snuggs/followers","following_url":"https://api.github.com/users/snuggs/following{/other_user}","gists_url":"https://api.github.com/users/snuggs/gists{/gist_id}","starred_url":"https://api.github.com/users/snuggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snuggs/subscriptions","organizations_url":"https://api.github.com/users/snuggs/orgs","repos_url":"https://api.github.com/users/snuggs/repos","events_url":"https://api.github.com/users/snuggs/events{/privacy}","received_events_url":"https://api.github.com/users/snuggs/received_events","type":"User","site_admin":false},"created_at":"2017-07-02T20:01:34Z","updated_at":"2017-07-02T20:01:34Z","body":"@pachonk ❤️  https://github.com/devnacho/mountain_view/issues/52#issuecomment-312513471"}}
{"actor":{"display_login":"snuggs"}}