Hello folks, today i’ll discuss about a cool method i made out of nothing, have you ever faced the problem to render icons or maybe different pics and have to declare an awful number of css classes?
Maybe not, since it’s not common to do this shit for a normal job nowadays, anyway i came up with a brilliant solution, i’m so proud that i wanted to share.
We’ve got a lot of RPG Heroes, with a lot of awful faces, hair colors and different haircuts. We hate them, i’ve seen dropbox sprite solution and they declare about 200 classes for their icons, but we’ve got twig and we’re working on Symfony2 so we want to be fast and smart.
Ok i lied, 20 minutes are not enough, but i will make you understand the possibilities of LESS and made your first less CSS quickly and nicely!
This is no boring article, i swear!
If you don’t what is LESS you could read it here.
If you don’t understand why you should use it instead of pure CSS, then i tell you: ” Quit the bitching and follow the tutorial. ”
Less is fantastic, modern and saves tons of minutes of coding. You’ll love LESS when you read the whole article, so keep on reading.
I’ll be quick and explain some of the shining features of this kind of form validation:
I hate when junior developers say “Oh noes, i need a modal better download jQueryUI”
Creating a simple modal with at most 10 lines of code is ridicolously easy, so easy that i am able to do myself!
I will show you that you don”t need jQueryUI or another jQuery plugin to use fancy modals wasting only 2 nanoseconds of your precious life!
Obiously i will add some fancy css code, who actually is super ugly but we don”t care right?
Yep, i decided to make this blog just to share some of my quick fix collected while working.
I didn’t feel like this blog will become famous and often visited, i like the idea that someone could find what he needs like i did many times before thanks to famous ninja programmers around the web.
Sharing is the hearth of the web and reading others tips is the key to become a good developer.