ApPeL ApPeL - 2 years ago 168
Sass (Sass) Question

sass :first-child not working

I have not been using SASS for a very long time and wanted to know if there are some issues with pseudo-elements such as


Answer Source

While @Andre is correct that there are issues with pseudo elements and their support, especially in older (IE) browsers, that support is improving all the time.

As for your question of, are there any issues, I'd say I've not really seen any, although the syntax for the pseudo-element can be a bit tricky, especially when first sussing it out. So:

  declarations: ...
    declarations: ...
      declarations: ...

which compiles as one would expect:

  declarations... }
div#top-level div.inside {
  declarations... }
div#top-level div.inside:first-child {
  declarations... }

I haven't seen any documentation on any of this, save for the statement that "sass can do everything that css can do." As always, with Haml and SASS the indentation is everything.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download