HNHacker News
TopNewBestAskShowJobs

moretti

107 karma · joined February 7, 2014

submissionscomments
moretti··on PurifyCSS – Remove unused CSS
We've been using inline styles in our main project (built with React), but we recently deciced to move to css modules:

https://github.com/css-modules/css-modules

https://medium.com/seek-ui-engineering/the-end-of-global-css...

Inline styles are great, but they don't support basic features such as pseudo classes/elements, so even implementing simple components like buttons was cumbersome.

With latest version of webpack's css loader you get css scoping (you no longer need to add lengthy prefixes to all selectors) and you can also use additional loaders for post-processing your styles (we use a lot of postcss plugins such as autoprefixer).

Have a look at this example:

https://github.com/css-modules/webpack-demo

And here's a great comparison of the main CSS in JS techniques:

https://github.com/MicheleBertoli/css-in-js

moretti··on Three.js – JavaScript 3D library
The next step is submit HN to HN.
moretti··on Van Gogh Museum
It's really cool that you can browse the entire collection and download the paintings: http://www.vangoghmuseum.nl/en/search/collection
moretti··on Java Developers
I think this code truly represents the essence of this article: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
moretti··on Atom: Hello Windows
The remix is even better :-) https://www.youtube.com/watch?v=RYMH3qrHFEM
moretti··on Anti-Patterns in Python Programming
I always struggle to understand why a list comprehension

  alist = [foo(word) for word in words]
is considered more Pythonic than map

  alist = map(foo, words)
moretti··on Web Starter Kit
I'm curios about the CSS naming conventions.

I'm assuming for example that component--modifier-name denotes a class modifier (ex. .button--primary and .button--secondary) and component__descendant-name denotes a a descendent node of a component (ex articles-list__item).

It looks similar to SuitCSS (https://github.com/suitcss/suit/blob/master/doc/naming-conve...). Is there more information about them?

moretti··on Codekit 2 is out
I completely agree with you. And you might even not spend 5-10 minutes if you can find a Yeoman generator that suits your needs :-)
moretti··on Using Bootstrap the Semantic Way
Less has the same feature: http://lesscss.org/features/#extend-feature
moretti··on I No Longer Need StackOverflow
I no longer need Stack Overflow, but I was in Stack Overflow 4 hours ago :-) http://stackoverflow.com/users/288570
← PreviousPage 2 of 2