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

Support for IE CSS expressions #52

Open
nschonni opened this issue Dec 31, 2012 · 7 comments
Open

Support for IE CSS expressions #52

nschonni opened this issue Dec 31, 2012 · 7 comments

Comments

@nschonni
Copy link
Member

Although they perform badly and shouldn't really be used, IE7< supports CSS expressions http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx.
This should probably be tied to a CSSLint warning if added.

@nschonni
Copy link
Member Author

Here is a sample with a failing test nschonni@b163f0d that gives the message "testIECSSExpression1 : Unexpected error: Unexpected token '.' at line 1, col 17."

@niallmur
Copy link

niallmur commented Jun 6, 2013

Thanks nschonni it would be nice to see support for this added

@nzakas
Copy link
Contributor

nzakas commented Jun 13, 2013

Yes it would! Pull requests welcome. :)

@nschonni
Copy link
Member Author

Sorry, @nzakas I created a failing test, but I had trouble creating a good parsing expression. Do you have a hint to where this rule would fit? I tried a few places with regex like expressions to do the pattern matching without success.

PS: I found we have an accessibility acquaintance in common with Jennison 😄

@nzakas
Copy link
Contributor

nzakas commented Jun 14, 2013

I'm not entirely sure. The problem is that you're literally putting
JavaScript into CSS, which means the correct solution is to use a
JavaScript parser (!) after encountering "expression(", otherwise you'll be
re-implementing a JS parser in a CSS parser and life will suck.

Maybe it's worth looking at integrating Esprima to do that, but again I'm
not entirely sure if it's worth the work given that CSS expressions are a
thing of the past.

On Thu, Jun 13, 2013 at 6:37 PM, Nick Schonning [email protected]:

Sorry, @nzakas https://github.com/nzakas I created a failing test, but
I had trouble creating a good parsing expression. Do you have a hint to
where this rule would fit? I tried a few places with regex like expressions
to do the pattern matching without success.

PS: I found we have an accessibility acquaintance in common with Jennison [image:
😄]


Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-19435225
.


Nicholas C. Zakas
@SlickNet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

@nschonni
Copy link
Member Author

Maybe something really simple like checking with a regex whether the value starts with "expression" and then ignoring the rest of the property value.

@nzakas
Copy link
Contributor

nzakas commented Jun 15, 2013

It's a bit tricky to do that because of what's allowed inside of an
expression. For example, you can't simply match against a closing paren
because you could have an expression like "expression(5 + (6 * 10))".

On Fri, Jun 14, 2013 at 4:43 PM, Nick Schonning [email protected]:

Maybe something really simple like checking with a regex whether the value
starts with "expression" and then ignoring the rest of the property value.


Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-19487319
.


Nicholas C. Zakas
@SlickNet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

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

4 participants