{"action":"created","issue":{"url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit/issues/256","repository_url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit","labels_url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit/issues/256/comments","events_url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit/issues/256/events","html_url":"https://github.com/AusDTO/gov-au-ui-kit/issues/256","id":169512168,"number":256,"title":"Eliminate unnecessary nesting / flatten selectors out","user":{"login":"jonathanconway","id":310330,"avatar_url":"https://avatars.githubusercontent.com/u/310330?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanconway","html_url":"https://github.com/jonathanconway","followers_url":"https://api.github.com/users/jonathanconway/followers","following_url":"https://api.github.com/users/jonathanconway/following{/other_user}","gists_url":"https://api.github.com/users/jonathanconway/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanconway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanconway/subscriptions","organizations_url":"https://api.github.com/users/jonathanconway/orgs","repos_url":"https://api.github.com/users/jonathanconway/repos","events_url":"https://api.github.com/users/jonathanconway/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanconway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-05T01:48:31Z","updated_at":"2016-08-05T04:49:35Z","closed_at":null,"body":"Can we remove nesting that isn't strictly necessary in order to render the component in a visually correct way?\r\n\r\nFor example, in [_forms.scss](https://github.com/AusDTO/gov-au-ui-kit/blob/develop/assets/sass/_forms.scss#L72), instead of this...\r\n`form {\r\n  ...\r\n  .hint {\r\n    ...\r\n  }`\r\n\r\n...can we just have this?\r\n`.hint {\r\n  ...\r\n}`\r\n\r\nReasons:\r\n\r\n1) Specificity conflict. If I try to hide the hint by adding a `.hidden` class, the `display:block` from the `.hint` class interferes with the `display:none` from the `.hidden` class. This is due to the [higher precedence](http://stackoverflow.com/a/25105841) resulting from the nesting.\r\n\r\n2) We don't always know where components will be used ahead of time. I don't think there's any guarantee, for example, that a `.hint` would never be used outside of a form. If we were do have hard rules on *only* using a certain class within another certain class, then how about we present that class as part of one component, rather than as a individual component itself?\r\n\r\nHappy to implement these changes myself. For the time being I will hack it to work for IDP.\r\n\r\nThanks for your attention."},"comment":{"url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit/issues/comments/237754447","html_url":"https://github.com/AusDTO/gov-au-ui-kit/issues/256#issuecomment-237754447","issue_url":"https://api.github.com/repos/AusDTO/gov-au-ui-kit/issues/256","id":237754447,"user":{"login":"klepas","id":52766,"avatar_url":"https://avatars.githubusercontent.com/u/52766?v=3","gravatar_id":"","url":"https://api.github.com/users/klepas","html_url":"https://github.com/klepas","followers_url":"https://api.github.com/users/klepas/followers","following_url":"https://api.github.com/users/klepas/following{/other_user}","gists_url":"https://api.github.com/users/klepas/gists{/gist_id}","starred_url":"https://api.github.com/users/klepas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klepas/subscriptions","organizations_url":"https://api.github.com/users/klepas/orgs","repos_url":"https://api.github.com/users/klepas/repos","events_url":"https://api.github.com/users/klepas/events{/privacy}","received_events_url":"https://api.github.com/users/klepas/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T04:49:35Z","updated_at":"2016-08-05T04:49:35Z","body":"@jonathanconway In general, I’m quite wary of helper classes. I think I’m still in the position currently where I feel we might be able to anticipate the need for additional classes.\r\n\r\nI vote we have a catchup about this.\r\n\r\nI also vote for cleaning up some of the code that you addressed above."}}
{"actor":{"display_login":"klepas"}}