rsnext/test/integration/css/fixtures/with-styled-jsx/pages/index.js
Joe Haddad ed84bee503
Fix Experimental CSS Ordering (#8790)
* Fix CSS Ordering
This fixes CSS ordering between development and production.

Before this change, globally imported CSS would come _after_ `<style jsx global>` in development, but _before_ in production.

After this change, it'll always be applied before.

* Move to correct element

* Add tests

* Fix obnoxious indents

* Update test/integration/css/fixtures/with-styled-jsx/pages/index.js

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-09-18 20:18:41 -04:00

12 lines
227 B
JavaScript

export default function Home () {
return (
<>
<div className='my-text'>This text should be green.</div>
<style jsx global>{`
.my-text {
color: green;
}
`}</style>
</>
)
}