Web site Developer I Advertising and marketing I Social Media Advertising and marketing I Content material Creators I Branding Creators I Administration I System SolutionThe Making of Atomic CSS: An Interview With Thierry Koblentz | CSS-Tips

Web site Developer I Advertising and marketing I Social Media Advertising and marketing I Content material Creators I Branding Creators I Administration I System SolutionThe Making of Atomic CSS: An Interview With Thierry Koblentz | CSS-Tips

Web site Developer I Advertising and marketing I Social Media Advertising and marketing I Content material Creators I Branding Creators I Administration I System Resolution

I interviewed Thierry Koblentz, creator of Atomic CSS, to grasp the historical past and background that led to creating of the favored CSS framework. Thierry, now retired, has huge expertise writing CSS at massive scale and has beforehand labored as a front-end engineer at Yahoo!.

Thierry is broadly credited with bringing the idea of Atomic CSS to the mainstream, due to his now basic 2013 article on Smashing Journal, “Difficult CSS Finest Practices.” That article paved the best way for a lot of well-liked CSS libraries through the years. On this interview, Thierry returns to chronicle the historical past of Atomic CSS and replicate on its ongoing legacy.

Photo of Thierry Koblentz smiling.
Thierry Koblentz

Rolling again the years to the early 2000’s, how did you get into net improvement, particularly writing CSS to make a residing?

Thierry Koblentz: I taught myself HTML, CSS, and JavaScript as a pastime after shifting to the U.S. in 1997.

On the time, I used to be utilizing FrontPage and was relying closely on Newsgroups for steerage. I shortly turned a daily on Macromedia NewsGroups and on CSS-Talk about. Early on, I espoused the philosophy of the Internet Normal Venture and bought actually interested by Accessibility. For years, front-end was nothing greater than a pastime for me (my actual job was an vintage supplier). I might create an internet site every now and then however I used to be largely writing and publishing (many) articles, sharing methods I’d realized or “found.”

This paid off within the type of a telephone name from Yahoo! in 2007, asking if I might assist fixing and constructing stylesheets for the Yahoo! Website Options (YSS) web site builder template. The job description: no HTML, no JavaScript, simply CSS! And loads of it!

What was your day job at Yahoo! like?

TK: My position at Yahoo! modified lots by the years.

My first job was to create stylesheets (à la CSS Zen Backyard) for the YSS template. I then rewrote the markup and kinds of the YSS web site simply earlier than YSS was “shipped” to Bangalore (India) — the place I used to be despatched with my colleagues for “switch of data” functions.

As a sidenote, it was the problem of swapping stylesheets to create completely different designs for YSS that pressured us to discover a mild (non-js) resolution for resizing movies on the fly; and that’s how I got here up with “Creating Intrinsic Ratios for Video.”

After YSS, I had the chance to solely work on tasks that began from scratch (rewrites or in any other case) and I bought increasingly concerned with Yahoo! FE. I edited and created many inner docs (i.e. CSS Coding Requirements); participated within the hiring course of (like all people else in my crew); led code assessment periods; ran CSS lessons and workshops; spoke at FED London; helped different groups with HTML/CSS/accessibility; was concerned in choices relating to expertise adoption (i.e. Bootstrap or not Bootstrap); created libraries; reviewed inner papers; wrote proposals; and so forth.

One other sidenote, throughout my eight years at Yahoo!, I could have written lower than 100 traces of JavaScript. And if I didn’t give up or get fired from my job, it’s due to Lingyan Zhu and Renato Iwashima; they helped me tirelessly when it got here to organising my atmosphere or coping with the command line (as a result of, to today, I’m horrible at that).

TK: Within the early days, there have been neither libraries nor revealed methodologies; it was the Wild West, every part went: “non-semantic” lessons, IDs, CSS hacks, conditional feedback, frames, CSS expressions, “JS sniffing,” designing primarily for Web Explorer, and so forth. On my outdated web site, I even had this remark:

<!--MSIE5 Mac wants this remark -->

Every part was truthful recreation and every part was abused as we had a really restricted set of instruments with the demand to do lots.

However issues had modified dramatically by the point I joined Yahoo!. Devs from the U.Okay. had been robust supporters of Internet Requirements and I credit score them for drastically influencing how HTML and CSS had been written at Yahoo!. Semantic markup was a actuality and CSS was written following the Separation of Concern (SoC) precept to the “T” (which was overzealous for my liking at instances although).

