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:
parent
cce1cc55ca
commit
cdd6cf7d3e
2 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,11 @@
|
|||
background: #fff;
|
||||
}
|
||||
|
||||
/* Flexbox fix. https://github.com/TryGhost/Ghost/issues/5804#issuecomment-141416812 */
|
||||
.gh-main > section {
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
|
||||
/* Global Nav
|
||||
/* ---------------------------------------------------------- */
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue