Skip to content

Commit 9d9c099

Browse files
committed
added material ui theme
1 parent 7356f3e commit 9d9c099

File tree

5 files changed

+132
-17
lines changed

5 files changed

+132
-17
lines changed

themes/base.styl

+7
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@
6868
.react-selectize.dropdown-menu
6969
overflow auto
7070
position absolute
71+
max-height 200px
7172
z-index 10
7273

74+
&.tethered
75+
min-width 300px
76+
77+
&:not(.tethered)
78+
width 100%
79+
7380
.groups.as-columns
7481
display flex
7582
> div

themes/bootstrap3.styl

+1-9
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@
7070
border-radius 4px
7171
box-shadow 0 6px 12px rgba(0, 0, 0, 0.175)
7272
font-family Helvetica Neue, Helvetica, Arial, sans-serif
73-
max-height 200px
74-
75-
&.tethered
76-
min-width 300px
77-
78-
&:not(.tethered)
79-
width 100%
8073

8174
&.flipped
8275
margin-bottom 5px
@@ -96,8 +89,7 @@
9689
padding 8px 8px
9790

9891
.option-wrapper
99-
cursor pointer
100-
outline none
92+
10193
&.highlight
10294
background #428bca
10395

themes/default.styl

+1-7
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@
9595
box-sizing border-box
9696
border 1px solid #ccc
9797
font-family Helvetica Neue, Helvetica, Arial, sans-serif
98-
max-height 200px
99-
100-
&.tethered
101-
min-width 300px
102-
103-
&:not(.tethered)
104-
width 100%
10598

10699
&.flipped
107100
border-top-left-radius 4px
@@ -124,6 +117,7 @@
124117
padding 8px 8px
125118

126119
.option-wrapper
120+
127121
&.highlight
128122
background #f2f9fc
129123
color #333

themes/index.styl

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@require 'default'
2-
@require 'bootstrap3'
2+
@require 'bootstrap3'
3+
@require 'material'

themes/material.styl

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
.react-selectize.material
2+
color black
3+
font-family Roboto, sans-serif
4+
5+
&.open .react-selectize-control:after
6+
transform scaleX(1)
7+
8+
.react-selectize-control
9+
border-bottom 1px solid rgba(0, 0, 0, 0.3)
10+
11+
&:after
12+
background-color rgb(0, 188, 212)
13+
content ""
14+
transform scaleX(0)
15+
transition transform 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms
16+
position absolute
17+
left 0px
18+
bottom -1px
19+
width 100%
20+
height 2px
21+
22+
> div
23+
min-height 30px
24+
25+
.react-selectize-placeholder
26+
color rgba(0, 0, 0, 0.3)
27+
text-indent 4px
28+
29+
.react-selectize.dropdown-menu-container.material
30+
font-family Roboto, sans-serif
31+
width 300px
32+
33+
&.flipped
34+
margin-bottom 8px
35+
36+
.dropdown-menu
37+
transform-origin 100% 100%
38+
39+
&:not(.flipped)
40+
margin-top 8px
41+
42+
.dropdown-menu
43+
transform-origin 0% 0%
44+
45+
.dropdown-menu
46+
47+
&.custom-enter-active, &.custom-leave-active
48+
transition transform 250ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, opacity 250ms cubic-bezier(0.23, 1, 0.32, 1) 0ms
49+
50+
&.custom-enter
51+
opacity 0
52+
transform scale(0, 0)
53+
54+
&.custom-enter-active
55+
opacity 1
56+
transform scale(1, 1)
57+
58+
&.custom-leave
59+
opacity 1
60+
transform scale(1, 1)
61+
62+
&.custom-leave-active
63+
opacity 0
64+
65+
.react-selectize.dropdown-menu.material
66+
background-color white
67+
border-radius 2px
68+
box-shadow rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.117647) 0px 1px 4px
69+
font-family Roboto, sans-serif
70+
padding 8px 0px
71+
72+
&.flipped
73+
margin-bottom 8px
74+
75+
&:not(.flipped)
76+
margin-top 8px
77+
78+
.no-results-found
79+
font-style oblique
80+
font-size 16px
81+
height 32px
82+
padding 0px 16px
83+
display flex
84+
align-items center
85+
86+
.option-wrapper
87+
88+
&.highlight
89+
background-color rgba(0,0,0,0.098)
90+
91+
.simple-option
92+
color rgba(0, 0, 0, 0.875)
93+
cursor pointer
94+
display flex
95+
align-items center
96+
font-size 16px
97+
height 48px
98+
padding 0px 16px
99+
100+
&.not-selectable
101+
background-color #f8f8f8
102+
color #999
103+
cursor default
104+
font-style oblique
105+
text-shadow 0px 1px 0px white
106+
107+
// MULTI SELECT
108+
.react-selectize.multi-select.material
109+
110+
.simple-value
111+
padding 0px 4px
112+
113+
&:after
114+
content ","
115+
116+
// SIMPLE SELECT
117+
.react-selectize.simple-select.material
118+
119+
.simple-value
120+
margin 4px 3px 3px 2px
121+

0 commit comments

Comments
 (0)