<style>
div { color: green }
</style>

<p>Test that CSS parser stops parsing @media rule after a semicolon or a block.</p>

<div>Tests @media;. This text should be green.</div>
<div>Tests @media{}. This text should be green.</div>
