u-show utility (display: initial) doesn't work properly with list items.
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
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:
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.
Triage: Effort high, impact high. Too large to tackle in current v4, we should address this in new architecture.
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15176.
This message was autogenerated