Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@media groups not highlighted properly #11

Open
amadeus opened this issue Jun 19, 2013 · 2 comments
Open

@media groups not highlighted properly #11

amadeus opened this issue Jun 19, 2013 · 2 comments

Comments

@amadeus
Copy link
Contributor

amadeus commented Jun 19, 2013

It appears that any @media stuff within the opening { and closing } are not initially highlighted correctly because it's interpreted as cssPropRegion.

This sort of fixes itself after that first rule set since the closing } closes the cssPropRegion. However, it means the final closing } of the @media group is then not highlighted at all since it's just considered arbitrary text.

I don't know Vim syntax API well enough to fix this quickly, the only way I can think of is a hefty re-write of how cssPropRegion is defined.

@amadeus
Copy link
Contributor Author

amadeus commented Jun 19, 2013

Here's an included snippet that will show the error:

@media screen {
    .someClass {
        display:none;
    }
}

@chrisyip
Copy link
Owner

it means the final closing } of the @media group is then not highlighted at all since it's just considered arbitrary text

It's because cssFuncRegion can't work with nested regions: it only work well with single level.

Honestly, this script needs a full re-write to make it work better, but VimL doesn't match my expectation. That's why I stopped updating it. I'm waiting for the next Vim with Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants