From e890332344f0df27493c06bb02d1e0d8a4910b0f Mon Sep 17 00:00:00 2001 From: Eric Meyer Date: Mon, 23 Nov 2009 11:45:31 -0700 Subject: [PATCH] added css3 background-origin mixin --- .../compass/css3/_background_origin.sass | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass diff --git a/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass b/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass new file mode 100644 index 00000000..17684f65 --- /dev/null +++ b/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass @@ -0,0 +1,18 @@ +// Background Origin +// position the background off the edge of the padding, border or content +// - [padding-box | border-box | content-box] +// - browser defaults to padding-box, mixin defaults to content-box + +// override constants to change defaults +!default_background_origin ||= "content-box" + +=background-origin(!origin = !default_background_origin) + // webkit and mozilla use the deprecated short [border | padding | content] + !deprecated= "padding" + @if !origin == "border-box" + !deprecated= "border" + @if !origin == "content-box" + !deprecated= "content" + background-origin= !origin + -webkit-background-origin= !deprecated + -moz-background-origin= !deprecated