This repository was archived by the owner on Jul 21, 2023. It is now read-only.
forked from rlamana/prefix.less
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprefix.less
116 lines (85 loc) · 2.15 KB
/
prefix.less
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Prefix.less
// Copyright (c) 2012 Ramón Lamana
//
// MIT Licensed:
// http://www.opensource.org/licenses/mit-license.php
// Flexible Box Layout
@import "flex.prefix.less";
// User Select
.user-select(@value) when (@value = none) {
-webkit-touch-callout: none;
}
.user-select(@value) {
user-select: @value;
-webkit-user-select: @value;
-moz-user-select: @value;
-ms-user-select: @value;
-o-user-select: @value;
}
// Animation
.animation(@value) {
-webkit-animation: @value;
-moz-animation: @value;
animation: @value;
}
// Transition
.transition(@val1, @val2:X, ...) {
@args: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
-webkit-transition: @args;
-moz-transition: @args;
-ms-transition: @args;
-o-transition: @args;
transition: @args;
}
.transition-property(...) {
@args: ~`'@{arguments}'.replace(/\[|\]/g, '')`;
-webkit-transition-property: @args;
-moz-transition-property: @args;
-ms-transition-property: @args;
-o-transition-property: @args;
transition-property: @args;
}
// Transforms
.transform(@val1, @val2:X, ...) {
@args: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
-webkit-transform: @args;
-moz-transform: @args;
-ms-transform: @args;
-o-transform: @args;
transform: @args;
}
// Box Shadows
.box-shadow(@value) {
-webkit-box-shadow: @value;
-moz-box-shadow: @value;
-ms-box-shadow: @value;
-o-box-shadow: @value;
box-shadow: @value;
}
// Border Radius
.border-radius(@args) {
-webkit-border-radius: @args;
-moz-border-radius: @args;
-ms-border-radius: @args;
-o-border-radius: @args;
border-radius: @args;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
// Gradients
.linear-gradient(@value) {
-webkit-linear-gradient: @value;
-moz-linear-gradient: @value;
-ms-linear-gradient: @value;
-o-linear-gradient: @value;
linear-gradient: @value;
}
// Box sizing
.box-sizing(@value) {
-webkit-box-sizing: @value;
-moz-box-sizing: @value;
-ms-box-sizing: @value;
-o-box-sizing: @value;
box-sizing: @value;
}