From c9661e3f22de601e96b1b228bc03ee615d988a04 Mon Sep 17 00:00:00 2001 From: iam4x <127086@supinfo.com> Date: Thu, 10 Jan 2013 15:49:22 +0100 Subject: [PATCH 1/4] mixin for text stroke --- lib/nib/text/index.styl | 1 + lib/nib/text/stroke.styl | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 lib/nib/text/stroke.styl diff --git a/lib/nib/text/index.styl b/lib/nib/text/index.styl index 71d805c2..0378055e 100644 --- a/lib/nib/text/index.styl +++ b/lib/nib/text/index.styl @@ -2,3 +2,4 @@ @import './ellipsis' @import './hide-text' @import './replace-text' +@import './stroke' \ No newline at end of file diff --git a/lib/nib/text/stroke.styl b/lib/nib/text/stroke.styl new file mode 100644 index 00000000..2af52e32 --- /dev/null +++ b/lib/nib/text/stroke.styl @@ -0,0 +1,2 @@ +stroke(n) + text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n \ No newline at end of file From db27261892cf68aa31f16d773ad5518a8a93ded5 Mon Sep 17 00:00:00 2001 From: Maxime Tyler <127086@supinfo.com> Date: Mon, 17 Mar 2014 13:04:11 +0100 Subject: [PATCH 2/4] style(stroke): add newline at end of file --- lib/nib/text/stroke.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/text/stroke.styl b/lib/nib/text/stroke.styl index 2af52e32..dc0afff1 100644 --- a/lib/nib/text/stroke.styl +++ b/lib/nib/text/stroke.styl @@ -1,2 +1,2 @@ stroke(n) - text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n \ No newline at end of file + text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n From 4f8824b89a23d5acd7867776846e13e3d8266585 Mon Sep 17 00:00:00 2001 From: Maxime Tyler <127086@supinfo.com> Date: Mon, 17 Mar 2014 13:04:31 +0100 Subject: [PATCH 3/4] test(stroke): added tests on stroke --- test/cases/text.stroke.css | 9 +++++++++ test/cases/text.stroke.styl | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/cases/text.stroke.css create mode 100644 test/cases/text.stroke.styl diff --git a/test/cases/text.stroke.css b/test/cases/text.stroke.css new file mode 100644 index 00000000..8a28c228 --- /dev/null +++ b/test/cases/text.stroke.css @@ -0,0 +1,9 @@ +button { + text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; +} +button { + text-shadow: -1px -1px 0 rgba(0,0,0,0.5), 1px -1px 0 rgba(0,0,0,0.5), -1px 1px 0 rgba(0,0,0,0.5), 1px 1px 0 rgba(0,0,0,0.5); +} +button { + text-shadow: -1px -1px 0 #f00, 1px -1px 0 #f00, -1px 1px 0 #f00, 1px 1px 0 #f00; +} diff --git a/test/cases/text.stroke.styl b/test/cases/text.stroke.styl new file mode 100644 index 00000000..99fa4c01 --- /dev/null +++ b/test/cases/text.stroke.styl @@ -0,0 +1,10 @@ +@import 'nib/text/stroke' + +button + stroke(#000) + +button + stroke(rgba(0, 0, 0, 0.5)) + +button + stroke(red) From 22aa2b0b445e950f4decdbb6c61d87ec6d0e2f27 Mon Sep 17 00:00:00 2001 From: Maxime Tyler <127086@supinfo.com> Date: Sat, 22 Mar 2014 00:36:22 +0100 Subject: [PATCH 4/4] chore(name): changed `stroke` to `shadow-stroke` --- lib/nib/text/index.styl | 2 +- lib/nib/text/{stroke.styl => shadow-stroke.styl} | 2 +- test/cases/{text.stroke.css => shadow-stroke.css} | 0 test/cases/shadow-stroke.styl | 10 ++++++++++ test/cases/text.stroke.styl | 10 ---------- 5 files changed, 12 insertions(+), 12 deletions(-) rename lib/nib/text/{stroke.styl => shadow-stroke.styl} (80%) rename test/cases/{text.stroke.css => shadow-stroke.css} (100%) create mode 100644 test/cases/shadow-stroke.styl delete mode 100644 test/cases/text.stroke.styl diff --git a/lib/nib/text/index.styl b/lib/nib/text/index.styl index 0378055e..f874ab1e 100644 --- a/lib/nib/text/index.styl +++ b/lib/nib/text/index.styl @@ -2,4 +2,4 @@ @import './ellipsis' @import './hide-text' @import './replace-text' -@import './stroke' \ No newline at end of file +@import './shadow-stroke' diff --git a/lib/nib/text/stroke.styl b/lib/nib/text/shadow-stroke.styl similarity index 80% rename from lib/nib/text/stroke.styl rename to lib/nib/text/shadow-stroke.styl index dc0afff1..1f1143ad 100644 --- a/lib/nib/text/stroke.styl +++ b/lib/nib/text/shadow-stroke.styl @@ -1,2 +1,2 @@ -stroke(n) +shadow-stroke(n) text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n diff --git a/test/cases/text.stroke.css b/test/cases/shadow-stroke.css similarity index 100% rename from test/cases/text.stroke.css rename to test/cases/shadow-stroke.css diff --git a/test/cases/shadow-stroke.styl b/test/cases/shadow-stroke.styl new file mode 100644 index 00000000..8eb0bd32 --- /dev/null +++ b/test/cases/shadow-stroke.styl @@ -0,0 +1,10 @@ +@import 'nib/text/shadow-stroke' + +button + shadow-stroke(#000) + +button + shadow-stroke(rgba(0, 0, 0, 0.5)) + +button + shadow-stroke(red) diff --git a/test/cases/text.stroke.styl b/test/cases/text.stroke.styl deleted file mode 100644 index 99fa4c01..00000000 --- a/test/cases/text.stroke.styl +++ /dev/null @@ -1,10 +0,0 @@ -@import 'nib/text/stroke' - -button - stroke(#000) - -button - stroke(rgba(0, 0, 0, 0.5)) - -button - stroke(red)