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 { .nice-padding {
padding-inline-start: $mobile-nice-padding; padding-inline-start: $mobile-nice-padding;
padding-inline-end: $mobile-nice-padding; padding-inline-end: $mobile-nice-padding;

View File

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

View File

@ -126,12 +126,12 @@ function onSelectIndividualCheckbox(e) {
if (checkedState.shouldShowAllInListingText) { if (checkedState.shouldShowAllInListingText) {
document document
.querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING) .querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING)
.classList.remove('u-hidden'); .classList.remove('w-hidden');
} }
} else if (checkedState.shouldShowAllInListingText) { } else if (checkedState.shouldShowAllInListingText) {
document document
.querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING) .querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING)
.classList.add('u-hidden'); .classList.add('w-hidden');
} }
if (numCheckedObjects > 0) { if (numCheckedObjects > 0) {
@ -169,7 +169,7 @@ function onClickSelectAllInListing(e) {
).textContent = `${getStringForListing('ALL_IN_LISTING')}.`; ).textContent = `${getStringForListing('ALL_IN_LISTING')}.`;
document document
.querySelector(BULK_ACTION_NUM_OBJECTS_IN_LISTING) .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> <ul class="bulk-actions-buttons">{% bulk_action_choices app_label model_name %}</ul>
<span data-bulk-action-num-objects class="num-objects"></span> <span data-bulk-action-num-objects class="num-objects"></span>
{% if objects.has_other_pages %} {% 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 %} {% endif %}
</div> </div>
</section> </section>

View File

@ -1,5 +1,5 @@
{% load wagtailadmin_tags %} {% 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' %} {% icon name='comment' %}
</button> </button>
{{ comments_data|json_script:"comments-data" }} {{ comments_data|json_script:"comments-data" }}