Skip to content

Commit 4b6a51e

Browse files
committed
Replace global styling in demos
1 parent 346807a commit 4b6a51e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/functions.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ export const getCSS = (req, codePath) => {
393393
if (css && codePath) {
394394
css = replaceURLs(css, codePath);
395395
}
396+
397+
// Prevent demo.css from affecting the whole view page
398+
css = css
399+
.replace('* {', '/* Replaced from * selector */\n#demo-content {')
400+
.replace('body {', '/* Replaced from body selector */\n#demo-content {');
401+
396402
return css;
397403
}
398404

public/stylesheets/style.less

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ body {
3333
background: var(--background-color);
3434
color: var(--text-color);
3535
transition: background 250ms, color 250ms;
36-
}
37-
38-
body:not(body.view) {
3936
font-family: Arial, Helvetica, sans-serif;
4037
}
4138

0 commit comments

Comments
 (0)