Zach’s ugly mug (his face) Zach Leatherman

Selecthor: A Better way to Learn and Demo CSS Selectors

April 21, 2017 On Twitter (archived)
Watch on YouTube: Selecthor: A Better way to Learn and Demo CSS Selectors

I wanted a better way to live demo what nodes a CSS selector matches on the actual HTML source code (instead of the rendered view), so I built one. I show how it works in the video above.


< Newer
What Are You Excited About?
Older >
Randsom: A Random Web Fonts Ransom Note

Zach Leatherman IndieWeb Avatar for https://zachleat.com/is a builder for the web at IndieWeb Avatar for https://cloudcannon.com/CloudCannon. He is the creator and maintainer of IndieWeb Avatar for https://www.11ty.devEleventy (11ty), an award-winning open source site generator. At one point he became entirely too fixated on web fonts. He has given 76 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »

2 Likes

Šime (she-meh) 🦊L'Histoire de Manon
4 Comments
  1. Bram de Haan Disqus

    22 Apr 2017
    Great, I love this; useful too. On this blogpost YouTube Video isn't loading, DevTools says: the page was loaded over HTTPS, but requested an insecure resource --> the video
    1. zachleat Disqus

      22 Apr 2017
      Well, shoot—thanks for letting me know! I had a ton of old youtube embeds that were trying to load over HTTP. Should be fixed now.
  2. lutz Müller Disqus

    24 Jul 2017
    In the video looks great, but the Github does not seem to work always get error messages:index.js:24 Looks like there was a problem. TypeError: Failed to fetch at Selecthor.fetch (file:///C:/Program%20Files%20(x86)/help/selecthor-master/index.js:18:9) at file:///C:/Program%20Files%20(x86)/help/selecthor-master/index.js:123:5Fetch API cannot load https://www.zachleat.com/se.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.An input box for the file to display would be helpful.Better with drag end drop file paste. Regards
    1. zachleat Disqus

      24 Aug 2017
      Hey lutz, if you look at the `index.js` file it makes an explicit `fetch` call to `demo-table.html`. Replace this with your own file. It may require a web server to work correctly. Have you seen https://www.npmjs.com/packa... It works great for this purpose, just navigate to the directory and run `http-server .`
Shamelessly plug your related post

These are webmentions via the IndieWeb and webmention.io.

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)