stencil-community / stencil-less

Less plugin for Stencil
https://www.npmjs.com/package/@stencil-community/less
Other
6 stars 5 forks source link

Make less a peerDependency (and/or upgrade to 3.8.1) #1

Closed matthew-dean closed 5 years ago

matthew-dean commented 5 years ago

Ideally, less would be a peerDependency and installed by the local project. As it stands, this plugin is pinned to Less 3.0.1, and there were a lot of features released with Less 3.5, such as Maps: http://lesscss.org/features/#maps-feature

I wanted to use these to define theme vars like:

// vars.less
@colors: {
  accent: rgba(32, 191, 85, 1);
  main: rgba(11, 79, 108, 1);
  main-light: rgba(1, 186, 239, 1);
  neutral-light: rgba(251, 251, 255, 1);
  neutral-dark: rgba(117, 117, 117, 1);
}

// app.less
header {
  background: @colors[main];
  // ...
}

This type of organization wasn't available pre Less 3.5 and IMO is essential for theming.

inigotoro commented 5 years ago

Hi, just commenting to bring focus on this matter again. I'm also suffering a similar issue and updating to the latest version of less would fix it, as he did on the pull request #2 . Thanks!

adamdbradley commented 5 years ago

We'll use ^ in the next release.