style: fix spacing on rep selection (#340)

This commit is contained in:
Barbara Gomes 2023-04-02 14:49:07 -04:00 committed by GitHub
parent 8ea0ae6e1e
commit 1ebb902894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,7 @@
let cls: string | undefined = undefined
export { cls as class }
export let disabled: boolean | undefined = undefined
export let rep: boolean | undefined = undefined
let showDropdown = false
let dropdownElement: HTMLElement
@ -40,7 +41,7 @@
</div>
<div class={`root ${cls}`}>
<ul class={showDropdown ? '' : 'hidden'}>
<ul class={`${showDropdown ? '' : 'hidden'} ${rep ? 'rep' : ''} ${cls}`}>
<slot />
</ul>
</div>
@ -61,6 +62,10 @@
background-color: rgba(var(--color-body-bg-rgb), 0.93);
overflow: hidden;
&.rep {
inset: calc(100% - var(--spacing-12)) calc(var(--spacing-24) * -1) auto auto;
}
@media (min-width: 450px) {
min-width: min(calc(100vw - 48px), 350px);
}

View File

@ -23,7 +23,7 @@
<InfoScreen {title} {onBack} {onClose}>
<Container>
<h2>Reputation level</h2>
<Dropdown>
<Dropdown rep>
<Select slot="button" label="Reputation level" value={`Minimum ${minReputation} REP`} />
<DropdownItem

View File

@ -33,6 +33,7 @@
font-size: var(--font-size-normal);
white-space: nowrap;
color: var(--color-body-text);
margin: var(--spacing-24) calc(var(--spacing-24) * -1) var(--spacing-12);
.label {
font-size: var(--font-size-sm);
@ -46,6 +47,7 @@
justify-content: space-between;
align-items: center;
width: 100%;
font-family: var(--font-serif);
}
& :global(svg) {