Relevant CSS code:
```
.barcode {
/* relevant styles */
background:
/* along x axis between semi-transparent black & transparent */
linear-gradient(90deg, #0002, #0000),
linear-gradient(90deg, #0003, #0000),
linear-gradient(90deg, #0000, #0005),
linear-gradient(90deg, #0000, #0007);
/* each layer has a different size so that stacking these gradients
/* results in a random-looking semitransparent vertical lines pattern */
background-size: 13px, 7px, 19px, 17px;
filter: url(#f)
}
```
The markup.
```
<svg width='0' height='0'>
<filter id='f'>
<feComponentTransfer>
<!-- push all alpha values < .5 to 0
and all others (>= .5) to 1 -->
<feFuncA type='discrete' tableValues='0 1'/>
</feComponentTransfer>
</filter>
</svg>
<div class='barcode'></div>
```
Result of stacking prime-number of pixels size linear gradients, before applying the SVG filter: random-looking semitransparent vertical slightly blurry lines pattern.
After applying the SVG filter: proper barcode look!
#tinySVGtip Create a barcode ▌│█║▌║▌║ with a CSS gradient pattern (only a handful of CSS declarations in total) + a super simple SVG filter!
Also an entry for this week's #CodePenChallenge codepen.io/thebabydino/...