You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>CSS Modules are an optional feature and are only enabled for files with the .module.css extension. </p>
20
+
<pclassName={styles.error}>This is made with an imported css module</p>
21
+
22
+
<h2>Import styles from <code>node_modules</code></h2>
23
+
<p>This page imports a node module's css file for the dialog below:</p>
24
+
<ExampleDialog/>
25
+
26
+
<h2>Sass Support</h2>
27
+
<p>✅ Sass variable imported, color: {variables.primaryColor||<code>Error. Something went wrong</code>}</p>
28
+
29
+
<divdata-testid="css-in-js">
30
+
<h2>CSS-in-JS</h2>
31
+
<p>NextJS bundles styled-jsx to provide support for isolated scoped CSS. The aim is to support "shadow CSS" similar to Web Components, which unfortunately do not support server-rendering and are JS-only.</p>
32
+
<stylejsx>{`
33
+
p {
34
+
color: white;
35
+
font-weight: 500;
36
+
margin: 20px;
37
+
}
38
+
div {
39
+
background: orange;
40
+
}
41
+
`}</style>
42
+
<p>This section should be differently styled compared to the others (i.e. orange background)</p>
<p>The React model allows us to deconstruct a page into a series of components. Many of these components are often reused between pages. For example, you might have the same navigation bar and footer on every page.</p>
10
+
<p>This page should have an <code>span</code> tag that is added through a layout and the title should have changed in a <code>useEffect</code></p>
11
+
</div>
12
+
)
13
+
}
14
+
15
+
16
+
Layouts.getLayout=functiongetLayout(page){
17
+
return(
18
+
<TestLayout>{page}</TestLayout>
19
+
)
20
+
}
21
+
22
+
functionTestLayout({children}){
23
+
useEffect(()=>{
24
+
// Update the document title using the browser API
0 commit comments