Commit Graph

97 Commits

Author SHA1 Message Date
Simone Deponti
959e22f5ff Added media query support.
* env.dumpLineNumbers was being lost when doing "offline" compilation
   (within node.js)
 * Added documentation for the changed options
 * --line-numbers now takes a parameter
   (either "comments", "mediaquery" or "all")
 * The system can now again output mediaqueries for FireLESS
 * Moved comments tests in debug/comments, will duplicate
   for mediaquery and for "all"

Everything is still utterly broken though, tests still fail.
2012-10-07 12:16:03 +01:00
Vsevolod Vlasov
ccfa7402a1 Added ruleset source line number dumping support for debugging purposes. 2012-10-07 12:16:01 +01:00
Will
5eca0142c9 Check XHR return type appropriately
Asynchronous file XHRs need to listen for onreadystatechange.
2012-10-07 12:09:47 +01:00
Will
6bdd800bb6 Allow configuration of asynchronous XHR
Set less.async and/or less.fileAsync to true before including less.js to
force asynchronous XHR requests to be used.  fileAsync is introduced
as a separate setting to maintain existing semantics, as previously changing
less.async to true would only affect http protocol XHRs.
2012-10-07 12:09:47 +01:00
Luke Page
f6917c8fa6 At least catch no browser storage rather than balking 2012-09-01 17:12:32 +01:00
Luke Page
5f99bd22e9 Fix error messages in the browser for imported files with duplicate names (different directory) and links. Fixes #932 2012-09-01 16:45:46 +01:00
Luke Page
f020aae779 Make less more protocol agnostic. Fixes #428 and Fixes #742 and Fixes #706 2012-09-01 15:37:15 +01:00
Desmond Brand
56f11e9666 Fix #423 by preserving order of link/style elements
Appending generated css to the head element is confusing because it
changes the order of style declarations. If there are regular css link
or style elements after the less link element, less declarations with
equal specificity will override css declarations that come later in the
document.

This change preserves the original order by inserting the generated css
immediately after the less link element.
2012-08-18 11:29:35 +01:00
Colin
5f9cf904e7 Only set media type when one is present
Defaulting to media="screen" causes the
browser to ignore inline @media print
and other queries.

