The `del` element's CSS should be consistent, irrespective of whether it is acting as a block-level or inline element

AI-generated summary

roke_julian_lockhart highlights a CSS inconsistency in the del element, noting that its styling differs depending on whether it is treated as block-level or inline. Specifically, when del contains content spanning multiple lines (block-level behavior), the visual rendering does not match the standard inline strikethrough appearance seen in single-line contexts. The user questions why certain CSS aspects do not apply uniformly and suggests that the element should render consistently regardless of its layout context.

<del>

This is content.

</del>

…becomes:

This is content.

image

…whereas I would prefer it to equivalate:

<del>This is content.</del>

…which renders as:

This is content.

image

I do not know why certain aspects of its CSS do not always apply. Is that desirable?

https://stackoverflow.com/questions/14398556/is-it-possible-for-an-inline-element-to-validly-have-a-block-level-element-desce#comment85955512_16112295

1 Like