madebysource / lesshat

Smart LESS CSS mixins library.
lesshat.com
MIT License
2.19k stars 259 forks source link

LESS Hat 101 #138

Open ghost opened 9 years ago

ghost commented 9 years ago

Newcomers may have no idea how to actually add this mixin lib to their project and actually start using it. This update shows people how to use this library in their own files.

In addition to basics, we should demonstrate the difference between the regular lib and the prefixed lib with a usage example. I've provided such.

As a bonus, I've shown how to create a custom namespace which allows people to "prefix" the lib to their heart's content. Personally, I don't like the ".lh-" prefix and I don't think it's necessary for the build to bake two versions of the library. My simple example demonstrates how easy it is to avoid dependency naming collisions in LESS.