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

chore: Scope styles for SearchableJson.svelte #540

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
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
46 changes: 46 additions & 0 deletions src/lib/SearchableJson.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,49 @@
{/each}
</section>
</SearchLayout>

<style>
.controls {
display: grid;
justify-content: stretch;
align-items: center;
gap: var(--s-4);
font-family: Overpass;
position: relative;
}
.inputs {
display: grid;
gap: var(--s-2);
}
.searchbar {
padding: 20.5px var(--s-2);
border: 2px solid var(--dark-gray);
border-radius: 2px;
align-self: flex-end;
grid-row: 1/2;
font-family: Overpass;
background: #f3f6f9 url(/images/search-icon.svg) 98% no-repeat;
margin: 0;
}
.searchbar:focus {
outline: none;
border: 1px solid var(--secondary);
}
.searchbar-count {
position: absolute;
top: calc(100% + 1rem);
right: 0;
}

@media (min-width: 1280px) {
.controls {
grid-template-columns: 2fr 1fr;
}
.inputs {
grid-template-columns: repeat(4, auto);
}
.searchbar {
grid-row: auto;
}
}
</style>
43 changes: 0 additions & 43 deletions src/lib/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,37 +112,6 @@ hr {
top: calc(100% + 1rem);
left: 0;
}
.controls {
display: grid;
justify-content: stretch;
align-items: center;
gap: var(--s-4);
font-family: Overpass;
position: relative;
}
.inputs {
display: grid;
gap: var(--s-2);
}
.searchbar {
padding: 20.5px var(--s-2);
border: 2px solid var(--dark-gray);
border-radius: 2px;
align-self: flex-end;
grid-row: 1/2;
font-family: Overpass;
background: #f3f6f9 url(/images/search-icon.svg) 98% no-repeat;
margin: 0;
}
.searchbar:focus {
outline: none;
border: 1px solid var(--secondary);
}
.searchbar-count {
position: absolute;
top: calc(100% + 1rem);
right: 0;
}
ul.popin {
padding: 0.5ex;
margin: 0;
Expand Down Expand Up @@ -190,15 +159,3 @@ ul.popin li input {
flex: 0;
margin: 0 1ex 0 0;
}

@media (min-width: 1280px) {
.controls {
grid-template-columns: 2fr 1fr;
}
.searchbar {
grid-row: auto;
}
.inputs {
grid-template-columns: repeat(4, auto);
}
}