What's the current theme's less path
@psychobunny What path do I import from my less files to get the current less files? I need this to do mixins and stuff.
The asterisk next to the dash only represents the name of the current theme. I don't know which theme you're running currently, unless you mean the theme on this site here.
Hope that helps.
@trevor by current theme, I mean the theme selected for a given NodeBB install. As in, I don't know what theme the amin may select, so how do I link to it's less?
config['theme:id']gives the current theme selected.
So, I would access them with
"../"+module.parent.require("./meta").config["theme:id"]+"/theme.less", but how would I do this from within my less files?
@pitaj There's no real "current working directory" for the less compiler we're using. We pass in a bunch of paths, and then it tries to match files in (or relative to) those folders.
The path to the theme's LESS folder is a pretty safe bet. You could try importing files outside of that directory using
../../? Never tried it, but let us know if it works out.
@julian but, how would I pass the less path of the theme into my plugin's less file without knowing what theme will be used?
I'm trying to use mixins to style my plugin's pages the same as the rest of the site.