Skip to content

Commit 051c1f6

Browse files
committed
fix(starter): remove dead :global block to fix CSS Modules purity error
The :global(.component *) block in ContentWrapper.module.scss targeted the literal un-mangled class .component, while ContentWrapper.js applies the mangled CSS module class — so these styles never matched. The block styles already work via global.scss importing _blocks.scss. Simply removing the dead :global block fixes the Next.js 16 purity error without needing any webpack overrides.
1 parent 15c38fa commit 051c1f6

1 file changed

Lines changed: 0 additions & 129 deletions

File tree

examples/next/faustwp-getting-started/components/ContentWrapper/ContentWrapper.module.scss

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -3,132 +3,3 @@
33
margin: 0 auto;
44
line-height: 1.6875;
55
}
6-
7-
:global(.component *) {
8-
// Scope WordPress block styles within ContentWrapper.
9-
@import '../../styles/blocks';
10-
11-
* {
12-
max-width: 100%;
13-
}
14-
15-
figure {
16-
margin-left: 0;
17-
margin-right: 0;
18-
}
19-
20-
h1,
21-
h2,
22-
h3,
23-
h4,
24-
h5,
25-
h6 {
26-
margin: 4.8rem 0;
27-
}
28-
29-
strong {
30-
font-weight: 700;
31-
}
32-
33-
a {
34-
color: var(--wpe--link--color);
35-
text-decoration: underline;
36-
37-
&:hover,
38-
&:focus {
39-
color: var(--wpe--link--color);
40-
text-decoration: none;
41-
}
42-
}
43-
44-
li {
45-
font-size: 1.6rem;
46-
}
47-
48-
img {
49-
display: block;
50-
height: auto;
51-
max-width: 100%;
52-
}
53-
54-
.alignleft {
55-
display: inline;
56-
float: left;
57-
margin-right: 1.5em;
58-
}
59-
60-
.alignright {
61-
display: inline;
62-
float: right;
63-
margin-left: 1.5em;
64-
}
65-
66-
.aligncenter {
67-
clear: both;
68-
display: block;
69-
margin-left: auto;
70-
margin-right: auto;
71-
}
72-
73-
code,
74-
pre {
75-
color: var(--color-white);
76-
background: var(--color-black);
77-
}
78-
79-
code {
80-
padding: 0.25rem 0.5rem;
81-
}
82-
83-
pre {
84-
max-width: 100%;
85-
overflow: auto;
86-
padding: 1rem;
87-
}
88-
89-
blockquote {
90-
border-top: 1px solid var(--color-black);
91-
border-bottom: 1px solid var(--color-black);
92-
font-style: italic;
93-
margin-top: 0;
94-
margin-left: 0;
95-
margin-right: 0;
96-
padding: 4rem 1rem 4rem;
97-
text-align: center;
98-
99-
&::before {
100-
content: '';
101-
display: block;
102-
font-size: 6rem;
103-
line-height: 0;
104-
margin: 2rem 0;
105-
}
106-
107-
> *:last-child {
108-
margin-bottom: 0;
109-
}
110-
}
111-
112-
table {
113-
border-collapse: collapse;
114-
width: 100%;
115-
}
116-
117-
thead th {
118-
border-bottom: 1px solid var(--wpe--color--border);
119-
padding-bottom: 0.5em;
120-
}
121-
122-
th {
123-
padding: 0.4rem 0;
124-
text-align: left;
125-
}
126-
127-
tr {
128-
border-bottom: 1px solid var(--wpe--color--border);
129-
}
130-
131-
td {
132-
padding: 0.4em;
133-
}
134-
}

0 commit comments

Comments
 (0)