mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
0d6ceec8db
* Add styled-jsx-postcss example * Remove commented code
23 lines
513 B
JavaScript
23 lines
513 B
JavaScript
export default () => (
|
|
<div className='hello'>
|
|
<p>Hello World</p>
|
|
<style jsx>{`
|
|
:global(:root) {
|
|
--bgColor: green;
|
|
--color: white;
|
|
}
|
|
.hello {
|
|
font: 15px Helvetica, Arial, sans-serif;
|
|
background: var(--bgColor);
|
|
color: var(--color);
|
|
padding: 100px;
|
|
text-align: center;
|
|
transition: 100ms ease-in background;
|
|
}
|
|
.hello:hover {
|
|
color: color(var(--color) blackness(+80%));
|
|
}
|
|
`}</style>
|
|
</div>
|
|
)
|