From a3c3ab81b33ec9eeb1770b7602a8348a977d59b0 Mon Sep 17 00:00:00 2001 From: Anton Simonov <16051976@rambler.ru> Date: Mon, 22 Apr 2013 17:53:48 +0000 Subject: [PATCH] update W3 gradient direction notation --- lib/nib/gradients.styl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index 04936c10..3067caf0 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -134,7 +134,16 @@ linear-gradient(start, stops...) add-property(prop, replace(val, '__CALL__', gradient)) // standard - 'linear-gradient(%s, %s)' % (start stops) + if start == top + start = bottom + else if start == bottom + start = top + else if start == left + start = right + else if start == right + start = left + + 'linear-gradient(to %s, %s)' % (start stops) /* * Create a linear gradient image with the given start position