summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/optimize/postcss-scoped-styles/index.ts8
-rw-r--r--src/compiler/optimize/styles.ts1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/optimize/postcss-scoped-styles/index.ts b/src/compiler/optimize/postcss-scoped-styles/index.ts
index 7949f63b5..a4afd99aa 100644
--- a/src/compiler/optimize/postcss-scoped-styles/index.ts
+++ b/src/compiler/optimize/postcss-scoped-styles/index.ts
@@ -50,7 +50,13 @@ export function scopeSelectors(selector: string, className: string) {
// leave :global() alone!
if (value.startsWith(':global(')) {
- ss = head + ss.substring(start, end).replace(':global(', '').replace(')', '') + tail;
+ ss =
+ head +
+ ss
+ .substring(start, end)
+ .replace(/^:global\(/, '')
+ .replace(/\)$/, '') +
+ tail;
continue;
}
diff --git a/src/compiler/optimize/styles.ts b/src/compiler/optimize/styles.ts
index 6f0cd9361..fa32445ba 100644
--- a/src/compiler/optimize/styles.ts
+++ b/src/compiler/optimize/styles.ts
@@ -205,7 +205,6 @@ export default function ({ filename, fileID }: { filename: string; fileID: strin
// 3b. Update <style> attributes
const styleTypeIndex = styleNodes[n].attributes.findIndex(({ name }: any) => name === 'type');
if (styleTypeIndex !== -1) {
- console.log(styleNodes[n].attributes[styleTypeIndex]);
styleNodes[n].attributes[styleTypeIndex].value[0].raw = 'text/css';
styleNodes[n].attributes[styleTypeIndex].value[0].data = 'text/css';
} else {