0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 01:22:07 +01:00

Replace u-hidden with Tailwind equivalent with and without !important

This commit is contained in:
Thibaud Colas 2023-12-12 17:48:05 +00:00
parent 27cc553dd8
commit 9e65559d0e
5 changed files with 8 additions and 13 deletions

View File

@ -1,8 +1,3 @@
.u-hidden {
// stylelint-disable-next-line declaration-no-important
display: none !important;
}
.nice-padding {
padding-inline-start: $mobile-nice-padding;
padding-inline-end: $mobile-nice-padding;

View File

@ -105,11 +105,11 @@ window.comments = (() => {
}
show() {
this.node.classList.remove('u-hidden');
this.node.classList.remove('!w-hidden');
}
hide() {
this.node.classList.add('u-hidden');
this.node.classList.add('!w-hidden');
}
setOnClickHandler(localId) {
@ -231,7 +231,7 @@ window.comments = (() => {
'aria-describedby',
this.commentAdditionNode.getAttribute('aria-describedby'),
);
annotationNode.classList.remove('u-hidden');
annotationNode.classList.remove('!w-hidden');
this.commentAdditionNode.insertAdjacentElement(
'beforebegin',
annotationNode,

View File

@ -126,12 +126,12 @@ function onSelectIndividualCheckbox(e) {
if (checkedState.shouldShowAllInListingText) {
document
.querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING)
.classList.remove('u-hidden');
.classList.remove('w-hidden');
}
} else if (checkedState.shouldShowAllInListingText) {
document
.querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING)
.classList.add('u-hidden');
.classList.add('w-hidden');
}
if (numCheckedObjects > 0) {
@ -169,7 +169,7 @@ function onClickSelectAllInListing(e) {
).textContent = `${getStringForListing('ALL_IN_LISTING')}.`;
document
.querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING)
.classList.add('u-hidden');
.classList.add('w-hidden');
}
/**

View File

@ -6,7 +6,7 @@
<ul class="bulk-actions-buttons">{% bulk_action_choices app_label model_name %}</ul>
<span data-bulk-action-num-objects class="num-objects"></span>
{% if objects.has_other_pages %}
<button type="button" data-bulk-action-num-objects-in-listing class="num-objects-in-listing u-hidden">{{ select_all_obj_text }}</button>
<button type="button" data-bulk-action-num-objects-in-listing class="num-objects-in-listing w-hidden">{{ select_all_obj_text }}</button>
{% endif %}
</div>
</section>

View File

@ -1,5 +1,5 @@
{% load wagtailadmin_tags %}
<button type="button" id="comment-icon" data-annotation class="w-field__comment-button w-field__comment-button--reveal u-hidden">
<button type="button" id="comment-icon" data-annotation class="w-field__comment-button w-field__comment-button--reveal !w-hidden">
{% icon name='comment' %}
</button>
{{ comments_data|json_script:"comments-data" }}