postcss / postcss.org

Official website for PostCSS
https://postcss.org
MIT License
81 stars 50 forks source link

[CSS Parser] @import's url and media parameter aren't being separated #249

Closed ianthedev closed 5 years ago

ianthedev commented 5 years ago

Currently, parsing the text of this style sheet:

<style>
    @import url('landscape.css') screen and (orientation: landscape);
</style>

is getting this result:

{
    "type": "root",
    "nodes": [
        {
            "type": "atrule",
            "name": "import",
            "params": "url('landscape.css') screen and (orientation: landscape)"
        }
    ]
}

The @import at-rule's url and media parameter aren't being separated in the parsed result. Is that working as intended?

ai commented 5 years ago

Yeap. Because at-rule params syntax could be very different (especially in plugins with custom syntax and unknown at-rules).