forked from drublic/Sass-Mixins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_placeholder.scss
42 lines (42 loc) · 991 Bytes
/
_placeholder.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
///
/// Generates `placeholder` content for a given element.
///
/// @author romamatusevich
///
/// @link http://caniuse.com/#feat=css-placeholder caniuse
/// @link http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-placeholder-attribute spec
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-placeholder MDN
/// @link http://css-tricks.com/snippets/css/style-placeholder-text css-tricks
///
/// @output
/// ```css
/// &::-webkit-input-placeholder {
/// <content>
/// }
/// &::-moz-placeholder {
/// <content>
/// }
/// &:-ms-input-placeholder {
/// <content>
/// }
/// ```
///
/// @example
/// .selector {
/// @include x-placeholder {
/// color: #bada55;
/// font-weight: bold;
/// }
/// }
///
@mixin x-placeholder {
&::-webkit-input-placeholder {
@content // Chrome, Safari, Opera
}
&::-moz-placeholder {
@content // Firefox 19+
}
&:-ms-input-placeholder {
@content // IE 10+
}
}