@hsluoyz/bingmaps-react
Version:
An easy to use Bing Maps component for React apps
162 lines (145 loc) • 2.65 kB
CSS
@import url("https://fonts.googleapis.com/css?family=Raleway&display=swap");
* {
font-family: "Raleway", sans-serif;
box-sizing: border-box;
}
html,
body {
margin: 0;
overflow: hidden;
height: 100%;
}
#root {
height: 100%;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
.maps__container {
display: grid;
grid-template-columns: minmax(320px, 1fr) 3fr;
grid-gap: 50px;
height: 100vh;
width: 100vw;
align-items: center;
justify-content: center;
padding: 50px 50px;
}
header {
grid-column: 1 / span 2;
display: flex;
justify-content: space-between;
}
.map__controls {
display: grid;
grid-template-columns: 1fr;
grid-auto-rows: min-content;
grid-gap: 10px;
overflow: hidden;
overflow-y: scroll;
padding-right: 15px;
max-height: 100%;
}
label {
display: flex;
justify-content: space-between;
width: 100%;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
font-size: 14px;
}
label:last-child {
border: none;
}
.map__card {
padding: 10px;
border-radius: 5px;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
height: 100%;
width: 100%;
}
.map__config {
grid-column: 1 / span 2;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 50px;
height: 50px;
}
.map__config__button {
border-radius: 5px;
cursor: pointer;
background: skyblue;
border: none;
outline: none;
color: white;
font-weight: bold;
font-size: 20px;
}
.map__infobox {
position: absolute;
width: 300px;
left: -150px;
background: white;
}
.infobox__user__details {
display: grid;
grid-template-columns: min-content 1fr;
align-items: center;
}
.infobox__user__image {
height: 50px;
width: 50px;
border-radius: 50%;
background: skyblue;
}
.infobox__user__name {
display: flex;
flex-direction: column;
}
.map__infobox button {
width: 100%;
background: lightskyblue;
border: none;
}
@media (max-width: 800px), (max-height: 600px) {
.maps__container {
grid-template-columns: 1fr;
grid-template-rows: min-content calc(100% - 100px);
grid-template-areas:
"header"
"map";
grid-gap: 0px;
overflow: hidden;
overflow-y: scroll;
height: 100%;
padding: 0;
}
header {
grid-area: header;
height: 100px;
align-items: center;
padding: 10px;
}
header h1 {
font-size: 24px;
}
header p {
display: none;
}
header * {
margin: 0;
}
.map__card {
grid-area: map;
padding: 0px;
}
.map__controls {
display: none;
}
.map__config {
display: none;
}
}