swissquote / crafty

The task runner that binds them all
https://swissquote.github.io/crafty/
Apache License 2.0
30 stars 13 forks source link

`swissquote/no-type-outside-scope` reported at wrong line #958

Closed onigoetz closed 1 year ago

onigoetz commented 4 years ago

With the following CSS:

.ExtendedView {
    display: block;
    top: 6rem;
    right: 0;
    left: 0;
    bottom: 0;
    overflow: auto;
    opacity: 0;
    visibility: hidden;

    transition: all 0.6s;

    &__header__content__back {
        position: absolute;
        left: var(--space-size--md);
        font-size: var(--font-size--regular);
        text-decoration: underline;
        cursor: pointer;

        &:hover svg {
            fill: var(--color-brand);
        }

I get :

css/ExtendedView.scss
  3:8  ✖  Types are allowed only inside a scope  swissquote/no-type-outside-scope

However the error is not at line 3, but on the line with &:hover svg {

onigoetz commented 4 years ago

Reported by @SergTanchenko

onigoetz commented 4 years ago

I currently can't improve this, nested selectors and selector parsing aren't compatible. I'll have a look once we upgrade to PostCSS 8

onigoetz commented 1 year ago

Doesn't seem to be fixable sadly, because of how parsing is done in multiple steps :/