diff --git a/lib/nib/text/index.styl b/lib/nib/text/index.styl index 71d805c2..f874ab1e 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 './shadow-stroke' diff --git a/lib/nib/text/shadow-stroke.styl b/lib/nib/text/shadow-stroke.styl new file mode 100644 index 00000000..1f1143ad --- /dev/null +++ b/lib/nib/text/shadow-stroke.styl @@ -0,0 +1,2 @@ +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/shadow-stroke.css b/test/cases/shadow-stroke.css new file mode 100644 index 00000000..8a28c228 --- /dev/null +++ b/test/cases/shadow-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/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)