{"action":"created","issue":{"url":"https://api.github.com/repos/ceolter/ag-grid/issues/1084","repository_url":"https://api.github.com/repos/ceolter/ag-grid","labels_url":"https://api.github.com/repos/ceolter/ag-grid/issues/1084/labels{/name}","comments_url":"https://api.github.com/repos/ceolter/ag-grid/issues/1084/comments","events_url":"https://api.github.com/repos/ceolter/ag-grid/issues/1084/events","html_url":"https://github.com/ceolter/ag-grid/pull/1084","id":171510374,"number":1084,"title":"Fix to theme-common making theming more flexible","user":{"login":"tomek-d","id":13285653,"avatar_url":"https://avatars.githubusercontent.com/u/13285653?v=3","gravatar_id":"","url":"https://api.github.com/users/tomek-d","html_url":"https://github.com/tomek-d","followers_url":"https://api.github.com/users/tomek-d/followers","following_url":"https://api.github.com/users/tomek-d/following{/other_user}","gists_url":"https://api.github.com/users/tomek-d/gists{/gist_id}","starred_url":"https://api.github.com/users/tomek-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomek-d/subscriptions","organizations_url":"https://api.github.com/users/tomek-d/orgs","repos_url":"https://api.github.com/users/tomek-d/repos","events_url":"https://api.github.com/users/tomek-d/events{/privacy}","received_events_url":"https://api.github.com/users/tomek-d/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-16T20:32:29Z","updated_at":"2016-08-17T10:47:02Z","closed_at":"2016-08-17T10:43:08Z","pull_request":{"url":"https://api.github.com/repos/ceolter/ag-grid/pulls/1084","html_url":"https://github.com/ceolter/ag-grid/pull/1084","diff_url":"https://github.com/ceolter/ag-grid/pull/1084.diff","patch_url":"https://github.com/ceolter/ag-grid/pull/1084.patch"},"body":"I would like to propose small change to make theming more flexible. \r\n\r\nRight now theming works as follow: \r\n- there is one file `theme-common.styl` that defines all common styles but requires some variables to be defined\r\n- every theme defines all variables required by `theme-common.styl` and then includes this file\r\n- as a result css file is generated with root class name `.ag-common`\r\n- this magic class name is replaced on the fly by gulp task to match theme name eg. `.ag-blue`\r\n\r\nThis works fine but this is also a limitation. It is hard to create another theme by importing `theme-common.styl` one need to remember to replace this static class name.\r\n\r\nAs a solution to that problem I would like to propose dynamic class name generation. Every theme file has already variable named `ag-style` with theme name. To make it working all that need to be done is to define root class name in `theme-common.styl` as dynamic class name: `ag-${ag-style}` instead of giving it static name. Thanks to that workaround with replacing class name on the fly can be removed, and creating new themes is no longer problematic.\r\n\r\nThanks.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ceolter/ag-grid/issues/comments/240377308","html_url":"https://github.com/ceolter/ag-grid/pull/1084#issuecomment-240377308","issue_url":"https://api.github.com/repos/ceolter/ag-grid/issues/1084","id":240377308,"user":{"login":"ceolter","id":6539563,"avatar_url":"https://avatars.githubusercontent.com/u/6539563?v=3","gravatar_id":"","url":"https://api.github.com/users/ceolter","html_url":"https://github.com/ceolter","followers_url":"https://api.github.com/users/ceolter/followers","following_url":"https://api.github.com/users/ceolter/following{/other_user}","gists_url":"https://api.github.com/users/ceolter/gists{/gist_id}","starred_url":"https://api.github.com/users/ceolter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceolter/subscriptions","organizations_url":"https://api.github.com/users/ceolter/orgs","repos_url":"https://api.github.com/users/ceolter/repos","events_url":"https://api.github.com/users/ceolter/events{/privacy}","received_events_url":"https://api.github.com/users/ceolter/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T10:47:02Z","updated_at":"2016-08-17T10:47:02Z","body":"cool! thanks :)"}}
{"actor":{"display_login":"ceolter"}}