rev 2288
7 files changed, 34 insertions(+), 27 deletions(-)
+ Saved about 0.15s (25%-30% of total time) on index CSS cache regeneration by adding a simple lookbehind assertion in the very last regex. I can't believe that one single, ultra-simple regex to remove a few empty elements used to take as long as the entire process of nesting, which has dozen of complex regular expressions. And yes, I did tons of tests. Something is wrong here. Well, at least it's fixed now. (Subs-Cache.php)
+ Wess tests in the shape of @is() calls are now even more useful. Up till now, @is (test, if_true, if_false) would be a straightforward use, then @is (test, if_true) showed nothing if test was false; I've now added the simplest possible form, @is (test), which, instead of returning the desired string, returns true or false strings, making it possible to use @is tests inside variable declarations. (Class-CSS.php)
* And obviously, as a result, I've removed the simili-hack for can_flex/can_animate and replaced them with similarly named variables, $can_flex and $can_animate. Technically, I could already have done it long ago (and considered doing it), by just storing the list of browsers in the variables, but I didn't think it was worth cluttering the common CSS file. Since @is tests with no nested variables are executed before variables are parsed, it means Wess will only do the @is test once, instead of each time a can_flex/can_animate request was made before. This-- much better. Not much faster, but at least now I can safely use these as many times as I want. (Class-CSS.php, common.css, index.css, media.css, sections.css)
+ Also added aliases to 'true' and 'false', so that you can use them all alone in an @if/@is test, for debugging purposes (previously, you could only have them inside tests that has a variable in them, such as @if ($var && true)). Seriously, I should have done that one long ago. (Class-System.php)