Advertisement
kalovski

Untitled

Nov 13th, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. @mixin angle-edge($pos-top:null, $angle-top:null, $pos-btm:null, $angle-btm:null){
  2. width: 100%;
  3. position: relative;
  4. background: linear-gradient(to right, rgba(241,231,103,1) 0%, rgba(254,182,69,1) 100%);
  5. &::before,
  6. &::after{
  7. content: '';
  8. width: 100%;
  9. height: 100%;
  10. position: absolute;
  11. background: inherit;
  12. z-index: -1;
  13. transition: ease all .5s;
  14. }
  15.  
  16. @if $pos-top{
  17. &::before{
  18. @if $pos-top == 'topleft'{
  19. top: 0;
  20. transform-origin: right top;
  21. transform: skewY($angle-top);
  22. }
  23. @if $pos-top == 'topright' {
  24. top: 0;
  25. transform-origin: left top;
  26. transform: skewY(-$angle-top);
  27. }
  28. }
  29. }
  30.  
  31. @if $pos-btm{
  32. &::after{
  33. @if $pos-btm == 'bottomleft' {
  34. bottom: 0;
  35. transform-origin: right bottom;
  36. transform: skewY(-$angle-btm);
  37.  
  38. }
  39.  
  40. @if $pos-btm == 'bottomright' {
  41. bottom: 0;
  42. transform-origin: left bottom;
  43. transform: skewY($angle-btm);
  44. }
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement