Live data from Hacker News

Universal.css

github.com

51–60 of 118 posts

Re: Universal.css

#51
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/

These are valid issues, but one that has a better, actually scalable solution: CSS preprocessors.

You can name your magic numbers/RGB values. You can move your shared behaviour into mixins. You can stop using float for god's sake - it's 2016, we have flexbox now (OK, so that's not related to preprocessors, but it's still true).

Sure, if it's a quick hack or something you're throwing together for personal reasons, use whatever mixture of inline-styles, "visually semantic" classes, and table layout goes fastest for you. But if the point is "scalability" (In the sense of size of team working together), then this halfway point between semantic classes and inline styles is definitely not the right way to achieve it.

Re: Universal.css

#52

Earlier quoted context omitted.

It is much faster to type and maintain, easier to read, smaller document size and faster for the browser to parse.

Is there a benchmark you can point me to for "faster for the browser to parse"?

sure, I searched for tests just before I posted my comment.

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

I use react inline styles in some situations where it's appropriate. on large tables or SVG (eg. with zillions of styled circles) there will be issues.

if you are sending HTML from a server with inline-styles then you will have much bigger problems with bandwidth.

This is where tachyon and basscss can provide a clean way for the day to day simple styling tasks like "needs more padding here" "make that title bigger there" without writing up stylesheets with repetitive margin, float, etc. for every single view in your app or every page on your website.

Re: Universal.css

#53
Absolutely brilliant! Because of its universal nature and compositional design, one only has to download this CSS page once from the primary CDN and it can be used for everything everywhere. One could even argue this should be a standard browser component.

Re: Universal.css

#54
post #51
post #16

Earlier quoted context omitted.

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/

These are valid issues, but one that has a better, actually scalable solution: CSS preprocessors. You can name your magic numbers/RGB values. You can move your shared behaviour into mixins. You can stop using float for god's sake - it's 2016, we have flexbox now (OK, so that's not related to preprocessors, but it's still true). Sure, if it's a quick hack or something you're throwing together for personal reasons, use…

If you want a website that works on enterprise desktops, you aren't using flexbox - you're using floats.

Re: Universal.css

#55
post #51

Earlier quoted context omitted.

These are valid issues, but one that has a better, actually scalable solution: CSS preprocessors. You can name your magic numbers/RGB values. You can move your shared behaviour into mixins. You can stop using float for god's sake - it's 2016, we have flexbox now (OK, so that's not related to preprocessors, but it's still true). Sure, if it's a quick hack or something you're throwing together for personal reasons, use…

If you want a website that works on enterprise desktops, you aren't using flexbox - you're using floats.

Is that still true? I recently joined a company whose primary audience is education, and our numbers say that less than 1% of our customers use browsers that don't support flexbox.

Are public middle schools farther along the tech curve than "enterprise"?

(Legitimately curious. It'd be pretty funny if so.)

Re: Universal.css

#56
This is awesome. I no longer need to type the dreaded ":" , which requires the most awkward finger combination . My ulnar nerve will be so happy.

Re: Universal.css

#58
It's sad that my first reaction was "Looks like bootstrap." I would like a few more colors. Maybe you could add pantone support, that would make this super useful esp. for mobile!

Re: Universal.css

#60
I've been working on an app that relies on parsing CSS styles for like 6 months - full time. This almost gave me a heart attack until I realized it was a joke.
Post reply on HN