{"action":"created","issue":{"url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/956","labels_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/956/labels{/name}","comments_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/956/comments","events_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/956/events","html_url":"https://github.com/backdrop/backdrop-issues/issues/956","id":82135627,"number":956,"title":"setting data-dialog-options maxWidth","user":{"login":"docwilmot","id":1042283,"avatar_url":"https://avatars.githubusercontent.com/u/1042283?v=3","gravatar_id":"","url":"https://api.github.com/users/docwilmot","html_url":"https://github.com/docwilmot","followers_url":"https://api.github.com/users/docwilmot/followers","following_url":"https://api.github.com/users/docwilmot/following{/other_user}","gists_url":"https://api.github.com/users/docwilmot/gists{/gist_id}","starred_url":"https://api.github.com/users/docwilmot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docwilmot/subscriptions","organizations_url":"https://api.github.com/users/docwilmot/orgs","repos_url":"https://api.github.com/users/docwilmot/repos","events_url":"https://api.github.com/users/docwilmot/events{/privacy}","received_events_url":"https://api.github.com/users/docwilmot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-28T21:39:16Z","updated_at":"2015-05-29T02:21:02Z","closed_at":null,"body":"I have a dialogue which refuses to be anything more than 300px.\r\nI've set `data-dialog-options` in the render array, and that can be seen to result in an updated width parameter. Unfortunately my new 'width' is overidden by a max-width on the page, so I'm trying to set a new maxWidth in `data-dialog-options`. But that never works, no matter how.\r\n\r\nIn short, how to set a new width for a dialogue?"},"comment":{"url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/comments/106658655","html_url":"https://github.com/backdrop/backdrop-issues/issues/956#issuecomment-106658655","issue_url":"https://api.github.com/repos/backdrop/backdrop-issues/issues/956","id":106658655,"user":{"login":"quicksketch","id":100206,"avatar_url":"https://avatars.githubusercontent.com/u/100206?v=3","gravatar_id":"","url":"https://api.github.com/users/quicksketch","html_url":"https://github.com/quicksketch","followers_url":"https://api.github.com/users/quicksketch/followers","following_url":"https://api.github.com/users/quicksketch/following{/other_user}","gists_url":"https://api.github.com/users/quicksketch/gists{/gist_id}","starred_url":"https://api.github.com/users/quicksketch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quicksketch/subscriptions","organizations_url":"https://api.github.com/users/quicksketch/orgs","repos_url":"https://api.github.com/users/quicksketch/repos","events_url":"https://api.github.com/users/quicksketch/events{/privacy}","received_events_url":"https://api.github.com/users/quicksketch/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T02:21:02Z","updated_at":"2015-05-29T02:21:02Z","body":"The best way to handle width in dialogs is to use 100% width (which I think is the default) then set a max-width on the dialog using CSS. However, the trick to setting max-width is giving the dialog a unique class that you can specifically target. So the best approach is using `data-dialog-options=\"{ dialogClass: 'my-dialog'; }\"`, then in CSS set the width with `.my-dialog { max-width: 500px }`. The nice thing about using a class is that it makes it possible to override the width in the theme or later CSS files."}}