YUI had CSS elements however didn’t have a CSS framework but. There was an in-house CSS library (referred to as Lego) however I by no means had to make use of it. Methodologies and libraries, like OOCSS, SMACSS, ECSS (shoutout to Ben), BEM, Bootstrap, Pure, and others would come shortly after.

What led to the thought of Atomic CSS?

TK: Earlier than YSS was moved to India, my supervisor, Michael Montesano, requested if there was a manner for the brand new crew in Bangalore to keep away from having to edit the stylesheet, and thus decreasing the dangers of breakage. I assume the YSS template expertise (paying prospects complaining about damaged pages) made him fairly paranoid when it got here to creating any change to a stylesheet.

So I created a “utility-sheet” within the spirit of my ez-css library — a sheet meant to let builders obtain their styling with out the necessity to edit or add guidelines in a stylesheet.

A few years later, Michael, then Director of Engineering, requested me if I might redesign Yahoo!’s Residence Web page utilizing utility lessons solely, figuring out that, as soon as once more, we wouldn’t be answerable for the web site upkeep. We talked about prioritizing utility lessons over semantic lessons, one thing I don’t suppose existed at such a stage on the time. It was a really daring transfer.

This massive scale train shortly turned a proof of idea that confirmed the various advantages that got here with styling through markup. It checked so many bins that it was determined that we’d use that “static” stylesheet (referred to as Stencil) to revamp the Yahoo! My Residence Web page product.

Screenshot of the Atomic CSS homepage. The background is bright blue with white text that says Atomic CSS on Steroids with a Get Started button below. At the bottom is a small blurb that reads CSS for component-based frameworks.

What had been the guiding rules whereas designing Atomic CSS (ACSS) and who had been the folks concerned?

TK: Our Stencil library being static was an excellent device to impose/implement a design fashion — which we thought Yahoo! was about to undertake throughout all its properties. We shortly realized that this was not going to occur. Each Yahoo! design crew had their very own view of what was the proper font measurement, the proper margin, and so forth., and we had been continually receiving requests so as to add very particular kinds to the library.

That scenario was unmaintainable so we determined to give you a device that might let builders create their very own kinds on the fly, whereas respecting the Atomic nature of the authoring methodology. And that’s how Atomizer was born. We stopped worrying about including kinds — CSS declarations — and as an alternative centered on making a wealthy vocabulary to present builders a wide selection of styling, like media queries, descendant selectors, and pseudo-classes, amongst different issues.

With ACSS, builders had been free to make use of no matter they wished; therefore groups had been capable of undertake completely different design kinds and kinds guides whereas utilizing the very same library. And there have been some instant advantages that had been new to the best way builders had been used to writing kinds. They now not needed to fear about breaking the web page with their styling or fear about writing selectors to fashion their elements.

ACSS was constructed at the beginning to handle Yahoo!’s issues and to work in Yahoo!’s atmosphere.

The folks concerned with Atomic CSS had been Renato Iwashima, Steve Carlson, and myself. Renato and Steve created Atomizer.

What misconceptions do folks have about CSS once they don’t write CSS for giant enterprises?

TK: Once I joined Yahoo! in 2007, I shortly realized how huge a codebase may very well be. There have been groups working throughout many places/timezones; a myriad of merchandise; tons of of shared elements; third-party code; A/B testing methods; scaling as a requirement; completely different script instructions; localization and internationalization; numerous launch cycles; advanced deployment mechanisms; tons of metrics; legacies of all kinds; strict coding requirements; construct processes; politics; and extra politics; and so forth.

Most of that was completely new to me and I needed to study if and the way any of it might affect the best way I used to be writing CSS. I began to revisit and problem all my beliefs as many methods or strategies that had been frequent follow to me gave the impression to be unfit, or a minimum of counter-productive, for advanced apps.

