From 3d23b36f6397bd01f0c8a6bf14122730aa5e86b3 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Mon, 2 Jan 2012 02:29:16 -0500 Subject: [PATCH] inital implimentation of border-image --- frameworks/compass/stylesheets/compass/_css3.scss | 1 + .../stylesheets/compass/css3/_border-image.scss | 15 +++++++++++++++ .../stylesheets/compass/css/border-image.css | 5 +++++ .../stylesheets/compass/sass/border-image.scss | 3 +++ 4 files changed, 24 insertions(+) create mode 100644 frameworks/compass/stylesheets/compass/css3/_border-image.scss create mode 100644 test/fixtures/stylesheets/compass/css/border-image.css create mode 100644 test/fixtures/stylesheets/compass/sass/border-image.scss diff --git a/frameworks/compass/stylesheets/compass/_css3.scss b/frameworks/compass/stylesheets/compass/_css3.scss index 3ca84aa0..aacea648 100644 --- a/frameworks/compass/stylesheets/compass/_css3.scss +++ b/frameworks/compass/stylesheets/compass/_css3.scss @@ -1,4 +1,5 @@ @import "css3/border-radius"; +@import "css3/border-image"; @import "css3/inline-block"; @import "css3/opacity"; @import "css3/box-shadow"; diff --git a/frameworks/compass/stylesheets/compass/css3/_border-image.scss b/frameworks/compass/stylesheets/compass/css3/_border-image.scss new file mode 100644 index 00000000..36222230 --- /dev/null +++ b/frameworks/compass/stylesheets/compass/css3/_border-image.scss @@ -0,0 +1,15 @@ +@import "shared"; +//border-image: source slice width outset repeat +// defaults none 100% 1 0 stretch via http://www.w3schools.com/cssref/css3_pr_border-image.asp + +@mixin border-image($source, $slice:100%, $width:1, $outset:0, $repeat:'stretch') { + $value: (image_url($source), $slice, $width, $outset, $repeat); + @include experimental(border-image, $value, + -moz, + -webkit, + -o, + not -ms, + not -khtml, + official + ); + } \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/css/border-image.css b/test/fixtures/stylesheets/compass/css/border-image.css new file mode 100644 index 00000000..19bc690b --- /dev/null +++ b/test/fixtures/stylesheets/compass/css/border-image.css @@ -0,0 +1,5 @@ +.simple { + -webkit-border-image: url('/images/100x150.jpeg?busted=true'), 100%, 1, 0, "stretch"; + -moz-border-image: url('/images/100x150.jpeg?busted=true'), 100%, 1, 0, "stretch"; + -o-border-image: url('/images/100x150.jpeg?busted=true'), 100%, 1, 0, "stretch"; + border-image: url('/images/100x150.jpeg?busted=true'), 100%, 1, 0, "stretch"; } \ No newline at end of file diff --git a/test/fixtures/stylesheets/compass/sass/border-image.scss b/test/fixtures/stylesheets/compass/sass/border-image.scss new file mode 100644 index 00000000..b0ea33f7 --- /dev/null +++ b/test/fixtures/stylesheets/compass/sass/border-image.scss @@ -0,0 +1,3 @@ +@import "compass/css3/border-image"; + +.simple { @include border-image("100x150.jpeg"); } \ No newline at end of file