Skip to content

Commit

Permalink
Make cancel button consistent across browsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
lseelenbinder committed Jun 27, 2023
1 parent c23f70d commit 422b519
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stadiamaps/maplibre-search-box",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://docs.stadiamaps.com/",
"repository": "https://github.com/stadiamaps/maplibre-search-box",
"license": "BSD-3-Clause",
Expand Down
28 changes: 23 additions & 5 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,37 @@
.cancel {
background: #aaa;
border-radius: 50%;
color: #fff;
cursor: pointer;
display: block;
font-size: 1.5rem;
height: 20px;
opacity: 0.5;
position: absolute;
right: 5px;
top: 9px;
width: 20px;

&:hover {
opacity: 1;
}

&::before,
&::after {
background-color: #fff;
content: " ";
height: 10px;
left: 9px;
position: absolute;
top: 5px;
width: 2px;
}

&::before {
content: "\02a2f";
display: block;
margin-left: 4.5px;
margin-top: -4.5px;
transform: rotate(45deg);
}

&::after {
transform: rotate(-45deg);
}
}

Expand Down Expand Up @@ -123,6 +139,8 @@
padding: 5px;

a {
color: #000;

&:visited {
color: #000;
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IControl, Map } from "maplibre-gl";
import type { IControl, Map } from "maplibre-gl";
import {
AutocompleteRequest,
type AutocompleteRequest,
GeocodingApi,
PeliasGeoJSONFeature,
PeliasLayer,
Expand Down

0 comments on commit 422b519

Please sign in to comment.