stencil-sass icon indicating copy to clipboard operation
stencil-sass copied to clipboard

Use sass in styles property (component decorator)

Open KenavR opened this issue 6 years ago • 1 comments

Not sure if this is the right place to ask this, but is it possible to use sass/scss inside the styles property of the decorator?

I like keeping components in a single file, but I also would like to use scss.

Example

@Component({
  tag: 'my-hero',
  styles: `
    .hero {
      ...
      &__details {
        ...
      }

      &__screenshot {
        ...
      }
    }
  `,
  shadow: true
})
export class Hero {
  render() {
    return (
        <div class="hero">
          <div class="hero__details">
            ...
          </div>
          <div class="hero__screenshot">
            ...
          </div>
        </div>
    );
  }
}

thanks.

KenavR avatar Feb 23 '19 16:02 KenavR

You know, that's a good question. I'm not so sure it is. Would you like this behavior? If so, upvote this please!

Also, it may be worth signal boosting this more so in the @ionic-team/stencil repo. That way, other non-sass community users could benefit from this behavior as well, if we decide to introduce it. Ultimately, that's where the code change would probably be anyways.

splitinfinities avatar Sep 24 '21 21:09 splitinfinities

Hey! Thanks for this suggestion!

I don't think we've received enough signal from the community that this feature is desired. As a result, I'm going to close this for now. We can always re-evaluate this feature request some time in the future.

Thanks again!

rwaskiewicz avatar Oct 10 '22 18:10 rwaskiewicz