From c138ec6540292142f266776fee4d9db9f1c78dd8 Mon Sep 17 00:00:00 2001 From: Albertina Durante Date: Fri, 5 Feb 2016 16:55:21 -0300 Subject: [PATCH 1/2] Adding .DS_Store to .gitignore. This closes #1 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f1066ea..02175ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules /.idea/ +.DS_Store From bd511de8a5bef1e8efa332a678148911d72214c1 Mon Sep 17 00:00:00 2001 From: Tim Barham Date: Sat, 27 Feb 2016 15:41:57 +1000 Subject: [PATCH 2/2] Work-around for Chrome column bug. Remove 'overflow:hidden', which causes panels in all but the first column to be blank. Adjust padding-bottom to restore margin at the bottom of panels. These changes break rendering in other browsers, so added logic to make it Chrome specific. --- src/server/server.js | 7 ++++--- src/sim-host/sim-host.css | 26 ++++++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/server/server.js b/src/server/server.js index 9cfa364..fdf9faf 100644 --- a/src/server/server.js +++ b/src/server/server.js @@ -7,17 +7,18 @@ var path = require('path'), module.exports.attach = function (app) { app.get('/simulator/sim-host.css', function (request, response, next) { - // If target browser isn't Chrome (user agent contains 'Chrome', but isn't 'Edge'), remove shadow dom stuff from - // the CSS file. var userAgent = request.headers['user-agent']; if (userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Edge/') === -1) { next(); } else { + // If target browser isn't Chrome (user agent contains 'Chrome', but isn't 'Edge'), remove shadow dom stuff from + // the CSS file. Also remove any sections marked as Chrome specific. send(request, path.resolve(simulateServer.dirs.hostRoot['sim-host'], 'sim-host.css'), { transform: function (stream) { return stream .pipe(replaceStream('> ::content >', '>')) - .pipe(replaceStream(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, ' ')); + .pipe(replaceStream(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, ' ')) + .pipe(replaceStream(/\/\* BEGIN CHROME ONLY \*\/[\s\S]*\/\* END CHROME ONLY \*\//gm, '')); } }).pipe(response); } diff --git a/src/sim-host/sim-host.css b/src/sim-host/sim-host.css index d8f39f7..7232ed2 100644 --- a/src/sim-host/sim-host.css +++ b/src/sim-host/sim-host.css @@ -5,7 +5,7 @@ body { padding: 0 !important; border: 0 !important; font-family: 'Helvetica Neue', 'Roboto', 'Segoe UI', sans-serif; - background: rgb(238,238,238); + background: rgb(238, 238, 238); user-select: none; -moz-user-select: none; -ms-user-select: none; @@ -28,7 +28,7 @@ a { outline: none; cursor: pointer; font-size: 12px; - color: rgb(128,128,128); + color: rgb(128, 128, 128); } cordova-panel { @@ -43,9 +43,9 @@ cordova-dialog { cordova-panel, cordova-dialog { z-index: 50; position: relative; - -webkit-column-break-inside:avoid; - page-break-inside:avoid; - break-inside:avoid; + -webkit-column-break-inside: avoid; + page-break-inside: avoid; + break-inside: avoid; display: block; } @@ -227,7 +227,7 @@ body /deep/ .cordova-radio-label { padding-left: 0.25em; } -body /deep/ cordova-item+cordova-item { +body /deep/ cordova-item + cordova-item { display: block; border-top: #d3d3d3 1px solid; margin-top: 10px; @@ -305,3 +305,17 @@ body /deep/ .cordova-content { .cordova-main { padding-bottom: 40px; } + +/* Hacks to work around multi-column bug in Chrome 48+. The following section + is removed for other browsers when the file is served */ + +/* BEGIN CHROME ONLY */ +body /deep/ .cordova-panel-inner { + overflow: visible; + padding-bottom: 1px; +} + +body /deep/ .cordova-content { + overflow: visible; +} +/* END CHROME ONLY */