richthegeek / phpsass

A compiler for SASS/SCSS written in PHP, brought up to date (approx 3.2) from a fork of PHamlP: http://code.google.com/p/phamlp/
http://phpsass.com/
382 stars 83 forks source link

Nested selectors inside mixins not working correctly #133

Open thomasfrobieter opened 11 years ago

thomasfrobieter commented 11 years ago

Following code:


@mixin horizontal-menu {
    width:auto;
    text-align:left;
    li{
      display:inline-block;
      border-width:0 1px 0 0;
      border-style:solid;
      border-color:#ccc;
      &.last{ border-right:0; }
      a{
        padding:1px 10px;
      }
    }
}

.region-header .menu{
    @include horizontal-menu;
}

The Result with phpsass is, that for example the - li - are printed out as single selector like this:

li {
display: inline-block;
border-width: 0 1px 0 0;
border-style: solid;
border-color: #ccc;
}

Tested it here http://sassmeister.com/, result:

.region-header .menu {
  width: auto;
  text-align: left;
}
.region-header .menu li {
  display: inline-block;
  border-width: 0 1px 0 0;
  border-style: solid;
  border-color: #cccccc;
}
.region-header .menu li.last {
  border-right: 0;
}
.region-header .menu li a {
  padding: 1px 10px;
}
ChALkeR commented 11 years ago

Related: #126?