keithclark / selectivizr

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
1.71k stars 247 forks source link

Library agnostic #21

Closed Integralist closed 12 years ago

Integralist commented 13 years ago

This is not an issue but more of a request.

Is it possible to use one of the existing selector engines (or strip down a selector engine if possible) instead of requiring the user to include an entire Js framework such as jQuery if they don't need or use it.

I like the idea of your script but want to not be forced to use a framework.

keithclark commented 13 years ago

If you're not looking to use a full library such as jQuery you could opt for Sizzle, which is it's selector engine. Some libraries offer custom builders allowing you to create lightweight versions that don't contain things you don't need.

Personally, I would go for nwmatcher which is a dedicated selector library with far superior CSS3 selector support to Sizzle/jQuery. If I did create an agnostic version of selectivizr it would be with nwmatcher.

Integralist commented 13 years ago

Thanks for the feedback. Maybe I'm just being stupid now but looking again at your site I can see that apparently you already have support for NWMatcher?

keithclark commented 13 years ago

My point is, if you want to use selectivizr without the overhead of a large javascript library then go for NWMatcher - it's a selector engine, nothing more, nothing less.

Integralist commented 13 years ago

For me the enticement of using something like Selectivizr is that you only need a single script in the <head> before your stylesheets that allows them to utilise CSS3. So I wouldn't look to use a selector engine on its own as it wouldn't be the same.

But thank you for the feedback.