Including External Mixins
See original GitHub issueMixins defined in a file are not correctly imported when the file is included in a larger template. eg:
helper.jade:
mixin foo()
p test
master.jade:
include helper
mixin foo()
will throw an error that foo is undefined unless foo is manually imported via raw jinja syntax eg:
master.jade:
{% from 'helpers.jade' import foo %}
mixin foo()
Issue Analytics
- State:
- Created 11 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
css - How to include @mixin from one sass file to another sass ...
This is the file where I am importing the mixin: action-sheet-layout-1 { @include '../../../theme/main ...
Read more >mixin and @include - Sass
Mixins allow you to define styles that can be re-used throughout your stylesheet. They make it easy to avoid using non-semantic classes like...
Read more >How to import Sass/SCSS mixins global? - DEV Community
scss files in the App.js so I can access the classes/mixins/variables global. But only the classes are accessible. So for example using a...
Read more >Can't @use mixin, but can @import · Issue #2858 · sass/sass
I have a top-level file that only has: @mixin bg_img($path) { background-image: ... so you'd want to @include mixins.bg_img .
Read more >Sass @mixin and @include - W3Schools
Sass Mixins. The @mixin directive lets you create CSS code that is to be reused throughout the website. The @include directive is created...
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
@SyrusAkbary is this because of the jade specification?
This would seem to suggest otherwise: http://tjholowaychuk.com/post/7590787973/jade-mixins-includes
This can be fixed to some extent for the mako compiler, although I’m not 100% sure on the full ramifications of the change, I just know it fixes my particular use case.