Live data from Hacker News

Universal.css

github.com

41–50 of 118 posts

Re: Universal.css

#41
post #26

Earlier quoted context omitted.

In all seriousness, what advantages do you see over writing inline styles?

Tachyons is based on mathematical scales: http://tachyons.io/docs/layout/spacing/ Practical example: I have a form with a header. I look at it and think "there needs to be more space below the header". So I change className="mt0" to className="mt1" It hot-reloads etc. It took me exactly two keystrokes to change this and I know that the spacing is consistent with all the other spacing in my app.

Perhaps I'm just a fuddy-duddy, but I rather like MDN's description of what classes used to be for: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att... (The second paragraph.)

Re: Universal.css

#43

Earlier quoted context omitted.

Better caching, smaller HTML size and the ability to use inline styles if you do need to override something

Are `class` attributes cached more efficiently than `style` attributes for some reason?

I assume he/she means that CSS is cached as an http resource and can be reused in different pages, whereas style attributes are only cached as part of the page; ie using them adds page weight.

Re: Universal.css

#44
post #16

Earlier quoted context omitted.

I think I'd have to assume anyone using that on a project I was paying them for really was trying to be funny. I mean, really, take a look at this: https://github.com/tachyons-css/tachyons-visibility

I used and am using this in production. So are others. It works really really well. Here's the rational: http://mrmrs.io/writing/2016/03/24/scalable-css/

I've been looking at this recently. I'd really love to hear more about real-world experience using Tachyons. We're suffering from serious bloat (500KB CSS) on an old project, and are trying to figure out how best to manage CSS so it doesn't bloat over time (at least not as much).

Re: Universal.css

#45
I posted this the a day ago: The only CSS you will ever need / universal.css (github.com) 2 points by taivare 1 day ago | 1 comment

Re: Universal.css

#46
post #17

> Bootstrap V4 recently introduced spacing utility classes like m-t-1 (which translates to margin-top: 1rem!important), and we thought we'd expand this idea to more classes. Which is worse; when it's done as satire, or seriously?

I think seriously reinventing styles attribute is much worse.

Re: Universal.css

#47
post #26

Earlier quoted context omitted.

Tachyons is based on mathematical scales: http://tachyons.io/docs/layout/spacing/ Practical example: I have a form with a header. I look at it and think "there needs to be more space below the header". So I change className="mt0" to className="mt1" It hot-reloads etc. It took me exactly two keystrokes to change this and I know that the spacing is consistent with all the other spacing in my app.

But how is that any more efficient than changing: style="margin-top: 1rem;" to style="margin-top: 2rem;" It's also two keystrokes, and is mathematically determined...

[deleted]

Re: Universal.css

#48
post #17

> Bootstrap V4 recently introduced spacing utility classes like m-t-1 (which translates to margin-top: 1rem!important), and we thought we'd expand this idea to more classes. Which is worse; when it's done as satire, or seriously?

When you do it as satire but everyone use your work seriously?

Re: Universal.css

#50
This is amazing. I quit a job at a company that did many stupid things, one of which was insist that their home rolled CSS framework did not suck. Said framework was, in all seriousness, exactly this but with shortened, cryptic names. Nightmare.
Post reply on HN