forked from johannesjo/angular-material-sass-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_mixins.scss
56 lines (50 loc) · 1.22 KB
/
_mixins.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@mixin margin-selectors($before:1em, $after:1em, $start:0px, $end:0px) {
-webkit-margin-before: $before;
-webkit-margin-after: $after;
-webkit-margin-start: $start;
-webkit-margin-end: $end;
}
@mixin not-selectable($value:none) {
-webkit-touch-callout: $value;
-webkit-user-select: $value;
-khtml-user-select: $value;
-moz-user-select: $value;
-ms-user-select: $value;
user-select: $value;
}
@mixin input-placeholder-color($color) {
&::-webkit-input-placeholder,
&::-moz-placeholder, /* Firefox 19+ */
&:-moz-placeholder, /* Firefox 18- */
&:-ms-input-placeholder {
color: $color;
}
}
@mixin pie-clearfix {
&:after {
content: '';
display: table;
clear: both;
}
}
@function map-to-string($map) {
$map-str: '{';
$keys: map-keys($map);
$len: length($keys);
@for $i from 1 through $len {
$key: nth($keys, $i);
$value: map-get($map, $key);
$map-str: $map-str + '_' + $key + '_: _' + map-get($map, $key) + '_';
@if $i != $len {
$map-str: $map-str + ',';
}
}
@return $map-str + '}';
}
/* mixin definition ; sets LTR and RTL within the same style call */
@mixin rtl($prop, $value, $rtl-value) {
#{$prop}: $value;
html[dir=rtl] & {
#{$prop}: $rtl-value;
}
}