Fixes #612
2012-08-12 19:18:03 +01:00
Paulo Gaspar
66bbb9a44a Fix for issue 592. Additional removal of TODOs and Rhino support by
@agatronic.
2012-08-11 16:40:59 +01:00
Trey Shugart
acf65e0f5d Fixes #602 2012-01-31 13:50:26 +11:00
Alexis Sellier
b9dbfc08a4 fix imports on browser 2012-01-15 17:15:17 +01:00
Alexis Sellier
b5dd30f4d4 fix imports on browser 2012-01-15 16:44:03 +01:00
Alexis Sellier
9c344ba5a1 improve error reporting on browser 2012-01-15 16:39:51 +01:00
Cotton Hou
7a033af705 Use if rather than try 2011-12-12 15:57:50 +08:00
Cotton Hou
f255aefccf Shift the type setting in order to work with Webkit, and fix typo for IE. 2011-12-11 14:37:53 +08:00
Hargobind S. Khalsa
bddedfcd21 Accept 2xx statuses even for file requests 2011-09-06 16:04:49 -06:00
Miles
24cc747e5e Added a modified version of Felipe Gasper's IE<9 style injection error fix. 2011-08-03 14:52:35 -07:00
Alexis Sellier
4463e52227 (minor) ws 2011-05-11 14:33:55 -04:00
Alexis Sellier
38b60d8cdb Merge pull request #169 from alkemist/master
(fix) including .less files via absolute path with IE7
2011-05-11 08:54:30 -07:00
Alexis Sellier
1369b57c06 Merge pull request #189 from dz0ny/master
Google Chrome(Chromium) support for extensions
2011-05-11 08:50:09 -07:00
Matt Quail
08b2b353a5 fix implicit vars 2011-02-19 16:42:00 -05:00
Janez Troha
dc5a08014c Fix for Google Chrome(Chromium), so you can use less in extensions, apps. Adds protocol support but you have to use .json as file extension for css file, otherwise you get "Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101". 2011-02-01 09:49:51 -08:00
Luke Daley
0470f0255d When absolutising stylesheet URLs (they are sometimes relative in IE) handle absolute paths by resolving relative to the server root instead of the url of the current page. 2010-12-20 17:37:19 +10:00
cloudhead
40c7ab81a9 don't crash if there's no 'lastModified' header 2010-11-26 17:43:26 -05:00
Daniel Bergey
e24e16843f Fixed issue (#134) where subfiles' @imports were regarding #, ? and url portions thereafter as part of the base url. 2010-11-27 06:09:10 +08:00
cloudhead
af0f9cd63c use 'type' attribute from link tag, when performing a request 2010-11-19 15:18:35 -05:00
cloudhead
9d5eaa724e Merge branch 'master' of github.com:cloudhead/less.js 2010-10-14 17:05:54 -04:00
cloudhead
6517d33cf1 pass url to errback() 2010-10-14 17:05:38 -04:00
neonstalwart
5dd8c1186b fixing logic to determine less.env in the browser 2010-10-13 14:22:47 +08:00
cloudhead
d5ffb1d708 improve error reporting 2010-08-22 14:45:22 -04:00
cloudhead
ea3d92027f attempt to fix IE relative urls 2010-08-22 14:44:45 -04:00
cloudhead
d15752ff5f basic ability to overwrite some config options in browser 2010-08-15 10:58:52 -04:00
Fedor Indutny
afd983b9ea Fixed dot in css name error(when using style.1.css and style.2.css), also fixed 'url()' error 2010-07-26 03:56:14 +08:00
cloudhead
1a30768af9 remove domain name and root slash from extracted id 2010-07-04 21:20:29 +02:00
cloudhead
36371a3007 fix refresh()'s timer output 2010-07-04 21:19:56 +02:00
cloudhead
a61ca3ec5b more robust id extraction from href 2010-07-04 21:05:02 +02:00
cloudhead
90ab7188f2 (new) less.refreshStyles, and reload styles on refresh() 2010-07-04 19:21:43 +02:00
Victor Berchet
d3c873ed5f Fix for stylesheets having a '.' in their basename 2010-07-02 01:23:46 +08:00
cloudhead
c520b5859a force refresh on page load in development mode 2010-07-01 11:09:24 +02:00
cloudhead
a3c1c61ef0 (minor) style 2010-07-01 11:09:03 +02:00
cloudhead
45592cb3cc (new) parse style tags with type=text/less 2010-07-01 11:08:52 +02:00
cloudhead
6426ac5c7a support type=text/less and text/x-less for specifying stylesheets 2010-07-01 11:08:27 +02:00
cloudhead
494398e736 (minor) style fixes 2010-07-01 02:35:28 +02:00
Kristoffer Walker
eff69f5b77 bug: window.localStorage in Firefox
Firefox 3.6.4 throws an error when trying to access `window.localStorage`.
(at least from `chrome://` URLs in extensions if not more)
2010-06-29 19:18:24 +08:00
Kristoffer Walker
1a8188bd20 Support chrome: and resource: location protocols.
XMLHttpRequest tried to load `chrome:` and `resource:` protocols as if
they were not local. Change isFileProtocol flag to accurately represent
them.
2010-06-29 19:18:24 +08:00
Kristoffer Walker
3820350b9c Use .overrideMimeType() for Firefox XHR
By overriding the mime type of the default XML to 'text/css' we get rid
of the automatic XML parsing and DOM building that XMLHttpRequest tries
to do whenever it gets a response.
2010-06-29 19:18:23 +08:00
cloudhead
91672f7c24 fix media type not being preserved when generated css 2010-06-27 16:11:44 -04:00
cloudhead
5021f1d679 don't depend on document.querySelectorAll 2010-06-22 21:56:45 -07:00
cloudhead
2e8a714c92 fix error reporting 2010-06-20 14:47:41 -04:00