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

SCSS functions not correctly marked #237

Closed
jaydenseric opened this issue Apr 20, 2014 · 6 comments
Closed

SCSS functions not correctly marked #237

jaydenseric opened this issue Apr 20, 2014 · 6 comments

Comments

@jaydenseric
Copy link

SCSS functions are not marked at all.

In this example, myfunction should be marked with the classnames token function like when highlighting functions in JS.

::before {
    content: myfunction($variable);
}
@LeaVerou
Copy link
Member

ping @MoOx

Perhaps we could copy the one from prism-clike for functions?

@jaydenseric
Copy link
Author

I haven't tried it out, but this might also be relevant in CSS for things like this:

a::after {
    content: attr(href);
}

@LeaVerou
Copy link
Member

Yeah, there's a token in css-extras for this, but it's far from ideal (see #239) :/

@jaydenseric
Copy link
Author

Well, SCSS highlighting extends CSS highlighting, right? So if we fix #239 to pick up on all functions (not from a hardcoded list) it would kill two birds with one stone.

What defines CSS extras as special, should there not just be one well-done CSS mode? Maybe it's documented somewhere what features "extras" adds but I can't easily find it.

@LeaVerou
Copy link
Member

I think the main reason was that you rarely need that kind of fine grained highlighting for CSS, and I didn't want to bloat the main CSS definition. However, functions are rather common, so I wouldn't object to moving them into the main CSS definition after we fix them. Especially since they'd also solve this issue.

@LeaVerou
Copy link
Member

Closing, see #425

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

No branches or pull requests

3 participants