{"action":"created","issue":{"url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/1300","repository_url":"https://api.github.com/repos/backdrop/backdrop-issues","labels_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/1300/labels{/name}","comments_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/1300/comments","events_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/1300/events","html_url":"https://github.com/backdrop/backdrop-issues/issues/1300","id":110480231,"number":1300,"title":"Add class to layout region.","user":{"login":"Gormartsen","id":5018896,"avatar_url":"https://avatars.githubusercontent.com/u/5018896?v=3","gravatar_id":"","url":"https://api.github.com/users/Gormartsen","html_url":"https://github.com/Gormartsen","followers_url":"https://api.github.com/users/Gormartsen/followers","following_url":"https://api.github.com/users/Gormartsen/following{/other_user}","gists_url":"https://api.github.com/users/Gormartsen/gists{/gist_id}","starred_url":"https://api.github.com/users/Gormartsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gormartsen/subscriptions","organizations_url":"https://api.github.com/users/Gormartsen/orgs","repos_url":"https://api.github.com/users/Gormartsen/repos","events_url":"https://api.github.com/users/Gormartsen/events{/privacy}","received_events_url":"https://api.github.com/users/Gormartsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/backdrop/backdrop-issues/labels/pr%20-%20needs%20review","name":"pr - needs review","color":"FFFFDD"},{"url":"https://api.github.com/repos/backdrop/backdrop-issues/labels/status%20-%20has%20pull%20request","name":"status - has pull request","color":"d4c5f9"},{"url":"https://api.github.com/repos/backdrop/backdrop-issues/labels/type%20-%20feature%20request","name":"type - feature request","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/backdrop/backdrop-issues/milestones/20","html_url":"https://github.com/backdrop/backdrop-issues/milestones/1.4.0","labels_url":"https://api.github.com/repos/backdrop/backdrop-issues/milestones/20/labels","id":1398592,"number":20,"title":"1.4.0","description":"1.4.0","creator":{"login":"jenlampton","id":397895,"avatar_url":"https://avatars.githubusercontent.com/u/397895?v=3","gravatar_id":"","url":"https://api.github.com/users/jenlampton","html_url":"https://github.com/jenlampton","followers_url":"https://api.github.com/users/jenlampton/followers","following_url":"https://api.github.com/users/jenlampton/following{/other_user}","gists_url":"https://api.github.com/users/jenlampton/gists{/gist_id}","starred_url":"https://api.github.com/users/jenlampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenlampton/subscriptions","organizations_url":"https://api.github.com/users/jenlampton/orgs","repos_url":"https://api.github.com/users/jenlampton/repos","events_url":"https://api.github.com/users/jenlampton/events{/privacy}","received_events_url":"https://api.github.com/users/jenlampton/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":4,"state":"open","created_at":"2015-11-06T22:11:56Z","updated_at":"2016-04-23T22:13:06Z","due_on":"2016-05-15T07:00:00Z","closed_at":null},"comments":22,"created_at":"2015-10-08T15:48:58Z","updated_at":"2016-04-25T03:25:23Z","closed_at":null,"body":"Add ability to add class to layout via template.php\r\nRight now class hard coded to layout tpl file.\r\n\r\nIt will help to support different layouts on theme level."},"comment":{"url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/comments/214109525","html_url":"https://github.com/backdrop/backdrop-issues/issues/1300#issuecomment-214109525","issue_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/1300","id":214109525,"user":{"login":"jenlampton","id":397895,"avatar_url":"https://avatars.githubusercontent.com/u/397895?v=3","gravatar_id":"","url":"https://api.github.com/users/jenlampton","html_url":"https://github.com/jenlampton","followers_url":"https://api.github.com/users/jenlampton/followers","following_url":"https://api.github.com/users/jenlampton/following{/other_user}","gists_url":"https://api.github.com/users/jenlampton/gists{/gist_id}","starred_url":"https://api.github.com/users/jenlampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenlampton/subscriptions","organizations_url":"https://api.github.com/users/jenlampton/orgs","repos_url":"https://api.github.com/users/jenlampton/repos","events_url":"https://api.github.com/users/jenlampton/events{/privacy}","received_events_url":"https://api.github.com/users/jenlampton/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T03:25:23Z","updated_at":"2016-04-25T03:25:23Z","body":"The request above came from a use-case that we do not recommend (or support). The layout UI should not be used to change the way a layout works. It should not be used to attach a grid-system to a layout that was not meant to have one. That kind of change should be done by creating a new layout - one that has the markup that's needed by the grid system (both HTML structure and classes) - and that includes only the style sheets that are needed (grid system OR otherwise, not both).\r\n\r\nAdding a UI that allows people to add another inner-wrapper with a specific class seems handy (and there are likely other use-cases we do want to support (like changing the background-color, or centering all the text) but I dislike the approach of adding in a new template file. \r\n\r\n1) If we add the \"configure your markup\" feature along with a tool that allows a front-end developer to override that same markup, that template will break the UI we are adding, creating additional USABILITY problems.\r\n\r\n1) Adding a new theme function / template file also increases complexity, and will make the theme system (and Layout system) harder for people to learn how to use. We specifically removed the `theme_region()` function after we forked from Drupal in an effort to clean up the theme layer. I would like to avoid adding it back. LEARNABILITY\r\n\r\n1) Adding a new template file that may need to be loaded and used on every region on a site also has performance implications (though granted, not much). PERFORMANCE\r\n\r\nThese issues touch on Backdrop's principles, and we should be careful that we are not introducing new code that goes against several of them, especially if this is a minority use-case. (tbd?)\r\n\r\nIf we want to add this feature, I'd recommend going about it a different way. If we throw away the approach that was done in panels and re-think this from a simpler perspective, there is a simpler solution that solves all 3 issues above: \r\n\r\nLet's just concatenate the inner-wrapper element around the content of the region! I have a PR in the works, working on getting tests passing. "}}