.ph(@color: #ccc) {
input::-webkit-input-placeholder { color: @color; }
input:-moz-placeholder { color: @color; }
textarea::-webkit-input-placeholder { color: @color; }
textarea:-moz-placeholder { color: @color; }
}
I was working on styling some form elements tonight for a project, and needed to style my HTML5 placeholders differently then my input values, so they looked a bit differently when the user entered the code. Doesn’t look like the spec on this is even close to finalized, so I used some browser specific prepends.
I was working working with Less, an awesome tool for dynamic CSS; If you haven’t tried it, you should give it, or SASS, a go.
Anywho, I decided to write a mixin that I could user over and over again if needed, and the above is it. You would call the mixin like so, if you wanted the placeholders to all be black:
.ph(#000);
You could obviously replace the color style with whatever you would need, but this worked for me!
Was setting up some HTML5 audio on a site today, and noticed that the .ogg file was not playing in Firefox. After a bit of pulling out my hair, I realized that GoDaddy did not have this mime type setup on my server. So, I tried this in my .htaccess file:
AddType audio/ogg .ogg
And viola! HTML5 audio in Firefox.
So I finally broke down and signed up for Netflix. My roommate has it and his life seemed too good to be true because of this weekly crimson DVD in the mail. My life has now waned to a driveling mess as I fulfill my movie addiction directly from my living room.
That aside, the first problem I realized was that my roommate and my queue’s were constantly crossing over one another. He would have a DVD out I had next in my queue, or vice versa. Or even worse, we’d have two of the same DVD at the same time!
My solution seemed clear and simple: Use the Netflix API to pull in a feed of both of our feeds, and then parse those feeds with jQeury, only to finally compare them and see where our overlapping tastes lie. Thus, the crossing of the streams would end. Hopefully.
I plan to share my findings along the way, so lets jump into part one of my tutorial on jQuery and the Neflix API. Read the rest of this entry »
Come mothers and fathers
Throughout the land
Learn to use content filters
And help to fight spam