Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / bootstrap / mixin.scss
1 /* shortcuts */
2 // clearing floats like a boss h5bp.com/q
3 @mixin clearfix {
4 &::before,
5 &::after {
6 display: table;
7 content: "";
8 }
9
10 &::after {
11 clear: both;
12 }
13 }
14
15 .clearfix {
16 @include clearfix;
17 }
18
19 @mixin userSelectNone {
20 -webkit-touch-callout: none;
21 -webkit-user-select: none;
22 -khtml-user-select: none;
23 -moz-user-select: none;
24 -ms-user-select: none;
25 user-select: none;
26 }
27
28 @mixin square($size) {
29 height: $size;
30 width: $size;
31 }
32
33 // sets default text shadows depending on background color
34 @mixin textShadow($backgroundColor) {
35 @if (lightness($backgroundColor) >= 40) {
36 text-shadow: 0 1px 0 $wcfTextShadowDark;
37 } @else {
38 text-shadow: 0 -1px 0 $wcfTextShadowLight;
39 }
40 }
41
42 /** @deprecated 3.0 - please use the native properties directly */
43 @mixin linearGradient($backgroundColor, $gradientColor1, $gradientColor2) {
44 background-image: linear-gradient($gradientColor1, $gradientColor2);
45 }
46 @mixin linearGradient($backgroundColor, $gradientColor1, $gradientColor2, $gradientColor3, $direction: 180deg) {
47 background-image: linear-gradient($direction, $gradientColor1, $gradientColor2, $gradientColor3);
48 }
49 @mixin linearGradientNative($parameters) {
50 background-image: linear-gradient($parameters);
51 }
52 @mixin transition($property, $duration, $type: linear) {
53 transition: $property $duration $type;
54 }
55 @mixin boxShadow($leftOffset, $topOffset, $color, $blurriness: 5px, $shadowHeight: 0) {
56 box-shadow: $leftOffset $topOffset $blurriness $shadowHeight $color;
57 }
58 @mixin boxShadowInset($leftOffset, $topOffset, $color, $blurriness: 5px, $shadowHeight: 0) {
59 box-shadow: inset $leftOffset $topOffset $blurriness $shadowHeight $color;
60 }
61 @mixin boxShadowNative($parameters) {
62 box-shadow: $parameters;
63 }
64 /** /deprecated */