CSS

TwitterFacebook
Get flash to fully experience Pearltrees

Magic Numbers in CSS

http://css-tricks.com/magic-numbers-in-css/ Published by Chris Coyier Despite the super fun sounding name, magic numbers are a bad thing. It is an old school programming term for "unnamed numerical constant".

FIXED! font-face rendering incorrectly in Chrome

For a while now web designers have been tackling the issue of fonts on the web. Times have now changed from the days of designing strictly in web-safe fonts (Arial, Tahoma, Georgia etc.) to using JavaScript (Cufon) to render more fancy fonts. With a huge wealth of fonts (both paid and free) now readily available online to designers, rendering fonts online has become more of an issue. Sure, your website may look great in Photoshop, but how are you going to emulate that intricate font across multiple browsers? There are a variety of font services out there: fonts.com and Google fonts are the big players; however we decided to go down the route of @font-face, as we have a large collection of bought fonts already that we could utilise through @font-face. http://www.adtrak.co.uk/blog/font-face-chrome-rendering/#fix

The @Font-Face Rule And Useful Web Font Tricks

The possibility of embedding any font you like into websites via @font-face is an additional stylistic device which promises to abolish the monotony of the usual system fonts. It surely would be all too easy if there was only one Web font format out there. Instead, there’s quite a variety, as you will get to know in this article. This quick introduction to @font-face will lead you towards a guide through the @font-face kit generator. http://www.smashingmagazine.com/2011/03/02/the-font-face-rule-revisited-and-useful-tricks/

Learning To Use The :before And :after Pseudo-Elements In CSS

If you’ve been keeping tabs on various Web design blogs, you’ve probably noticed that the :before and :after pseudo-elements have been getting quite a bit of attention in the front-end development scene — and for good reason . In particular, the experiments of one blogger — namely, London-based developer Nicolas Gallagher — have given pseudo-elements quite a bit of exposure of late. Nicolas Gallagher used pseudo-elements to create 84 GUI icons created from semantic HTML. http://coding.smashingmagazine.com/2011/07/13/learning-to-use-the-before-and-after-pseudo-elements-in-css/
Responsive

An Introduction To LESS, And Comparison To Sass - Smashing Magazine

http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/ I’ve been using LESS religiously ever since I stumbled upon it months ago. CSS was never really a problem for me, in and of itself, but I was intrigued by the idea of using variables to create something along the lines of a color palette for my websites and themes. Having a color palette with a fixed number of options to choose from helps prevent me from going color crazy and deviating from a chosen style.

Stop Making Sprites (Compass, Sass, and PNG Sprite Generation) | Viget Inspire

http://viget.com/inspire/stop-making-sprites-compass-sass-and-png-sprite-generation Update 01/11/12: new code at the bottom of this post. Sass has been kicking around for a while, but I hadn’t given it a try until just recently. Sass usually goes hand-in-hand with Rails, Compass makes it so easy to run Sass on standalone projects that I’ve started using it on nearly everything.

Don’t use IDs in CSS selectors? ❧ Oli.jp (@boblet)

http://oli.jp/2011/ids/ Recently I came across the post by Matt Wilcox called CSS Lint is harmful , ranting about the useful free tool CSS Lint . The “Don’t use IDs in selectors” suggestion seems to have offended Matt the most, but I was surprised that many commenters also mentioned this as being a reason to avoid CSS Lint. This surprised me because smart people have been saying prefer classes to IDs for a while now. The article was light on reasons why this suggestion might be bad, but it boils down to:

The 30 CSS Selectors you Must Memorize

This entry is part 2 of 16 in the CSS3 Mastery Session - Show All « Previous Next » Twice a month, we revisit some of our readers’ favorite posts from throughout the history of Nettuts+. This tutorial was first published in November, 2010. So you learned the base id , class , and descendant selectors – and then called it a day? If so, you’re missing out on an enormous level of flexibility. While many of the selectors mentioned in this article are part of the CSS3 spec, and are, consequently, only available in modern browsers, you owe it to yourself to commit these to memory. http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/

CSS3 Solutions for Internet Explorer - Smashing Magazine

CSS3 is probably the hottest trend in web design right now, allowing developers the opportunity to implement a number of solutions into their projects with some very straightforward CSS while avoiding having to resort to nonsemantic markup, extra images, and complex JavaScript. Unfortunately, it’s not a surprise that Internet Explorer, even in its most recent version, still does not support the majority of the properties and features introduced in CSS3. Experienced developers understand that CSS3 can be added to new projects with progressive enhancement in mind . http://coding.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/
Sass

The clearfix hack is a popular way to contain floats without resorting to using presentational markup. This article presents an update to the clearfix method that further reduces the amount of CSS required. Demo: Micro clearfix hack Known support : Firefox 3.5+, Safari 4+, Chrome, Opera 9+, IE 6+ The “micro clearfix” method is suitable for modern browsers and builds upon Thierry Koblentz’s “clearfix reloaded” , which introduced the use of both the :before and :after pseudo-elements. Here is the updated code (I’ve used a shorter class name too):

A new micro clearfix hack

http://nicolasgallagher.com/micro-clearfix-hack/
CSS3