HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
propjockey
css-media-vars
CSS2020–2021
propjockey / css-media-vars

css-media-vars

A brand new way to write responsive CSS. Named breakpoints, DRY selectors, no scripts, no builds, vanilla CSS.

3Distinct people
5Mentions
0Explicit recommenders
310GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A brand new way to write responsive CSS. Named breakpoints, DRY selectors, no scripts, no builds, vanilla CSS.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month5 dated mentions

Observed mentions: 2020-07-17 01:14:48 UTC to 2021-09-05 08:22:12 UTC.

0122020-07-01 00:00:00 UTC to 2020-08-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsJul 20202020-08-01 00:00:00 UTC to 2020-09-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-09-01 00:00:00 UTC to 2020-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-10-01 00:00:00 UTC to 2020-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-11-01 00:00:00 UTC to 2020-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-12-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2021-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-01 00:00:00 UTC to 2021-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsFeb 20212021-03-01 00:00:00 UTC to 2021-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-04-01 00:00:00 UTC to 2021-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-05-01 00:00:00 UTC to 2021-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-06-01 00:00:00 UTC to 2021-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-07-01 00:00:00 UTC to 2021-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-08-01 00:00:00 UTC to 2021-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-09-01 00:00:00 UTC to 2021-10-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsSep 2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 20202020-07-01 00:00:00 UTC2020-08-01 00:00:00 UTC202
Aug 20202020-08-01 00:00:00 UTC2020-09-01 00:00:00 UTC101
Sep 20202020-09-01 00:00:00 UTC2020-10-01 00:00:00 UTC000
Oct 20202020-10-01 00:00:00 UTC2020-11-01 00:00:00 UTC000
Nov 20202020-11-01 00:00:00 UTC2020-12-01 00:00:00 UTC000
Dec 20202020-12-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
Jan 20212021-01-01 00:00:00 UTC2021-02-01 00:00:00 UTC000
Feb 20212021-02-01 00:00:00 UTC2021-03-01 00:00:00 UTC000
Mar 20212021-03-01 00:00:00 UTC2021-04-01 00:00:00 UTC000
Apr 20212021-04-01 00:00:00 UTC2021-05-01 00:00:00 UTC000
May 20212021-05-01 00:00:00 UTC2021-06-01 00:00:00 UTC000
Jun 20212021-06-01 00:00:00 UTC2021-07-01 00:00:00 UTC000
Jul 20212021-07-01 00:00:00 UTC2021-08-01 00:00:00 UTC000
Aug 20212021-08-01 00:00:00 UTC2021-09-01 00:00:00 UTC000
Sep 20212021-09-01 00:00:00 UTC2021-10-01 00:00:00 UTC211

What Hacker News says

5 sources
Ah! This is brilliant. There are quite a few comments here about pitching this against other CSS frameworks or the actual use of this. This is not a stand-alone framework or anything of that type. Treat as one of your scaffold components for your styling framework. Tailwind does this with their tailwind.config.js and is more of raw CSS design tokens. I just wish their commercial TailWindUI[1] make it easy to make use of it the better way. I wish I saw Pollen a few months ago. I wanted to do an effortless design for my personal website and stick to as plain vanilla CSS as possible. The best way was to rely on CSS-Variables. I did do it from scratch[2]. It works though it is pretty hacky, and I'm not too concerned. Right now, I can swap few values and have an entirely different color scheme - light/dark version of my own, Nord Theme[3], and
Read the rest
I will keep adding me whenever I get bored. I can even tweak the rhythms and spacing to my liking with just the variable. You should check out the demo[4] or look at the source[5] (wip). For those who find this interesting, you should check out another interesting one I discovered a few months back -- css-media-vars[6]. 1. https://tailwindui.com 2. https://github.com/oinam/oinam-jekyll/blob/main/_includes/cs... 3. https://www.nordtheme.com 4. https://oinam.github.io/oinam-jekyll/ 5. https://github.com/oinam/oinam-jekyll 6. https://github.com/propjockey/css-media-vars
In Pollen – A library of CSS variables inspired by TailwindCSS
That's just a hack using css custom properties that still requires a global css file to define all breakpoints on the html element. Also, how does it work for pseudo elements, state selectors etc. ? I can just see examples for media queries. In my opinion it's also not really nice to read, just look at the example on his github page https://github.com/propjockey/css-media-vars. Do you really think this is easier to read than normal media queries ?
In Inline CSS works better in a component world
Preach! I wholeheartedly agree. The CSS file is in the repo: https://github.com/propjockey/css-media-vars/blob/master/css... and the readme links to this in an example link tag: https://unpkg.com/css-media-vars/css-media-vars.css NPM is for convenience. Can't expect people to jump out of the build env all at once, so providing a vanilla CSS solution as a package is a good way to start the transition. IMO /shrug
In Show HN: A completely different way to write responsive, vanilla, CSS
I know the docs need a little love but I think this has potential to be a game changer for writing responsive CSS. It has named breakpoints, lets you write DRY selectors, doesn't rely on JS or any sort of build step, and if you're already used to seeing --css-variables it's easier to read/maintain too. I've created a couple JS Bins if you want to play around with it a bit, resize the "output" pane to see it update: Minimal example: https://jsbin.com/giqedowale/edit?css,output More involved example: https://jsbin.com/yicuqujehe/1/edit?html,css,output If you're familiar with CSS, it may seem like it's impossible for this to work without scripts, but while working on another project I realized in the CSS Spec for custom properties that combining a few small details they've highlighted, in a specific order, it makes it possible to do all kind
Read the rest
s of things that have never been possible before in CSS. This is the first project I've released using the idea. Anyway, it's totally free and open source too so hack away if you'd like! https://github.com/propjockey/css-media-vars I'll probably be refreshing this page for a while, so I'm happy to answer any questions or dive into the CSS Spec with you and talk about the tech if you're curious!
In Show HN: A completely different way to write responsive, vanilla, CSS

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.