Skip to content

Commit c635ea4

Browse files
authored
Merge pull request #10989 from Turbo87/global-load-more
Simplify `.load-more` CSS classes
2 parents 1e3f9e4 + f24b03d commit c635ea4

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

app/styles/dashboard.module.css

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,7 @@
115115
text-align: right;
116116
}
117117

118-
:global(.load-more) {
118+
.load-more {
119119
padding: var(--space-s);
120120
border-top: 1px solid light-dark(hsla(51, 90%, 42%, .25), #232321);
121-
122-
button {
123-
display: block;
124-
text-align: center;
125-
width: 100%;
126-
padding: var(--space-2xs);
127-
outline: 0;
128-
border: 0;
129-
background-color: light-dark(#dbd9cf, #202023);
130-
color: light-dark(#525252, #f9f7ec);
131-
132-
&:hover, &:focus {
133-
background-color: light-dark(#c5c2b2, #26262b);
134-
}
135-
}
136121
}

app/styles/shared/buttons.module.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,18 @@
8484
:global(.button--small) {
8585
padding: var(--space-2xs) var(--space-s);
8686
}
87+
88+
:global(.load-more-button) {
89+
display: block;
90+
text-align: center;
91+
width: 100%;
92+
padding: var(--space-2xs);
93+
outline: 0;
94+
border: 0;
95+
background-color: light-dark(#dbd9cf, #202023);
96+
color: light-dark(#525252, #f9f7ec);
97+
98+
&:hover, &:focus {
99+
background-color: light-dark(#c5c2b2, #26262b);
100+
}
101+
}

app/templates/crate/versions.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
{{/each}}
2828
</ul>
2929
{{#if (or this.loadMoreTask.isRunning this.next_page)}}
30-
<div local-class="load-more" class="load-more">
30+
<div local-class="load-more">
3131
<button
3232
type="button"
33+
class="load-more-button"
3334
data-test-id={{if this.loadMoreTask.isRunning "loading" "load-more"}}
3435
disabled={{this.loadMoreTask.isRunning}}
3536
{{on "click" (perform this.loadMoreTask)}}

app/templates/dashboard.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
</ul>
6161

6262
{{#if this.hasMore}}
63-
<div class="load-more">
64-
<button type="button" disabled={{this.loadMoreTask.isRunning}} {{on "click" (perform this.loadMoreTask)}}>
63+
<div local-class="load-more">
64+
<button type="button" class="load-more-button" disabled={{this.loadMoreTask.isRunning}} {{on "click" (perform this.loadMoreTask)}}>
6565
Load More
6666
{{#if this.loadMoreTask.isRunning}}
6767
<LoadingSpinner />

ember-cli-build.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ module.exports = function (defaults) {
5959
'crates-io/styles/shared/sort-by',
6060
'crates-io/styles/shared/typography',
6161
'crates-io/styles/application',
62-
// for the `.load-more` class
63-
'crates-io/styles/dashboard',
6462
// for the `.scopes-list` class
6563
'crates-io/styles/settings/tokens/new',
6664
// for the `.box-link` class

0 commit comments

Comments
 (0)