vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

u-show utility (display: initial) doesn't work properly with list items.

Open minkyngkm opened this issue 2 years ago • 1 comments

Describe the bug

u-show utility (display: initial) doesn't work properly with list items.

Please refer to this issue for details https://github.com/canonical/ubuntu.com/issues/12859

minkyngkm avatar May 12 '23 10:05 minkyngkm

As mentioned in a comment on #4923:

I just realised we can't reliably fix this issue.

Current fix assumes that all list elements need to be reverted back to list-item, but it's not true. List items that are part of components may already override the display property to block or inline or flex.

For example any inline list using u-show will stop being inline:

image

To fix it we would need to create exceptions for all known Vanilla components that style list elements, which is completely unfeasible.

I think the only way around is to currently accept the issue with u-show on lists, and in future deprecate it and only use u-hide.


There is no easy way to fix that. There is no reliable way to "revert" the hiding (display: none) and return to previous state, because we don't know what previous state may be.

The only reliable way is to only use u-hide utilities, not u-show.

This needs to be documented, and u-show utility likely to be deprecated and removed in future.

bartaz avatar Nov 28 '23 12:11 bartaz

Triage: Effort high, impact high. Too large to tackle in current v4, we should address this in new architecture.

bartaz avatar Sep 23 '24 11:09 bartaz

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15176.

This message was autogenerated