Skip to content

Commit 3e6f53f

Browse files
authored
fix: align sidebar items consistently (#1857)
1 parent 2c29857 commit 3e6f53f

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

app/components/CollapsibleSection.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ useHead({
8080

8181
<template>
8282
<section :id="id" :data-anchor-id="id" class="scroll-mt-20 xl:scroll-mt-0">
83-
<div class="flex items-center justify-between mb-3 px-1">
83+
<div class="flex items-center justify-between mb-3 ps-1">
8484
<component
8585
:is="headingLevel"
8686
class="group text-xs text-fg-subtle uppercase tracking-wider flex gap-2"
@@ -122,7 +122,7 @@ useHead({
122122

123123
<div
124124
:id="contentId"
125-
class="grid ms-6 grid-rows-[1fr] transition-[grid-template-rows] duration-200 ease-in-out collapsible-content"
125+
class="grid ms-6 ps-1 grid-rows-[1fr] transition-[grid-template-rows] duration-200 ease-in-out collapsible-content"
126126
:inert="!isOpen"
127127
>
128128
<div class="min-h-0 min-w-0">

app/components/Package/Dependencies.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const numberFormatter = useNumberFormatter()
108108
)
109109
"
110110
>
111-
<ul class="px-1 space-y-1 list-none m-0" :aria-label="$t('package.dependencies.list_label')">
111+
<ul class="space-y-1 list-none m-0" :aria-label="$t('package.dependencies.list_label')">
112112
<li
113113
v-for="[dep, version] in sortedDependencies.slice(0, depsExpanded ? undefined : 10)"
114114
:key="dep"

app/components/Package/Keywords.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const { model } = useGlobalSearch()
77
</script>
88
<template>
99
<CollapsibleSection v-if="keywords?.length" :title="$t('package.keywords_title')" id="keywords">
10-
<ul class="flex flex-wrap gap-1.5 list-none m-0 p-1">
10+
<ul class="flex flex-wrap gap-1.5 list-none m-0 p-0">
1111
<li v-for="keyword in keywords.slice(0, 15)" :key="keyword">
1212
<LinkBase
1313
variant="button-secondary"

app/components/Package/Maintainers.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ watch(
173173
id="maintainers"
174174
:title="$t('package.maintainers.title')"
175175
>
176-
<ul
177-
class="space-y-2 list-none m-0 p-0 my-1 px-1"
178-
:aria-label="$t('package.maintainers.list_label')"
179-
>
176+
<ul class="space-y-2 list-none m-0 p-0" :aria-label="$t('package.maintainers.list_label')">
180177
<li
181178
v-for="maintainer in visibleMaintainers"
182179
:key="maintainer.name ?? maintainer.email"

app/components/Package/Versions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ function majorGroupContainsCurrent(group: (typeof otherMajorGroups.value)[0]): b
515515
<div class="space-y-0.5 min-w-0">
516516
<!-- Semver range filter -->
517517
<div>
518-
<div class="flex items-center gap-2 p-1">
518+
<div class="flex items-center gap-2 pb-1 pe-1">
519519
<InputBase
520520
v-model="semverFilter"
521521
type="text"

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const config = computed<VueUiSparklineConfig>(() => {
240240
opacity: 10,
241241
},
242242
dataLabel: {
243-
offsetX: -10,
243+
offsetX: -12,
244244
fontSize: 28,
245245
bold: false,
246246
color: colors.value.fg,
@@ -274,6 +274,12 @@ const config = computed<VueUiSparklineConfig>(() => {
274274
strokeDasharray: 0,
275275
color: isDarkMode.value ? 'oklch(0.985 0 0)' : colors.value.fgSubtle,
276276
},
277+
padding: {
278+
left: 0,
279+
right: 0,
280+
top: 0,
281+
bottom: 0,
282+
},
277283
},
278284
}
279285
})

0 commit comments

Comments
 (0)