Skip to content

Commit af99bcb

Browse files
committed
tweak styles
1 parent dab7641 commit af99bcb

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

apps/svelte.dev/src/routes/packages/Category.svelte

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@
3535

3636
{#if packages.length > INITIAL_ITEMS}
3737
<div class="show-more-container">
38-
<button class="show-more-btn" onclick={() => (showAll = !showAll)}>
39-
{showAll ? 'Show Less' : `Show More (${packages.length - INITIAL_ITEMS})`}
40-
</button>
38+
<label>
39+
<button
40+
class="raised"
41+
aria-label="Show more"
42+
aria-pressed={showAll}
43+
onclick={() => (showAll = !showAll)}><span class="icon"></span></button
44+
>
45+
46+
{showAll ? 'show less' : `show all (${packages.length})`}
47+
</label>
4148
</div>
4249
{/if}
4350
</section>
@@ -74,28 +81,27 @@
7481
7582
.show-more-container {
7683
display: flex;
77-
justify-content: flex-end;
78-
margin-top: 1rem;
79-
}
80-
81-
.show-more-btn {
82-
background: var(--sk-bg-3);
83-
border: 1px solid var(--sk-border);
84-
border-radius: var(--sk-border-radius);
85-
padding: 0.75rem 1.5rem;
86-
font: var(--sk-font-ui-medium);
87-
font-size: 1.2rem;
88-
color: var(--sk-text-1);
89-
cursor: pointer;
90-
transition: all 0.2s ease;
91-
92-
&:hover {
93-
background: var(--sk-bg-4);
94-
border-color: var(--sk-text-3);
84+
justify-content: flex-start;
85+
margin-top: 2rem;
86+
87+
label {
88+
font: var(--sk-font-ui-small);
89+
display: flex;
90+
align-items: center;
91+
gap: 1rem;
92+
93+
.icon {
94+
mask-size: 2rem;
95+
mask-image: url(icons/minus);
96+
}
97+
98+
button[aria-pressed='false'] .icon {
99+
mask-image: url(icons/plus);
100+
}
95101
}
96102
97-
&:active {
98-
transform: translateY(1px);
103+
button {
104+
/* width: 10rem; */
99105
}
100106
}
101107

apps/svelte.dev/src/routes/packages/PackageCard.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@
130130
height: 100%;
131131
min-height: 0;
132132
133-
background-color: var(--sk-bg-2);
133+
background-color: var(--sk-bg-1);
134134
135-
border: 1px solid var(--sk-bg-4);
136135
border-radius: var(--sk-border-radius);
136+
filter: drop-shadow(0.2rem 0.4rem 0.6rem rgb(0 0 0 / 0.1));
137137
padding: 1rem;
138138
139139
min-height: 16em;

packages/icons/icons/minus.svg

Lines changed: 1 addition & 0 deletions
Loading

packages/icons/icons/plus.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)