Closed matthew-dean closed 10 years ago
urlRewriting: true
seems much cleaner and easier to understand the behavior, and the term is familiar. Obviously it's only relative URLs that are rewritten since they are not absolute paths.
Although... now this is a LESS feature request instead of a documentation update, but let's start by clearing up the meaning of this property.
Or.... does "whether to adjust url's to be relative" mean that this turns absolute paths into relative ones?? Gah.
Urls always get rewritten in the browser because the stylesheet gets put into the browser dom, so is relative to the window url rather than the less file. This is important for the less to work on multiple pages.
The option is whether sub less files in different directories should have resource urls adjusted taking that sub directory into account.
So.. yes definitely needs explanation!
I'm working on clarifying the docs for these definitions, here is my start at it: https://gist.github.com/jonschlinkert/3b8774715a4db2a23581
It would be awesome if you guys could look this over and just start adding to the definitions (probably just make comments at the bottom of the gist), then I'll keep updating the doc. Most of the docs probably don't need this kind of scrutinization, but here I think it would help.
covered with the updating of the options texts
This doesn't make sense to me on the relativeUrls option:
If false, URLs are already relative? The way that sentence is written, it sounds like if you set it to false, nothing will happen, because something has already happened. Is this supposed to mean:
"If false, relative URLs (../subpath/) will be interpreted as relative to the source LESS file and rewritten when the CSS is compiled" ?
Either way, that particular option might need more explanation / examples.
I was just about to use this, but I'm still not sure if "false" or "true" will rewrite my URLs. It's a confusing property name because it has to do with URL rewriting. If I want to rewrite, my instinct would be to set to "true" to say, "Yes, rewrite please", but I believe the way this is written, I set to "false" to turn rewriting of relative URLs on, and set to "true" to not do anything with relative URLs.
Yeah, confused.