Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit b453172

Browse files
committed
Merge branch 'master' into albertinad/thirdparty
2 parents ae907cf + bd511de commit b453172

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
/.idea/
3+
.DS_Store

src/server/server.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ var path = require('path'),
77

88
module.exports.attach = function (app) {
99
app.get('/simulator/sim-host.css', function (request, response, next) {
10-
// If target browser isn't Chrome (user agent contains 'Chrome', but isn't 'Edge'), remove shadow dom stuff from
11-
// the CSS file.
1210
var userAgent = request.headers['user-agent'];
1311
if (userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Edge/') === -1) {
1412
next();
1513
} else {
14+
// If target browser isn't Chrome (user agent contains 'Chrome', but isn't 'Edge'), remove shadow dom stuff from
15+
// the CSS file. Also remove any sections marked as Chrome specific.
1616
send(request, path.resolve(simulateServer.dirs.hostRoot['sim-host'], 'sim-host.css'), {
1717
transform: function (stream) {
1818
return stream
1919
.pipe(replaceStream('> ::content >', '>'))
20-
.pipe(replaceStream(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, ' '));
20+
.pipe(replaceStream(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, ' '))
21+
.pipe(replaceStream(/\/\* BEGIN CHROME ONLY \*\/[\s\S]*\/\* END CHROME ONLY \*\//gm, ''));
2122
}
2223
}).pipe(response);
2324
}

src/sim-host/sim-host.css

+20-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body {
55
padding: 0 !important;
66
border: 0 !important;
77
font-family: 'Helvetica Neue', 'Roboto', 'Segoe UI', sans-serif;
8-
background: rgb(238,238,238);
8+
background: rgb(238, 238, 238);
99
user-select: none;
1010
-moz-user-select: none;
1111
-ms-user-select: none;
@@ -28,7 +28,7 @@ a {
2828
outline: none;
2929
cursor: pointer;
3030
font-size: 12px;
31-
color: rgb(128,128,128);
31+
color: rgb(128, 128, 128);
3232
}
3333

3434
cordova-panel {
@@ -43,9 +43,9 @@ cordova-dialog {
4343
cordova-panel, cordova-dialog {
4444
z-index: 50;
4545
position: relative;
46-
-webkit-column-break-inside:avoid;
47-
page-break-inside:avoid;
48-
break-inside:avoid;
46+
-webkit-column-break-inside: avoid;
47+
page-break-inside: avoid;
48+
break-inside: avoid;
4949
display: block;
5050
}
5151

@@ -227,7 +227,7 @@ body /deep/ .cordova-radio-label {
227227
padding-left: 0.25em;
228228
}
229229

230-
body /deep/ cordova-item+cordova-item {
230+
body /deep/ cordova-item + cordova-item {
231231
display: block;
232232
border-top: #d3d3d3 1px solid;
233233
margin-top: 10px;
@@ -305,3 +305,17 @@ body /deep/ .cordova-content {
305305
.cordova-main {
306306
padding-bottom: 40px;
307307
}
308+
309+
/* Hacks to work around multi-column bug in Chrome 48+. The following section
310+
is removed for other browsers when the file is served */
311+
312+
/* BEGIN CHROME ONLY */
313+
body /deep/ .cordova-panel-inner {
314+
overflow: visible;
315+
padding-bottom: 1px;
316+
}
317+
318+
body /deep/ .cordova-content {
319+
overflow: visible;
320+
}
321+
/* END CHROME ONLY */

0 commit comments

Comments
 (0)