One “actuality examine” pertains to fashion abstraction. All of us have learn articles saying that mapping a M-10 class to margin: 10px was not a good suggestion because it meant to edit each the HTML and CSS to vary the styling. Sadly, that is what occurs in massive/advanced tasks:

  • Designer: I desire a 15px hole
  • Developer: OK, that’s M-3x (5px increment)
  • Designer: Certain, no matter!
  • Developer: Performed!
  • Designer: Truly, 15px is a bit too large, are you able to make it 12px?
  • Developer: No, we don’t have that, it’s both 10px or 15px.
  • Designer: Sorry, that doesn’t work for me. Can we alter M-3x to be 12px?
  • Developer: Nope! We are able to’t do this as a result of different groups count on M-3x to be 15px.
  • Designer: OK, attempt to determine a manner as a result of we would like the margin to be 12px. 15px is an excessive amount of and 10px is just too little.
  • Developer: (F*ck this!)

To anticipate such an issue, one wants to grasp the designer’s intent behind their request: is the fashion chosen due to its abstraction, e.g. colour major, or for its particular worth, e.g. a margin of 15px in our M-3x case? If a method information exists to implement design rules, then lessons like M-3x could also be OK, but when design groups can request any fashion they need, then it’s a lot safer to keep away from naming conventions that may result in ambiguous styling. In my expertise, something ambiguous leads, in the end, to breakages.

Counting on the construction of a doc or element for its styling — through combinators like > or + — feels like a clear method to authoring a stylesheet, however it’s ignoring the truth that in a fancy atmosphere one can’t assume any particular markup, or assemble, to be immutable.

You suppose z-index is sophisticated? Suppose once more when you don’t even personal the scope of the stack your element lives in. That’s one of the advanced points to handle in a big challenge the place groups are answerable for completely different components of the web page. I as soon as wrote a proposal about this.

Qualifying selectors — like enter.required vs. .enter.required — could look good and semantic nevertheless it creates an pointless specificity stage — like 0.1.1 vs. 0.2.0 — and prevents markup change; two issues simple to keep away from by ensuring you don’t qualify your selector.

Counting on the common selector, *, for styling world scope? In a really massive challenge, it might imply you might be styling another person’s element. Don’t make styling choices for folks except you already know their necessities.

I’m certain you’ve got learn that IDs are dangerous and that specificity is evil however. in actual fact. excessive specificity will not be as a lot of an issue because the variety of specificity ranges your guidelines create. It’s a lot simpler to fashion inside an atmosphere the place solely two or three ranges exist — like 1.1.0, 0.1.0, 0.2.0 — reasonably than an atmosphere the place specificity is reasonably low however follows a “free for all” method — like 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, and so forth. — which frequently comes as a defensive mechanism in massive tasks as a imply to “sandbox” kinds.

Blindly following recommendation from the CSS group could result in disagreeable surprises. By no means leap on new methods that haven’t but been battle examined. Bear in mind will-change? And at all times know what each fashion you utilize does or could set off. For instance, place can create a stacking context and a containing block, whereas overflow can create a block-formatting context.

In my expertise, figuring out CSS inside-out will not be sufficient to write down CSS effectively for a big group. Throughout my tenure at Yahoo!, I typically discovered myself in contradiction with folks I was aligned with years earlier than. The atmosphere is brutal and one must be very pragmatic to keep away from many pitfalls. Subsequent time you have a look at the supply code of a giant challenge and see one thing that is senseless to you, keep in mind this tweet from Nicholas Zakas:

How was Yahoo!’s transition to Atomic CSS acquired internally?

TK: ACSS was effectively accepted by our My Residence Web page crew, nevertheless it didn’t go effectively exterior of that. Our first interplay was with the Sports activities crew based mostly in Santa Monica. Steve and I had been in a convention name attempting to persuade the builders that not following the Separation of Concern’ precept was the best way to go and that it could not create chaos.

We pointed them to a bit that Nicolas Gallagher had not too long ago written, pondering that an article from an “outsider” would assist, however nope! Issues didn’t go effectively and there was loads of friction. The principle subject was the truth that the library was fabricated from utility lessons, however its syntax didn’t assist to ease the dialog.

I recall additionally assembly with the Mail crew who didn’t push again on the thought of Atomic CSS, however wished to give you their very own JavaScript method to make use of “plain” CSS declarations — as they couldn’t stand the ACSS syntax. In any case, the information in favor of the library (~36% much less CSS and HTML) was talking for itself, so ACSS was ultimately adopted. And as we speak, seven-plus years later, Yahoo! Residence Web page, Yahoo! Sports activities, Yahoo! Information, Yahoo! Finance, and different Yahoo! Merchandise are all nonetheless utilizing ACSS.

To higher perceive how an method like ACSS can profit tasks the place element reusability is paramount, copy the markup of a element from Yahoo! Finance and paste it inside Yahoo! Information. That element ought to seem like it belongs to the web page. It is because ACSS makes these elements web page agnostic.

How did the thought of utilizing parentheses for sophistication names manifest? Was the syntax impressed from how features are written?

TK: We had recognized — by many iterations — two units of “candidates” for use as delimiters for property values: parentheses, (), and brackets, [].

Renato remembers that we picked parentheses over brackets due to familiarity with features in JavaScript, even when it got here at the price of an additional Shift keystroke. The ACSS syntax was designed to:

  • facilitate the automated technology of guidelines, through Atomizer
  • enable builders to create any arbitrary or advanced kinds they need
  • scale back the educational curve to a minimal

It seems like this:


Builders construct their lessons following the above assemble. The core syntax relies on Emmet, a preferred toolkit. We adopted the Emmet method to cut back idiosyncrasies as core lessons are specific property/worth pairs reasonably than arbitrary strings.

We additionally created a dozen of helper lessons. These apply a number of fashion declarations and are both shortcuts, like hiding content material from sighted customers, or hacks, like utilizing .Cf for clearfix. And we gave builders much more latitude by using a config file by which they’ll create variables — like .PrimaryColor — breakpoints, and rather more.

Individuals who’ve by no means labored with ACSS will inform you that the syntax is just too bizarre (at greatest), however folks acquainted with it’s going to inform you it’s intelligent in some ways.

Speak about how your “Difficult CSS Finest Practices” article for Smashing Journal got here to fruition?

TK: I had written many articles in numerous on-line publications earlier than, so it was pure for me to write down an article about this “difficult” method.

Yahoo! was sponsoring a front-end convention in October 2013 the place Renato had a chat scheduled to current our resolution, and I used to be attempting to get the article revealed earlier than that. I selected to not publish it on Yahoo! Developer Community as a result of the web site didn’t provide a remark part. A Listing Aside couldn’t publish it in time, however Smashing Journal accelerated its assessment course of to have the ability to publish the piece earlier than the top of October.

My selection of going with a writer who had a remark part paid off because the article acquired 200-plus feedback which turned out to be very time consuming — and irritating — for me who had to answer them.

Does it really feel unusual that the article nonetheless carries the disclaimer in regards to the methods mentioned, despite the fact that it’s broadly well-liked within the trade now?

TK: When the article was revealed, I informed Vitaly [Friedman, Smashing Magazine co-founder] that that be aware gave the impression of some sort of a disclaimer to me; that it could sway folks of their studying of the article. However I didn’t actually push again as I understood the place Vitaly was coming from. I do discover it amusing that be aware continues to be there now this technique has grow to be mainstream.

On condition that hindsight is 20/20, is there something that you just wish to change about Atomic CSS?

TK: There may be at all times room for enchancment, much more so while you’ve pioneered the answer. You may’t have a look at what others have executed to study from their errors or shortcomings. You don’t have materials to enhance upon. So, it’d be pretentious for us to suppose we nailed it on our first strive.

On the Atomic CSS aspect, we had loads of expertise for having developed and used a “static” stylesheet on a big challenge for greater than a yr. However on the dynamic aspect — the tooling aspect — it’s not like we might discover a lot inspiration on the market. Keep in mind that it took six years for different libraries to observe go well with.

In French, we are saying: essuyer les plâtres.

One mistake we made was to make use of “Atomic CSS” because the title for acss.io, as a result of as John Polacek identified, it created some confusion. We’ve modified that title since then.

The one remorse I’ve is how the group has handled Atomic CSS/ACSS by the years, which not too long ago result in a bizarre trade, the place anyone defined to me what “Atomic CSS” means:

The Atomic CSS library [ACSS] makes use of the identify however I believe that is deceptive, as a result of the characteristic you’re speaking about is the dynamic fashion technology. “Atomic CSS” as a generic time period designates small selectors as atoms, however they’re static.

Speak about being erased. 😉

A giant due to Thierry for taking part on this interview and permitting us to publish it for the group.

Supply hyperlink

Leave a Reply