empty_list_widget: Use class instead of id.

We were using id before to increase their specificity, but
since it is possible for multiple empty_list_widget_for_list/table
to be in DOM at the same time, we should use a class here. Used
`!important` here so that we can force our padding where these
classes are used.
This commit is contained in:
Aman Agrawal 2023-10-15 10:23:06 +00:00 committed by Tim Abbott
parent 62c78d5ad5
commit 4db331ed21
7 changed files with 9 additions and 9 deletions

View File

@ -214,7 +214,7 @@ function render_user_stream_list(streams, user) {
return item && item.name.toLocaleLowerCase().includes(value);
},
onupdate() {
if ($container.find("#empty-table-message").length) {
if ($container.find(".empty-table-message").length) {
$container.parent().addClass("empty-list");
}
},

View File

@ -1172,12 +1172,12 @@ div.overlay {
}
}
#empty-list-message,
#empty-table-message {
.empty-list-message,
.empty-table-message {
background-color: inherit;
color: var(--color-text-default);
font-size: 1.5em;
padding: 3em 1em;
padding: 3em 1em !important;
text-align: center;
}

View File

@ -663,7 +663,7 @@ ul {
.empty-list {
border: none;
#empty-table-message {
.empty-table-message {
padding: 3em 1em;
}
}

View File

@ -53,7 +53,7 @@
}
}
#empty-table-message {
.empty-table-message {
background-color: var(--color-background);
padding: 3em 1em;
}

View File

@ -85,7 +85,7 @@ $user_status_emoji_width: 24px;
display: block;
}
#empty-list-message {
.empty-list-message {
font-size: 1.2em;
&:hover {

View File

@ -1 +1 @@
<li id="empty-list-message">{{empty_list_message}}</li>
<li class="empty-list-message">{{empty_list_message}}</li>

View File

@ -1,5 +1,5 @@
<tr>
<td id="empty-table-message" colspan="{{column_count}}">
<td class="empty-table-message" colspan="{{column_count}}">
{{empty_list_message}}
</td>
</tr>