Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] add mobile styles #233

Merged
merged 2 commits into from
Mar 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 51 additions & 11 deletions lib/mapbox-gl-geocoder.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
}

.mapboxgl-ctrl-geocoder {
font: 15px/20px "Open Sans", "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 18px;
line-height: 24px;
font-family: "Open Sans", "Helvetica Neue", Arial, Helvetica, sans-serif;
position: relative;
background-color: #fff;
width: 33.3333%;
width: 100%;
min-width: 240px;
max-width: 360px;
z-index: 1;
border-radius: 4px;
transition: width .25s, min-width .25s;
Expand All @@ -24,7 +25,7 @@
border: 0;
background-color: transparent;
margin: 0;
height: 36px;
height: 50px;
color: #404040; /* fallback */
color: rgba(0, 0, 0, 0.75);
padding: 6px 30px;
Expand Down Expand Up @@ -79,7 +80,7 @@
top: calc(100% + 6px);
z-index: 1000;
overflow: hidden;
font-size: 13px;
font-size: 15px;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-geocoder ul,
Expand Down Expand Up @@ -120,11 +121,12 @@
vertical-align: middle;
speak: none;
fill: #757575;
top: 15px;
}

.geocoder-icon-search {
position: absolute;
top: 8px;
top: 15px;
left: 5px;
width: 20px;
height: 20px;
Expand All @@ -135,12 +137,14 @@
margin: 0;
border: none;
cursor: pointer;
background: #fff;
}

.geocoder-icon-close {
width: 16px;
height: 16px;
margin-top: 3px;
width: 20px;
height: 20px;
margin-top: 8px;
margin-right: 3px;
}

.mapboxgl-ctrl-geocoder button:hover .geocoder-icon-close {
Expand All @@ -150,8 +154,8 @@
.geocoder-icon-loading {
width: 26px;
height: 26px;
margin-top: -2px;
margin-right: -5px;
margin-top: 5px;
margin-right: 0px;
-moz-animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
-webkit-animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
Expand Down Expand Up @@ -179,3 +183,39 @@
transform: rotate(360deg);
}
}

/* Media queries*/
@media screen and (min-width: 640px) {
.mapboxgl-ctrl-geocoder {
width: 33.3333%;
font-size: 15px;
line-height: 20px;
max-width: 360px;
}
.mapboxgl-ctrl-geocoder ul {
font-size: 13px;
}

.geocoder-icon {
top: 8px;
}

.geocoder-icon-close {
width: 16px;
height: 16px;
margin-top: 3px;
margin-right: 0;
}

.mapboxgl-ctrl-geocoder input[type="text"] {
height: 36px;
}

.geocoder-icon-loading {
width: 26px;
height: 26px;
margin-top: -2px;
margin-right: -5px;
}

}