0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fix over-sized editor pane widths

closes #5804, supersedes and closes #5820
- adds a fixed width that flexbox can expand from to prevent flexbox content dictating the width (see https://github.com/TryGhost/Ghost/issues/5804#issuecomment-141416812)
- adds a hack to the casperjs tests reverting the CSS change because phantomjs and flexbox don't get along
This commit is contained in:
Kevin Ansfield 2015-09-22 17:36:27 +01:00
parent cce1cc55ca
commit cdd6cf7d3e
2 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,11 @@
background: #fff;
}
/* Flexbox fix. https://github.com/TryGhost/Ghost/issues/5804#issuecomment-141416812 */
.gh-main > section {
width: 1px;
}
/* Global Nav
/* ---------------------------------------------------------- */

View file

@ -206,6 +206,12 @@ casper.thenOpenAndWaitForPageLoad = function (screen, then, timeout) {
timeout = timeout || casper.failOnTimeout(casper.test, 'Unable to load ' + screen);
return casper.thenOpen(url + screens[screen].url).then(function () {
// HACK: phantomjs + flexbox = nope. Fix offending styles here.
casper.evaluate(function () {
var style = document.createElement('style');
style.innerHTML = '.gh-main > section { width: auto; }';
document.body.appendChild(style);
});
return casper.waitForScreenLoad(screen, then, timeout);
});
};