# Detecting CSS selectors support + my JSConf EU talk

DevFeed: [Detecting CSS selectors support + my JSConf EU talk](<https://devfeed.tech/articles/detecting-css-selectors-support-my-jsconf-eu-talk-52008.md>)

Original publisher: [Read original article](<https://lea.verou.me/2011/07/detecting-css-selectors-support-my-jsconf-eu-talk/>)

Author: Lea Verou

Published: 2011-07-21T00:00:00Z

Content type: article

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [selectors](<https://devfeed.tech/topics/selectors.md>), [polyfill](<https://devfeed.tech/topics/polyfill.md>), [CSS](<https://devfeed.tech/topics/css.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [blog](<https://devfeed.tech/tags/blog.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [conference](<https://devfeed.tech/tags/conference.md>), [conferences](<https://devfeed.tech/tags/conferences.md>), [console](<https://devfeed.tech/tags/console.md>), [css](<https://devfeed.tech/tags/css.md>), [css-properties](<https://devfeed.tech/tags/css-properties.md>), [css3](<https://devfeed.tech/tags/css3.md>), [detection](<https://devfeed.tech/tags/detection.md>), [eu](<https://devfeed.tech/tags/eu.md>), [feature-detection-css-selectors](<https://devfeed.tech/tags/feature-detection-css-selectors.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [news](<https://devfeed.tech/tags/news.md>), [original](<https://devfeed.tech/tags/original.md>), [personal](<https://devfeed.tech/tags/personal.md>), [polyfill](<https://devfeed.tech/tags/polyfill.md>), [polyfills](<https://devfeed.tech/tags/polyfills.md>), [progress](<https://devfeed.tech/tags/progress.md>), [selectors](<https://devfeed.tech/tags/selectors.md>), [support](<https://devfeed.tech/tags/support.md>), [talk](<https://devfeed.tech/tags/talk.md>)

## AI overview

The author proposes detecting CSS selector support by creating a <style> element containing an empty rule for the selector, then reading the stylesheet through DOM methods: unsupported rules may be dropped, so their absence signals lack of support. This avoids relying solely on document.querySelector() in try...catch, which cannot help in browsers without the Selectors API, such as IE below 8. The author reports testing the stylesheet approach in Firefox, Opera, and Chrome, where it appeared to work, but had not yet tested it in IE; compatibility there was uncertain. The technique was planned as part of a JSConf EU talk about polyfills and feature detection.

## Source excerpt

I'll start with a little backstory, if you want to jump straight to the meat, skip the next 4 paragraphs. In the past few months, my CSS research has been getting some attention and I've been starting to become somewhat well-known in the CSS industry. A little known fact about me is that JavaScript has always been one of my loves, almost as much as CSS (even more than it in the past). Ironically, the first time I was asked to speak in a big conference, it was about JavaScript, even though I ended up choosing to speak about CSS3 instead. Lately, I've started wanting to get more into the JavaScript industry as well. I'm quite reluctant to submit speaking proposals myself (every conference or meetup I've given a talk so far has asked me to speak, not the other way around) and most JavaScript conferences expect you to submit a proposal yourself. I also couldn't think of a good topic, something I was passionate about and hasn't already been extensively covered. This changed a few weeks ago. While I was writing my <progress> polyfill, it dawned on me: Polyfills is something that's JS-related and I'm passionate about! I love studying them, writing them, talking about them. I quickly searched if there were any talks about polyfill writing already and I couldn't find any. So, I decided to submit a proposal to JSConf EU, even though the call for speakers had passed 10 days ago. When I read @cramforce's tweet that they had decided on most of the speakers, I spent a few days stressed as hell, checking my inbox every few minutes and hoping that my gut feeling that I would get accepted was right. And it was! 3 days ago I received an email from JSConf EU that my proposal was accepted!! I can't even begin to describe how happy and excited I am about it. And nervous too: What if they know everything I'm going to say? What if they hate my talk? What if the JavaScript industry is really as sexist as some people claim and they dismiss me because of my gender? I decided to put my fears