-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy path_m-select-custom.scss
More file actions
72 lines (63 loc) · 1.63 KB
/
_m-select-custom.scss
File metadata and controls
72 lines (63 loc) · 1.63 KB
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
@use "../01-abstract/variables" as *;
@use "f-get-svg-url" as *;
@use "m-rtl" as *;
@use "sass:color";
/**
* Select custom
*
* @author Nicolas Langle
*
* Examples :
*
* select {
* @include select-custom;
* }
*
*/
@mixin select-custom {
display: block;
width: 100%;
max-width: 100%; /* useful when width is set to anything other than 100% */
padding: 15px 25px;
margin: 0;
font-size: 16px; // prevent iOS zoom
line-height: 1.15;
color: $color-text;
background-color: $color-light;
background-image: get-svg-url("down"), linear-gradient(to bottom, $color-light 0%, $color-light 100%);
background-repeat: no-repeat, repeat;
background-position: right 10px top 50%, 0 0;
background-size: 10px auto, 100%;
border: 1px solid $color-grey-500;
border-radius: 10px;
appearance: none;
@include rtl {
background-position: left 10px top 50%, 0 0;
}
// Set options to normal weight
option {
font-weight: 400;
}
// Hide arrow icon in IE browsers
&::-ms-expand {
display: none;
}
// Hover style
&:hover {
border-color: color.adjust($color-grey-500, $lightness: -10%);
}
// Focus style
&:focus {
color: color.adjust($color-text, $lightness: -10%);
border-color: color.adjust($color-grey-500, $lightness: -20%);
outline: none;
box-shadow: 0 0 1px 3px rgba(59, 153, 252, .7);
box-shadow: 0 0 0 3px -moz-mac-focusring;
option {
outline: none;
}
}
@include rtl {
background-position: left 10px top 50%, 0 0;
}
}