Less mixin not working
See original GitHub issue- ember-cli: 2.7.0
- ember-component-css: 0.2.0-beta.6
- ember-cli-less: 1.5.3
.mixin {
color: blue;
}
.hello {
color: red;
.mixin;
}
File: components/my-component/style.less (8)
The Broccoli Plugin: [PodStyles] failed with:
CssSyntaxError: <css input>:8:3: Unknown word
at Input.error (/Users/exeto/Projects/ember-test/node_modules/postcss/lib/input.js:120:22)
at LessParser.unknownWord (/Users/exeto/Projects/ember-test/node_modules/postcss/lib/parser.js:457:26)
at LessParser.other (/Users/exeto/Projects/ember-test/node_modules/postcss/lib/parser.js:174:14)
at LessParser.loop (/Users/exeto/Projects/ember-test/node_modules/postcss/lib/parser.js:81:26)
at lessParse (/Users/exeto/Projects/ember-test/node_modules/postcss-less/dist/less-parse.js:23:12)
at new LazyResult (/Users/exeto/Projects/ember-test/node_modules/postcss/lib/lazy-result.js:80:24)
at Processor.process (/Users/exeto/Projects/ember-test/node_modules/postcss/lib/processor.js:200:12)
at Object.module.exports.syntax (/Users/exeto/Projects/ember-test/node_modules/ember-component-css/lib/preprocess-class-names.js:37:8)
at PodStyles.processString (/Users/exeto/Projects/ember-test/node_modules/ember-component-css/lib/pod-style.js:34:37)
at /Users/exeto/Projects/ember-test/node_modules/broccoli-persistent-filter/lib/strategies/default.js:10:19
The broccoli plugin was instantiated at:
at PodStyles.Plugin (/Users/exeto/Projects/ember-test/node_modules/broccoli-plugin/index.js:7:31)
at PodStyles.Filter [as constructor] (/Users/exeto/Projects/ember-test/node_modules/broccoli-persistent-filter/index.js:60:10)
at new PodStyles (/Users/exeto/Projects/ember-test/node_modules/ember-component-css/lib/pod-style.js:12:10)
at CoreObject.module.exports.treeForStyles (/Users/exeto/Projects/ember-test/node_modules/ember-component-css/index.js:61:19)
at CoreObject.superWrapper [as treeForStyles] (/Users/exeto/Projects/ember-test/node_modules/ember-cli/node_modules/core-object/lib/assign-properties.js:32:18)
at CoreObject._treeFor (/Users/exeto/Projects/ember-test/node_modules/ember-cli/lib/models/addon.js:373:33)
at CoreObject.treeFor (/Users/exeto/Projects/ember-test/node_modules/ember-cli/lib/models/addon.js:341:21)
at /Users/exeto/Projects/ember-test/node_modules/ember-cli/lib/broccoli/ember-app.js:498:20
at Array.map (native)
at EmberApp.addonTreesFor (/Users/exeto/Projects/ember-test/node_modules/ember-cli/lib/broccoli/ember-app.js:496:30)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
less mixins do not work - Stack Overflow
The Fix (I think). Based on your edit of what you are expecting, it appears that you don't want to be doing mixins,...
Read more >Mixin LESS not working - Forums - CSS-Tricks
Hi,. When I read the docs about LESS here: http://lesscss.org/features/#mixins-feature-namespaces, I read this:
Read more >less mixins are not supported when using with postcss-less ...
Hi! I've created a sample repo to demonstrate what I am talking about. Despite the usage of postcss-less syntax, postcss-import still fails ...
Read more >Features In-Depth | Less.js
Variables and mixins defined in a mixin are visible and can be used in caller's scope. There is only one exception: a variable...
Read more >How to use Mixins in LESS, a CSS Preprocessor - SitePoint
A parametric mixin all by itself is not output when compiled. ... For working with LESS.app, you can check the video tutorial on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hmm… I’ll add in that unit test and see about getting it fixed.
@exeto it looks like it namespaces the mixin rule to something like…
so when you try to just reference
.mixin
it can’t find it.