Live data from Hacker News

Universal.css

github.com

31–40 of 118 posts

Re: Universal.css

#31
People really waste their time on these jokes.

I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.

Re: Universal.css

#32
post #31

People really waste their time on these jokes. I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.

We all have 24 hours per day, we just choose to spend it differently.

Re: Universal.css

#33

Earlier quoted context omitted.

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

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?

Re: Universal.css

#34
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...

1. way less clutter and repeating, my whole style is in one line per tag.

2. the scale also has fractional rem values.

I'd rather change "f5" to "f6" for a smaller font than: "fontSize: 1rem" to "fontSize: 0.875rem".

3. the author of tachyons clearly understand design. If he improves his stylesheet, I benefit.

4. Apparently inline-styles are slower [0], but I don't count that since everything could be extracted.

[0] http://ctheu.com/2015/08/17/react-inline-styles-vs-css-stupi...

5. I thoroughly enjoy using it. :)

Re: Universal.css

#35
post #31

People really waste their time on these jokes. I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.

> People really waste their time on these jokes.

Oh, come on. It probably takes two hours, at most, to create a text generator that prints this whole universal.css file...

Re: Universal.css

#37
post #31

People really waste their time on these jokes. I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.

> People really waste their time on these jokes. Oh, come on. It probably takes two hours, at most, to create a text generator that prints this whole universal.css file...

I doubt that it will take two hours. The source code (running in node or browser) is here: https://github.com/marmelab/universal.css/blob/master/univer...

Re: Universal.css

#38
post #32
post #31

People really waste their time on these jokes. I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.

We all have 24 hours per day, we just choose to spend it differently.

This is not news for me.

Re: Universal.css

#39
Seriously though. What's bad about using, say, tachyons and composing several of its pieces inside more meaningful labels like "sidebar" or "header" or whatever? It's simpler to grasp, and it WILL wind up as one dictionary per node anyway

Re: Universal.css

#40
post #31

People really waste their time on these jokes. I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.

> People really waste their time on these jokes. Oh, come on. It probably takes two hours, at most, to create a text generator that prints this whole universal.css file...

I'm ok with it, in this case.
Post reply on HN