Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with extending some selector contain nested selector #29

Closed
item4 opened this issue Oct 14, 2014 · 2 comments
Closed

Bug with extending some selector contain nested selector #29

item4 opened this issue Oct 14, 2014 · 2 comments

Comments

@item4
Copy link
Contributor

item4 commented Oct 14, 2014

I tried some test.

Conditions

  1. requirements (git submodule) for external scss framework

    git submodule add --name bootstrap-sass git@github.com:twbs/bootstrap-sass.git
  2. test.scss

    @import "bootstrap-sass/assets/stylesheets/bootstrap";
    
    .test {
      @extend .table;
    }

Tests

libsass-python's sassc command

Output (I added some new line to pretty view)

.table > thead > tr > th, 
  .table > thead > tr > .test, 
  .table > thead > tr > td, 
  .table > thead > tr > .test, 
  .table > tbody > tr > th, 
  .table > tbody > tr > .test, 
  .table > tbody > tr > td, 
  .table > tbody > tr > .test, 
  .table > tfoot > tr > th, 
  .table > tfoot > tr > .test, 
  .table > tfoot > tr > td, 
  .table > tfoot > tr > .test {
    padding: 8px;
    line-height: 1.42857;
    vertical-align: top;
    border-top: 1px solid #ddd; }

Result: wrong

ruby sass command

Output

.table > thead > tr > th, .test > thead > tr > th,
  .table > thead > tr > td,
  .test > thead > tr > td,
  .table > tbody > tr > th,
  .test > tbody > tr > th,
  .table > tbody > tr > td,
  .test > tbody > tr > td,
  .table > tfoot > tr > th,
  .test > tfoot > tr > th,
  .table > tfoot > tr > td,
  .test > tfoot > tr > td {
    padding: 8px;
    line-height: 1.42857;
    vertical-align: top;
    border-top: 1px solid #ddd; }

Result: correct

sassc (libsass CLI implementation)

Output

.table > thead > tr > th, 
  .test > thead > tr > th, 
  .table > thead > tr > td, 
  .test > thead > tr > td, 
  .table > tbody > tr > th, 
  .test > tbody > tr > th, 
  .table > tbody > tr > td, 
  .test > tbody > tr > td, 
  .table > tfoot > tr > th, 
  .test > tfoot > tr > th, 
  .table > tfoot > tr > td, 
  .test > tfoot > tr > td {
    padding: 8px;
    line-height: 1.42857;
    vertical-align: top;
    border-top: 1px solid #ddd; }

Result: correct

sassc v1.0.1 with libsass v2.0.0

Output

.table > thead > tr > th, 
  .table > thead > tr > .test, 
  .table > thead > tr > td, 
  .table > thead > tr > .test, 
  .table > tbody > tr > th, 
  .table > tbody > tr > .test, 
  .table > tbody > tr > td, 
  .table > tbody > tr > .test, 
  .table > tfoot > tr > th, 
  .table > tfoot > tr > .test, 
  .table > tfoot > tr > td, 
  .table > tfoot > tr > .test {
    padding: 8px;
    line-height: 1.42857;
    vertical-align: top;
    border-top: 1px solid #ddd; }

Result: wrong


I (also) think it is libsass 2.0's problem. if someone faced problems like this, he must wait for supporting next libsass version.

@item4 item4 changed the title Bug with extending some selector contain nested selecter Bug with extending some selector contain nested selector Oct 14, 2014
@item4
Copy link
Contributor Author

item4 commented Oct 20, 2014

I tested in new version and checked it fixed.

@dahlia
Copy link
Member

dahlia commented Oct 21, 2014

Fixed by 8faeafd.

@dahlia dahlia closed this as completed Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants