Skip to main content

Home/ CSS Evangelist/ Group items tagged pseudo-class

Rss Feed Group items tagged

Vernon Fowler

An introduction to LESS, and comparison to Sass | Smashing Coding - 0 views

  • The only difference in variables between LESS and Sass is that, while LESS uses @, Sass uses $. There are some scope differences as well, which I’ll get to shortly.
  • With Sass, you declare @mixin prior to the style to identify it as a mixin. Later, you declare @include to call it.
  • Parametric Mixins Like having functions in your CSS (*swoon*), these can be immensely useful for those seemingly redundant tasks of modern-day CSS.
  • ...8 more annotations...
  • .border-radius( @radius: 3px ) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; }
  • The syntax in Sass is very similar to that of LESS. Just use the $ for variables, and call the mixins with the @mixin and @include method mentioned earlier.
  • Selector Inheritance Here’s something not provided in LESS. With this ability, you can append a selector to a previously established selector without the need to add it in a comma-separated format. .menu { border: 1px solid #ddd; } .footer { @extend .menu; } /* will render like so: */ .menu, .footer { border: 1px solid #ddd; }
  • With LESS, you can nest ids, classes and elements as you go.
  • You can also refer in element styles to their pseudo-elements by using the &, which in this case functions similar to this in JavaScript.
  • Sass is a lot more versatile with numbers than LESS. It has built into it conversion tables to combine comparable units.
  • Sass seems to have a lot more color options — not that I would need them all. Lighten and darken are the only ones that I see myself using often.
  • Conditionals and Control This is rather nifty, and another thing not provided by LESS. With Sass, you have the ability to use if { } else { } conditional statements, as well as for { } loops. It supports and, or and not, as well as the <, >, <=, >= and == operators.
yc c

The Mysterious Pseudo Class in CSS - 2 views

  •  
    css pseudo-class browser compability chart
Vernon Fowler

Meet the Pseudo Class Selectors | CSS-Tricks - 0 views

  • You probably wouldn't want to drop cap every single paragraph on the page, but just the first one, so, p:first-child:first-letter { }
Frederik Van Zande

Agile Ajax: Hacking transparent PNG support into IE6 with IE PNG Fix, CSS and jQuery (p... - 0 views

  •  
    esterday's post showed how to hack the :first-child pseudo-class into IE6 with jQuery and CSS. Continuing with that theme, today and tomorrow we'll show how to enable transparent PNG support in IE6
Alexis Sgavel

Custom drop downs with CSS3 | Lea Verou - 0 views

  •  
    The pointer-events property allows authors to control whether or when an element may be the target of user pointing device (pointer, e.g. mouse) events. This property is used to specify under which circumstance (if any) a pointer event should go "through" an element and target whatever is "underneath" that element instead. This also applies to other "hit testing" behaviors such as dynamic pseudo-classes (:hover, :active, :focus), hyperlinks, and Document.elementFromPoint().
webExplorations

Selectivizr - CSS3 pseudo-class and attribute selectors for IE 6-8 - 0 views

  •  
    Make your CSS3 web pages backward compatible with IE 6=8
1 - 8 of 8
Showing 20 items per page