added css3 background-origin mixin

This commit is contained in:
Eric Meyer 2009-11-23 11:45:31 -07:00
parent dd829cd48c
commit e890332344

View File

@ -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