allow *.less.css files to be processed in addition to *.less files
in case a webserver refuses to serve *.less files
Modified to allow precompiling of *.less.css files as well as *.less …
…files (server won't serve up .less files)
forgot to negate the test for /less\.css$/
This doesn't sound right to me on three levels:
ah, but .less.css files are not css files either.
Not everyone has control over their hosting solution (or in cases like mine the person who does charges $100/h to fix stuff like this)
@matthewdl @Synchro are you happy for this to be closed?
I think a variation on this
should be pulled instead (but with a different option name)
It hadn't occurred to me that import didn't work like that already! Does it need to enforce file names anyway?
Several people have asked for variations of this. Flagging files with .CSS extensions (or other extensions, like .aspx) to be imported, interpreted, and compiled as LESS seems okay, since there can be legitimate server limitations with naming a file .less. Rather than try to solve all those server abnormalities, an author should be able to say to the parser, "Look, this IS really a LESS file." I agree that simply naming .less.css doesn't sufficiently cover it. Something like #less on the URL or something like that could be used for force less import.
@Synchro Alexis's (@cloudhead) idea was to use the same CSS syntax for LESS import, and essentially "smart-switch" the behavior of importing. If it ended in CSS, preserve the @import call as is (because, of course, there are many cases where you want the @import to continue to exist). If it ends in .LESS, then feed it into the parser chain. It works in 99% of cases. It's these edge cases that might become difficult for devs.
One alternative to futzing with URLs is to create a duplicate syntax for LESS imports. In fact, I was about to mention @include as a way to force LESS importing, and then figured it might have been suggested....
Yep: Issue #560. I shot it down, but it's probably an even simpler and more straightforward syntax then appending a bunch of characters to your URL.
So, you could do:
@include url(imreallyalessfile.css); /* interpret this sucker as LESS */
To me, that may be cleaner than stuff like this:
The second option is how the solution in #823 reads to me. Thoughts?
I think the @include syntax makes the most sense.
yes. So all agreed that we close #823 and close this one, and proceed with #560.. ?
add testcase for #315 if I'm understanding right should produce no ou…