Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 // This file is part of help.eyeo.com. | 1 // This file is part of help.eyeo.com. |
2 // Copyright (C) 2017 Eyeo GmbH | 2 // Copyright (C) 2017 Eyeo GmbH |
3 // | 3 // |
4 // help.eyeo.com is free software: you can redistribute it and/or modify | 4 // help.eyeo.com is free software: you can redistribute it and/or modify |
5 // it under the terms of the GNU General Public License as published by | 5 // it under the terms of the GNU General Public License as published by |
6 // the Free Software Foundation, either version 3 of the License, or | 6 // the Free Software Foundation, either version 3 of the License, or |
7 // (at your option) any later version. | 7 // (at your option) any later version. |
8 // | 8 // |
9 // help.eyeo.com is distributed in the hope that it will be useful, | 9 // help.eyeo.com is distributed in the hope that it will be useful, |
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 // GNU General Public License for more details. | 12 // GNU General Public License for more details. |
13 // | 13 // |
14 // You should have received a copy of the GNU General Public License | 14 // You should have received a copy of the GNU General Public License |
15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>. | 15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
17 // Custom Select Field | 17 // Custom Select Field |
18 | 18 |
19 .custom-select | 19 .custom-select |
20 { | 20 { |
21 position: relative; | 21 position: relative; |
22 } | 22 } |
23 | 23 |
24 .custom-select-selected | 24 .custom-select-selected |
juliandoucette
2017/08/22 14:33:42
NIT: It seem strange to have a class that ends in
ire
2017/09/04 20:28:07
The "selected" refers to the fact that it is the c
juliandoucette
2017/09/06 17:48:19
Acknowledged. *embarrassed face* :D
ire
2017/09/08 09:53:32
:P
| |
25 { | 25 { |
26 display: inline-block; | 26 display: none; |
27 padding: 3px 10px; | 27 padding: 0.2em 0.7em; |
juliandoucette
2017/08/22 14:33:42
NIT: Padding should probably be in em
ire
2017/09/04 20:28:07
Done.
| |
28 border: 1px solid $gray-medium; | 28 border: 2px solid $gray-medium; |
juliandoucette
2017/08/22 14:33:42
NIT: Suggest: 2px border. I don't think this passe
ire
2017/09/04 20:28:07
Done.
| |
29 border-radius: 4px; | 29 border-radius: 4px; |
30 color: $white; | 30 color: $white; |
31 background: transparent; | 31 background: transparent; |
32 font-family: $primary-font; | 32 font-family: inherit; |
juliandoucette
2017/08/22 14:33:42
NIT: why bind this control to one font and size? (
ire
2017/09/04 20:28:06
Done.
| |
33 font-size: $medium-font; | 33 font-size: inherit; |
34 cursor: pointer; | 34 cursor: pointer; |
35 } | |
36 | |
37 .js .custom-select-selected | |
38 { | |
39 display: inline-block; | |
35 } | 40 } |
36 | 41 |
37 .custom-select-options | 42 .custom-select-options |
38 { | 43 { |
39 position: absolute; | 44 position: absolute; |
40 bottom: 120%; | 45 bottom: 100%; |
juliandoucette
2017/08/22 14:33:42
NIT: Could we use 100% + margin in em effectively
ire
2017/09/04 20:28:07
Great idea! Done.
| |
41 left: 0; | 46 left: 0px; |
42 padding: 10px; | 47 margin-bottom: 0.5em; |
juliandoucette
2017/08/22 14:33:42
NIT: I think em makes more sense here?
ire
2017/09/04 20:28:06
Done.
| |
48 padding: 0.7em; | |
43 border: 1px solid $gray-medium; | 49 border: 1px solid $gray-medium; |
44 border-radius: 4px; | 50 border-radius: 4px; |
45 box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3); | 51 box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.3); |
46 color: $black; | 52 color: $black; |
47 background: $white; | 53 background: $white; |
48 list-style: none; | 54 list-style: none; |
49 | 55 |
50 a | 56 a |
51 { | 57 { |
52 color: $black; | 58 color: $black; |
53 } | 59 } |
54 } | 60 } |
55 | 61 |
56 .custom-select-options[aria-hidden="true"] | 62 .custom-select-options[aria-hidden="true"] |
57 { | 63 { |
58 display: none; | 64 display: none; |
59 } | 65 } |
60 | 66 |
61 [dir="rtl"] | 67 [dir="rtl"] .custom-select-options |
62 { | 68 { |
63 .custom-select-options | 69 right: 0px; |
64 { | 70 left: auto; |
65 right: 0; | 71 padding: 0.7em; |
66 left: auto; | |
67 padding: 10px; | |
68 } | |
69 } | 72 } |
70 | 73 |
71 .no-js | 74 .no-js .custom-select-options |
juliandoucette
2017/08/22 14:33:42
NIT: I suggest adding no-js styles below items lik
ire
2017/09/04 20:28:07
In general I agree. In this case, there is actuall
juliandoucette
2017/09/06 17:48:20
There is for .custom-select-selected and .custom-s
ire
2017/09/08 09:53:32
I meant in this particular block. But I've changed
| |
72 { | 75 { |
73 .custom-select-selected | 76 position: relative; |
74 { | 77 display: inline-block; |
75 display: none; | 78 top: 0px; |
76 } | 79 padding: 0px; |
80 border: 0px; | |
81 color: inherit; | |
82 opacity: 1; | |
83 background: none; | |
77 | 84 |
78 .custom-select-options | 85 li |
79 { | |
80 display: inline-block; | |
81 top: 0; | |
82 padding: 0; | |
83 border: 0; | |
84 color: inherit; | |
85 opacity: 1; | |
86 background: none; | |
87 } | |
88 | |
89 .custom-select-options li | |
90 { | 86 { |
91 display: inline; | 87 display: inline; |
92 } | 88 } |
93 | 89 |
94 .custom-select-options li:not(:last-child):after | 90 li:after |
95 { | 91 { |
96 content: ","; | 92 content: ","; |
93 } | |
94 | |
95 li:last-child:after | |
96 { | |
97 content: none; | |
97 } | 98 } |
98 | 99 |
99 a | 100 a |
100 { | 101 { |
101 color: inherit; | 102 color: inherit; |
102 } | 103 } |
103 } | 104 } |
LEFT | RIGHT |