Debian Codegraph @

debian/missing-sources/wyrm/sass/wyrm_core/_mixin.sass

raw
1 $support-for-original-webkit-gradients: false
2 $legacy-support-for-ie: false
3 $hide-text-direction: right
4 $default-border-radius: 4px
5
6 =retina
7 @media only screen and (#{-webkit-min-device-pixel-ratio}: #{1.5}), only screen and (#{min-device-pixel-ratio}: #{1.5})
8 @content
9
10 =webkit
11 @media screen and (-webkit-min-device-pixel-ratio: 0)
12 @content
13
14
15 // TRICKY GRADIENTS
16 =gradient-vertical($start-color: #555, $end-color: #333)
17 @if alpha($start-color) == 1 and alpha($end-color) == 1
18 background-color: $end-color
19 +background-image(linear-gradient($start-color, rgba($end-color,0)))
20 @else
21 +background-image(linear-gradient($start-color, $end-color))
22 background-repeat: repeat-x
23 filter: progid:DXImageTransform.Microsoft.gradient(start-colorstr='#{ie-hex-str($start-color)}', end-colorstr='#{ie-hex-str($end-color)}', GradientType=0)
24 =gradient-horizontal($start-color: #555, $end-color: #333)
25 @if alpha($start-color) == 1 and alpha($end-color) == 1
26 background-color: $end-color
27 +background-image(linear-gradient(left,$start-color, rgba($end-color,0)))
28 @else
29 +background-image(linear-gradient(left,$start-color, $end-color))
30 background-repeat: repeat-x
31 filter: progid:DXImageTransform.Microsoft.gradient(start-colorstr='#{ie-hex-str($start-color)}', end-colorstr='#{ie-hex-str($end-color)}', GradientType=1)
32
33 =gradient-striped($color, $stripe-color: rgba(white,.15), $angle: -45deg)
34 background-color: $color
35 background-image: -webkit-linear-gradient($angle, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent)
36 background-image: -moz-linear-gradient($angle, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent)
37 background-image: -ms-linear-gradient($angle, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent)
38 background-image: -o-linear-gradient($angle, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent)
39 background-image: linear-gradient($angle, $stripe-color 25%, $stripe-color 25%, $stripe-color 50%, $stripe-color 50%, $stripe-color 75%, rgba(white,0) 75%, rgba(white,0))
40
41 =text-shadow-invert($color: $text-invert, $alpha: 0.5, $x: 0, $y: 1px, $blur: 0)
42 @if $color == white
43 text-shadow: rgba(white,$alpha) $x $y $blur
44 @else if $color == black
45 text-shadow: rgba(black,$alpha) $x $y $blur
46 @else
47 text-shadow: $color $x $y $blur
48
49 =none-select
50 +experimental(user-select, none, -moz, -webkit, not -o, -ms, not -khtml, official)
51
52 // -----------------
53 // Mixins used as Extends. Since its just easier to type +mixin instead of @extend class
54 // -----------------
55
56 // Thin out white fonts on dark backgrounds in webkit
57
58 %font-smooth
59 -webkit-font-smoothing: antialiased
60
61 =font-smooth
62 @extend %font-smooth
63
64 // Popover arrows
65 // -------------------------
66 // For tipsies and popovers
67 =arrow-top($arrow-width: 5px, $arrow-color: $black)
68 bottom: 0
69 left: 50%
70 margin-left: -$arrow-width
71 border-left: $arrow-width solid transparent
72 border-right: $arrow-width solid transparent
73 border-top: $arrow-width solid $arrow-color
74
75 =arrow-left($arrow-width: 5px, $arrow-color: $black)
76 top: 50%
77 right: 0
78 margin-top: -$arrow-width
79 border-top: $arrow-width solid transparent
80 border-bottom: $arrow-width solid transparent
81 border-left: $arrow-width solid $arrow-color
82
83 =arrow-bot($arrow-width: 5px, $arrow-color: $black)
84 top: 0
85 left: 50%
86 margin-left: -$arrow-width
87 border-left: $arrow-width solid transparent
88 border-right: $arrow-width solid transparent
89 border-bottom: $arrow-width solid $arrow-color
90
91 =arrow-right($arrow-width: 5px, $arrow-color: $black)
92 top: 50%
93 left: 0
94 margin-top: -$arrow-width
95 border-top: $arrow-width solid transparent
96 border-bottom: $arrow-width solid transparent
97 border-right: $arrow-width solid $arrow-color
98
99
100 // OVERWRITES TO OUTSIDE LIBRARIES
101
102 // Clearfix
103 =clearfix
104 *zoom: 1
105 &:before,
106 &:after
107 display: table
108 content: ""
109 &:after
110 clear: both
111
112 .clearfix
113 +clearfix
114
115 // Since the typical default browser font-size is 16px, that makes the calculation for grid size.
116 // If you want your base font-size to be a different size and not have it effect grid size too,
117 // set the value of $em-base to $base-font-size ($em-base: $base-font-size;)
118 $em-base: 16px !default
119
120 // Working in ems is annoying. Think in pixels by using this handy function, emCalc(#px)
121 @function em($pxWidth)
122 @return $pxWidth / $em-base * 1em
123
124 =truncate($width)
125 text-overflow: ellipsis
126 overflow: hidden
127 white-space: nowrap
128 display: block
129 width: $width