Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 79067ae

Browse files
committed
Style the up direction of the dropdown.
1 parent 02bebc0 commit 79067ae

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

src/common.css

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,28 @@ body > .select2-container.open {
4040
z-index: 9999; /* The z-index Select2 applies to the select2-drop */
4141
}
4242

43+
/* Handle up direction Select2 */
44+
.ui-select-container[theme="select2"].direction-up .ui-select-match {
45+
border-radius: 4px; /* FIXME hardcoded value :-/ */
46+
border-top-left-radius: 0;
47+
border-top-right-radius: 0;
48+
}
49+
.ui-select-container[theme="select2"].direction-up .ui-select-dropdown {
50+
border-radius: 4px; /* FIXME hardcoded value :-/ */
51+
border-bottom-left-radius: 0;
52+
border-bottom-right-radius: 0;
53+
54+
border-top-width: 1px; /* FIXME hardcoded value :-/ */
55+
border-top-style: solid;
56+
57+
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
58+
59+
margin-top: -4px; /* FIXME hardcoded value :-/ */
60+
}
61+
.ui-select-container[theme="select2"].direction-up .ui-select-dropdown .select2-search {
62+
margin-top: 4px; /* FIXME hardcoded value :-/ */
63+
}
64+
4365
/* Selectize theme */
4466

4567
/* Helper class to show styles when focus */
@@ -62,6 +84,12 @@ body > .select2-container.open {
6284
border-color: #D44950;
6385
}
6486

87+
/* Handle up direction Selectize */
88+
.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown {
89+
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
90+
91+
margin-top: -2px; /* FIXME hardcoded value :-/ */
92+
}
6593

6694
/* Bootstrap theme */
6795

@@ -99,6 +127,11 @@ body > .select2-container.open {
99127
border-top-right-radius: 0;
100128
border-bottom-right-radius: 0;
101129
}
130+
.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up {
131+
border-radius: 4px !important; /* FIXME hardcoded value :-/ */
132+
border-top-right-radius: 0 !important;
133+
border-bottom-right-radius: 0 !important;
134+
}
102135

103136
.ui-select-bootstrap > .ui-select-match > .btn{
104137
/* Instead of center because of .btn */
@@ -210,4 +243,9 @@ body > .ui-select-bootstrap.open {
210243
/* Mark invalid Bootstrap */
211244
.ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match {
212245
border-color: #D44950;
213-
}
246+
}
247+
248+
/* Handle up direction Bootstrap */
249+
.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown {
250+
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
251+
}

0 commit comments

Comments
 (0)