@@ -115,18 +115,19 @@ hover-color(color, forceUseColor = false)
115115
116116// Mixin: Hover Glow
117117//
118- // Creates a glow when hovering an element. Takes a color and a radius (size). Recommended to be used with transition.
118+ // Creates a glow when hovering an element. Takes a color and a radius (size).
119+ // Recommended to be used with transition.
119120//
120121// ex: hover-glow()
121122
122123hover-glow ($color = rgba (blue, .8 ), $radius = 20px )
123124 & :hover
124125 box-shadow : 0px 0px $radius 2px $color
125126
126-
127127// Mixin: Hover Float
128128//
129- // Gives an element the effect of rising up vertically with a small shadow underneath. Recommended to be use with transition.
129+ // Gives an element the effect of rising up vertically with a small shadow
130+ // underneath. Recommended to be use with transition.
130131//
131132// Ex: hover-float()
132133
@@ -150,3 +151,47 @@ hover-float()
150151 & :before
151152 opacity : 1
152153 transform : scale (1 )
154+
155+ // Mixin: Click down
156+ //
157+ // Move an element down while clicked/tapped. Takes distance.
158+ //
159+ // ex: click-down()
160+
161+ click-down ($distance = 1px )
162+ & :active
163+ transform : translateY ($distance )
164+
165+ // Mixin: Click shadow
166+ //
167+ // Creates a shadow under element while clicked/tapped. Takes distance and
168+ // radius (size). Recommended to be use with transition.
169+ //
170+ // ex: click-shadow()
171+
172+ click-shadow ($distance = 2px , $radius = 10px )
173+ & :active
174+ box-shadow : 0px $distance $radius 2px rgba (0 , 0 , 0 , 0.25 )
175+
176+ // Mixin: Click inset
177+ //
178+ // Creates an inset shadow on an elment while clicked/tapped. Takes radius
179+ // (inset shadow size). Recommended to be use with transition.
180+ //
181+ // ex: click-inset()
182+
183+ click-inset ($radius = 20px )
184+ $distance = $radius / 2
185+ & :active
186+ box-shadow : inset 0px $distance $radius rgba (0 , 0 , 0 , 0.35 );
187+
188+ // Mixin: Click-shrink
189+ //
190+ // Scale down an element when clicked/tapped. Gives the effect of "sinking"
191+ // or lowering on the z-axis.
192+ //
193+ // ex: click-shrink()
194+
195+ click-shrink ($distance = .92 )
196+ & :active
197+ transform : scale ($distance )
0 commit comments