|
| 1 | +.circular(@dim: 150px) { |
| 2 | + width: @dim; |
| 3 | + height: @dim; |
| 4 | + border-radius: (@dim / 2); |
| 5 | + -webkit-border-radius: (@dim / 2); |
| 6 | + -moz-border-radius: (@dim / 2); |
| 7 | +/* background: url(http://link-to-your/image.jpg) no-repeat;*/ |
| 8 | + box-shadow: 0 0 8px rgba(0, 0, 0, .8); |
| 9 | + -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .8); |
| 10 | + -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8); |
| 11 | +} |
| 12 | + |
| 13 | +@border-radius-base-px: 10px; |
| 14 | +@border-radius-base-em: 0.625em; /* 16*0.625=10 */ |
| 15 | + |
| 16 | +.rounded-base(@scale, @border-radius-base: @border-radius-base-em) { |
| 17 | + -webkit-border-radius: (@border-radius-base * @scale); /* Safari prototype */ |
| 18 | + -moz-border-radius: (@border-radius-base * @scale); /* Gecko browsers */ |
| 19 | + border-radius: (@border-radius-base * @scale); /* Everything else - limited support at the moment */ |
| 20 | +} |
| 21 | + |
| 22 | +.rounded-left-base(@scale, @border-radius-base: @border-radius-base-em) { |
| 23 | + /* Safari prototype */ |
| 24 | + -webkit-border-top-left-radius: (@border-radius-base * @scale); |
| 25 | + -webkit-border-bottom-left-radius: (@border-radius-base * @scale); |
| 26 | + /* Gecko browsers */ |
| 27 | + -moz-border-top-left-radius: (@border-radius-base * @scale); |
| 28 | + -moz-border-bottom-left-radius: (@border-radius-base * @scale); |
| 29 | + /* Everything else - limited support at the moment */ |
| 30 | + border-top-left-radius: (@border-radius-base * @scale); |
| 31 | + border-bottom-left-radius: (@border-radius-base * @scale); |
| 32 | +} |
| 33 | + |
| 34 | +.rounded-right-base(@scale, @border-radius-base: @border-radius-base-em) { |
| 35 | + /* Safari prototype */ |
| 36 | + -webkit-border-top-right-radius: (@border-radius-base * @scale); |
| 37 | + -webkit-border-bottom-right-radius: (@border-radius-base * @scale); |
| 38 | + /* Gecko browsers */ |
| 39 | + -moz-border-top-right-radius: (@border-radius-base * @scale); |
| 40 | + -moz-border-bottom-right-radius: (@border-radius-base * @scale); |
| 41 | + /* Everything else - limited support at the moment */ |
| 42 | + border-top-right-radius: (@border-radius-base * @scale); |
| 43 | + border-bottom-right-radius: (@border-radius-base * @scale); |
| 44 | +} |
| 45 | + |
| 46 | +.rounded-bottom-base(@scale, @border-radius-base: @border-radius-base-em) { |
| 47 | + /* Safari prototype */ |
| 48 | + -webkit-border-bottom-left-radius: (@border-radius-base * @scale); |
| 49 | + -webkit-border-bottom-right-radius: (@border-radius-base * @scale); |
| 50 | + /* Gecko browsers */ |
| 51 | + -moz-border-bottom-left-radius: (@border-radius-base * @scale); |
| 52 | + -moz-border-bottom-right-radius: (@border-radius-base * @scale); |
| 53 | + /* Everything else - limited support at the moment */ |
| 54 | + border-bottom-left-radius: (@border-radius-base * @scale); |
| 55 | + border-bottom-right-radius: (@border-radius-base * @scale); |
| 56 | +} |
| 57 | + |
| 58 | +.hover-fade(@opacity: 0.8, @duration: 0.2s) { |
| 59 | + transition: @duration; |
| 60 | + &:hover { |
| 61 | + opacity: @opacity; |
| 62 | + } |
| 63 | +} |
| 64 | + |
| 65 | +/* http://gradientcss.com/linear-gradient */ |
| 66 | + |
| 67 | +.angular-linear-gradient(@angle, |
| 68 | + @start-color, |
| 69 | + @start-color-stop: 50%, |
| 70 | + @end-color, |
| 71 | + @end-color-stop: 50%) { |
| 72 | + background: -moz-linear-gradient(@angle, @start-color @start-color-stop, @end-color @end-color-stop); |
| 73 | + background: -ms-linear-gradient(@angle, @start-color @start-color-stop, @end-color @end-color-stop); |
| 74 | + background: -o-linear-gradient(@angle, @start-color @start-color-stop, @end-color @end-color-stop); |
| 75 | + background: -webkit-linear-gradient(@angle, @start-color @start-color-stop, @end-color @end-color-stop); |
| 76 | + background: linear-gradient(@angle, @start-color @start-color-stop, @end-color @end-color-stop); |
| 77 | +} |
| 78 | + |
| 79 | +.linear-gradient(@start-color, @end-color) { |
| 80 | + background: -moz-linear-gradient(@start-color, @end-color); |
| 81 | + background: -ms-linear-gradient(@start-color, @end-color); |
| 82 | + background: -o-linear-gradient(@start-color, @end-color); |
| 83 | + background: -webkit-linear-gradient(@start-color, @end-color); |
| 84 | + background: linear-gradient(@start-color, @end-color); |
| 85 | +} |
0 commit comments