News for hackers. Stuff that matters.
Re:Yahoo reinvented inline styles through classes by ninjaranter on Sunday July 23, 2017 @03:11PM (#14833871)
Yeah, they showcase how much better it is than using inline styles (which it is, of course) but I don't see "the headache of managing stylesheets" problem this supposedly solves. Not sure who the target audience is for this one.

It's funny how they say "The lower specificity of classes also allows for easier overrides" -- that's true, but what on earth would I want to override a class called "P(20px)" to do instead? :)

Re:Yahoo reinvented inline styles through classes by lylepstein on Sunday July 23, 2017 @03:45PM (#14834006)
Size. Using styles like this lead to a small decrease in page size, which over time on a very high traffic site leads to a notable bandwidth savings.

... or at least, that was the argument. In practice, most teams didn't adopt it unless mandated from above; because it sucks to use, has an infinitesimal decrease in individual page load time, and the bandwidth savings certainly don't outweigh the lost developer time.

But hey, all you gotta do is convince some VP that your niche approach is the right one, and you'll get some adoption in a large company like Yahoo.

Re:Yahoo reinvented inline styles through classes by troels on Sunday July 23, 2017 @04:26PM (#14834212)
Where have you heard that argument? That is absolutely bonkers. Why didn't they just use css as intended and collect all these inline styles into generic classes? Or turn on gzip-compression?
Re:Yahoo reinvented inline styles through classes by lylepstein on Sunday July 23, 2017 @04:41PM (#14834266)
I worked in an org at Yahoo that required all development to use Atomic, and that was essentially the reasoning as presented. The Atomic authors put a lot of effort [1] put into proving the size point, enough that it was pretty difficult to argue with. The stylistic issues were sort of swept aside; less size == faster page loads == more revenue.

If you believe the size argument, and care more about short term revenue over developer productivity or happiness, it makes sense, I guess.

[1] https://acss.io/frequently-asked-questions.html#what-are-the...

Re:Yahoo reinvented inline styles through classes by intoverflow2 on Monday July 24, 2017 @06:55AM (#14837358)
> Why didn't they just use css as intended

Too many engineers and not enough actual problems.

Re:Yahoo reinvented inline styles through classes by anotheryou on Monday July 24, 2017 @06:43AM (#14837303)
I recently botched a badly written site with loads of inline styles in to something responsive, you can override inline styles. It's not pretty, but it works:

  *[style*="text-align:justify"]{ 
       text-align: left !important;
  }
Re:Yahoo reinvented inline styles through classes by Kpourdeilami on Sunday July 23, 2017 @03:49PM (#14834034)
> but what on earth would I want to override a class called "P(20px)" to do instead? :)

lol maybe you might want to express the sizes in another base /s

    .P(20px) {
      font-size: 10px; // 20px in base 5 is 10px in base 10
    }