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

Code side pane can't handle nested less, scss and sass #1093

Closed
babobski opened this Issue Feb 19, 2016 · 9 comments

Comments

Projects
None yet
3 participants
@babobski
Contributor

babobski commented Feb 19, 2016

The Code side pane is not showing all nested elements, it only showing a few elements (the same elements that are shown for the autocompletion)

snap 2016-02-19 at 16 37 36

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Feb 19, 2016

That looks like there might be a parsing error. If possible, would you please provide an example of source that does not show up properly in the code browser? That would make it easier to write a unit test case for. Thanks!

@mitchell-as mitchell-as added this to the 9.3.3 milestone Feb 19, 2016

@mitchell-as mitchell-as self-assigned this Feb 19, 2016

@babobski

This comment has been minimized.

Contributor

babobski commented Feb 19, 2016

Will do

@babobski babobski changed the title from Code side pane can't handle nested less to Code side pane can't handle nested less, scss and sass Feb 19, 2016

@babobski

This comment has been minimized.

Contributor

babobski commented Feb 19, 2016

For scss you can use the same test as in #1092, the nesting is the same and I'm not using any vararibles.
For SASS you can use the same test only without all the decoration

.test 
    color: #333
    .control-label 
        font-size: 12px
        color: #a70713
    .btn 
        background-color: #fff
        color: #333
        -webkit-transition: all 200ms ease
        transition: all 200ms ease
        &.green 
            background-color: #0f9920
            -webkit-transition: all 200ms ease
            transition: all 200ms ease
           & :hover, &:active, &:focus 
                color: #000
                background-color: #26771e
        &:hover, &:active, &:focus 
            color: #000
            background-color: #efefef

Adn will also compile in:

.test {
    color: #333;
}

.test .control-label {
    font-size: 12px;
    color: #a70713;
}

.test .btn {
    background-color: #fff;
    color: #333;
    -webkit-transition: all 200ms ease;
    transition: all 200ms ease;
}

.test .btn.green {
    background-color: #0f9920;
    -webkit-transition: all 200ms ease;
    transition: all 200ms ease;
}

.test .btn.green:hover,
.test .btn.green:active,
.test .btn.green:focus {
    color: #000;
    background-color: #26771e;
}

.test .btn:hover,
.test .btn:active,
.test .btn:focus {
    color: #000;
    background-color: #efefef;
}
@babobski

This comment has been minimized.

Contributor

babobski commented Feb 19, 2016

For SASS the sidebar is working better, but still incorrect:
snap 2016-02-19 at 19 41 18

@Naatan

This comment has been minimized.

Member

Naatan commented Feb 22, 2016

@mitchell-as isn't SASS and LESS support "incidental"? ie. you implemented CSS and it happened to work (mostly) for SASS and LESS as well. But I assume since CSS doesn't have nested definitions these would obviously not work for SASS and LESS.

My point being, this seems more like an enhancement than a bug?

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Feb 22, 2016

@Naatan yes I believe you are right. I will reclassify it as such. Thanks for being on top of it :)

@mitchell-as mitchell-as modified the milestones: 10.0, 9.3.3 Feb 22, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Feb 22, 2016

Oh, and @babobski thank you SO MUCH for the examples. They'll be of great help!

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Mar 11, 2016

FYI: My fix in #1092 fixes the LESS section problems -- nested classes are now shown in the pane.

mitchell-as added a commit that referenced this issue Mar 11, 2016

fix: codeintel: Handle nested selectors in SCSS - fixes #1093
Just like the previous fix for nested selectors in Less.

rn=

(integrated from master branch change 9.2.1-1057-g96b15c7 by Mitchell <mitchellb@activestate.com>)
@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Mar 11, 2016

Since SASS is not really used anymore (SCSS has superseded it), it's not worth the effort to try and support it fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment