added css3 background-origin mixin
This commit is contained in:
parent
dd829cd48c
commit
e890332344
@ -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
|
Loading…
Reference in New Issue
Block a user