roborourke / wp-sass

Sass for WordPress
90 stars 24 forks source link

@extend .class with &:after and &:before code not producing expected output? #5

Closed ericpedia closed 12 years ago

ericpedia commented 12 years ago

Not sure if this is a phpsass issue or a wp-sass issue (or if I'm somehow misapplying \@extend):

SCSS:

.clearfix {
    &:before, &:after {
        content: ""
        display: table
    }
    &:after {
      clear: both
      }
    zoom: 1
}

.myclass {
     ul {
        li {
            @extend .clearfix;
        }
    }
}

Resulting CSS:

.clearfix,
.myclass ul li {
  zoom: 1; }
  .clearfix:before,
  .clearfix:after,
  .myclass ul li {
    content: "" display: table; }
  .clearfix:after,
  .myclass ul li {
    clear: both; }

Note that the :before and :after properties is getting added not to .myclass ul li:before and .myclass ul li:after, but directly to .myclass ul li.

noeltock commented 12 years ago

The first thing I always do with things like this is check issues from the original repo, sometimes helps save time.

ericpedia commented 12 years ago

Right, I didn't find it there; should I assume any SASS-to-CSS output issue is a PHPSASS issue and not WPSASS?

On Aug 30, 2012, at 2:56 PM, Noel Tock wrote:

The first thing I always do with things like this is check issues from the original repo, sometimes helps save time.

? Reply to this email directly or view it on GitHub.

noeltock commented 12 years ago

This might be the issue (or part of it)?

https://github.com/richthegeek/phpsass/issues/13

roborourke commented 12 years ago

I think so yeah. Wp-sass is just a Wordpress wrapper for that package so if there's a problem with wp bugs or plugin/theme conflicts etc... let me know :)

ericpedia commented 12 years ago

FYI the relevant PHPSass issue is this one: https://github.com/richthegeek/phpsass/issues/45