-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that cross-page styles do not apply
- Loading branch information
Showing
10 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
test/integration/css-fixtures/next-issue-15284/components/Banner/Banner.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import cx from 'classnames' | ||
import styles from './Banner.module.css' | ||
|
||
const Banner = ({ id, className, href }) => { | ||
return ( | ||
<div id={`hero-${id}`} className={cx(styles.Banner, className)}> | ||
<h1 style={{ margin: 0, padding: '2rem' }}>This is a test</h1> | ||
|
||
<Link href={href}> | ||
<a id={`link-${id}`} style={{ margin: 0, padding: '2rem' }}> | ||
Other Page | ||
</a> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default Banner |
5 changes: 5 additions & 0 deletions
5
test/integration/css-fixtures/next-issue-15284/components/Banner/Banner.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.Banner { | ||
height: 100vh; | ||
width: 100vw; | ||
background-color: #639; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// global CSS | ||
import './styles/globalStyles.css' | ||
|
||
function App({ Component, pageProps }) { | ||
return <Component {...pageProps} /> | ||
} | ||
|
||
export default App |
6 changes: 6 additions & 0 deletions
6
test/integration/css-fixtures/next-issue-15284/pages/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import styles from './styles/index.module.css' | ||
import Banner from '../components/Banner/Banner' | ||
|
||
export default function Index() { | ||
return <Banner id="home" className={styles.bannerOverride} href="/test" /> | ||
} |
8 changes: 8 additions & 0 deletions
8
test/integration/css-fixtures/next-issue-15284/pages/styles/globalStyles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
body { | ||
margin: 0; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
color: white; | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/css-fixtures/next-issue-15284/pages/styles/index.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.bannerOverride { | ||
height: 50vh; | ||
border: 1px solid red; | ||
background-color: #ff6347; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Banner from '../components/Banner/Banner' | ||
|
||
export default function Test() { | ||
return <Banner id="other" href="/" /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5567,6 +5567,7 @@ class-utils@^0.3.5: | |
[email protected]: | ||
version "2.2.6" | ||
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" | ||
integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== | ||
|
||
clean-stack@^2.0.0: | ||
version "2.2.0" | ||
|