M
mrmrs
mrmrs.io · Personal blog · on HN since 2014
mrmrs is a front-end developer and designer who writes on scalable CSS, type scales, frameworks and responsive design.
What HN saysHN commenters cite his scalable CSS essay as addressing the reality of CSS at scale, in debates about semantic classnames and BEM.
19HN people shared it
9linked it in comments
20stories submitted
482story points
10 years agolast shared
2014people per year2026
Most-shared posts
- 1CSS and Scalability9 people · 12 points · first shared 2016 · 1 comments on HN
- 2Too Many Tools and Frameworks (2015)4 people · 277 points · first shared 2016 · 118 comments on HN
- 3The Veil of Ignorance3 people · 121 points · first shared 2016 · 34 comments on HN
- 4Show HN: Gifolio2 people · 11 points · first shared 2014 · 4 comments on HN
- 5iOS dynamic type on the web1 people · 26 points · first shared 2016 · 15 comments on HN
- 6Btns.css – A small CSS module for building beautiful, responsive buttons1 people · 24 points · first shared 2014 · 14 comments on HN
- 7Front-end development as a first class citizen1 people · 3 points · first shared 2016 · discussion on HN
- 8The Diatonic Type Scale1 people · 2 points · first shared 2015 · discussion on HN
- 9Webfonts1 people · 2 points · first shared 2016 · discussion on HN
- 10Growing up with Dogma1 people · 1 points · first shared 2016 · discussion on HN
- 11Simple responsive type scale in 683B1 people · 1 points · first shared 2014 · discussion on HN
- 12A more beautiful web1 people · 1 points · first shared 2015 · discussion on HN
- 13Responsive photo grid template1 people · 1 points · first shared 2014 · discussion on HN
- 14Profile1 people · first shared 2015
- 15Homepage1 people · first shared 2014
What HN people wrote when they linked it
nilliams · 2017-04-10
I'm not sure you read the articles GPP mentioned, yes CSS Zen Garden was the dream, but I feel like articles like the excellent mrmrs one [1] address the reality.
[1] http://mrmrs.io/writing/2016/03/24/scalable-css/
themoonbus · 2014-07-26
Looks like a portfolio (http://mrmrs.io) turned into a gif-music-video.
jasim · 2017-04-10
The concept of 'semantic classnames', even if propagated by w3.org has caused as much grief as the concept of 'separation of concerns' between HTML & CSS fad. The reason we need semantics in HTML is to make the markup accessible for screen-readers, and no screenreader considers the class name of an element when reading it out. What we instead need are semantic tags like article, section etc. and aria tags like role.
CSS classnames are purely for the developer's benefit. Not the user's. And as developers, forcing ourselves to find semantic meaning for every element we write leads us to component-oriented CSS like BEM. Which is a fine thing, but we can also use purely visual classes - like `bg-red bold border-solid` if it helps (and it does. check out tachyons.io)
The class names of elements in Google's homepage for example reads like 'tsf-p', `oq`, `gsb` etc. I suspect these are machine generated. Same with Facebook. One of the best libraries to do this currently is styled-components (https://github.com/styled-components/styled-components).
Consider reading http://nicolasgallagher.com/about-html-semantics-front-end-architectur… http://mrmrs.io/writing/2016/03/24/scalable-css/, and http://johnpolacek.com/2016/06/17/atomic-css-movement/ for reasoned perspectives.
civilian · 2016-10-21
Dude, comeon. The browser has evolved a lot as a platform, as has the hardware power of computers running them. Maybe we're re-writing computer history, but if that's the case then it's because we have to migrate everything to javascript and the wiser old timers want nothing to do with it.
* Do you really want to write CSS without a pre-processor?
* Do you really want to control a webpage's state without JS models in the browser?
* Do you really want to update html with individual jquery calls?
* Do you really want to write websites _without_ using jquery? Keep in mind that jquery is only 10 years old.
I'm glad that we have an open market to exchange people's ideas. Yes, a lot of it is crap, and even among the highly adopted packages there will be problems. But that's the beauty of the market-- people can vote with their feet.
This article sums up how I feel: http://mrmrs.io/writing/2015/07/27/too-many-tools/
> "Four–fifths of everybody's work must be bad. But the remnant is worth the trouble for its own sake." - Rudyard Kipling in 1890
e12e · 2016-05-21
Had to look up BEM, this appears to be a good overview:
https://css-tricks.com/bem-101/
[ed: Having now read: http://mrmrs.io/writing/2016/03/24/scalable-css/ linked above, I can at least see where this idea is coming from. I guess I'm still thinking in documents with semantic mark-up, rather than UI widgets. I'm not entirely convinced throwing out all the cascading bits is the best approach, but I sympathize with that point of view.]
This is madness. Why work so hard to avoid how CSS selectors work? I mean, if you have a menu-structure built around divs, surely it should be enough to say that direct children of the div with class menu, should be considered menu items?
<!DOCTYPE html>
<html>
<body>
<style>
div.menu > div {
background: red;
}
div.menu > div:nth-child(3) {
background: blue;
}
</style>
<div class="menu">
<div>Item one</div>
<div><p>Also<br />an item</p>
</div>
<div>Item #3 and CSSv3
<div>knows (still blue)</div>
it</div>
<div>Item #4 and CSSv3 knows it</div>
</div>
<div>wat</div>
</body>
</html>
cel1ne · 2016-10-13
Here's a longer article on how tachyons came to be: http://mrmrs.io/writing/2016/03/24/scalable-css/
Other than that: try it out ;)
paradite · 2016-10-04
In defense of JavaScript, there is an article that appeared here not long ago:
http://mrmrs.io/writing/2015/07/27/too-many-tools/
Basically all these new terms come out because people are constantly trying to improve the ecosystem and make it better according to their own standards, be it more modular, more robust, or more scalable.
Eventually winners will emerge and the losers will die out. Give it a few more years and it will stabilize.
quaunaut · 2016-05-20
It's definitely weird at first, but the aim of atomic CSS is to not have a CSS file that just grows and grows and grows.
This article(written by the creator of Tachyons) helps to explain the issue: http://mrmrs.io/writing/2016/03/24/scalable-css/
Where I work, we're using it on a new project and while it definitely requires a lot of learning(and just generally understanding CSS), it's faster to debug with, easier to take care of edge cases, and the total size for our app is incredibly small.
Jimmed · 2015-07-24
Correct link: http://mrmrs.io/profile/
So, when I fixed the link, it shows my name, my profile picture, and then my repos three times.
"Better" might not be the word for this. How about "different"?