1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-styled-jsx-postcss/pages/index.js
Giuseppe 0d6ceec8db Add styled-jsx-postcss example (#781)
* Add styled-jsx-postcss example

* Remove commented code
2017-01-15 19:59:22 -08:00

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>
)