Quantcast
Channel: Hide element, but show CSS generated content - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by dj.cowan for Hide element, but show CSS generated content

$
0
0

2025 update

Visual 'manipulation' of the DOM using display: contents which plays nicely with grid/flex.

Taken from the following stackoverflow question/answer:

With Source:

span {    display: contents;    font-size-adjust: 0;  /* or other adjustment method */}span:before {    display: inline-block; /* or as preferred */    font-size-adjust: initial;  /* and reset other adjustment method */}

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>