News for hackers. Stuff that matters.
Re:Problems with the CSS background-image property by hn_throwaway_99 on Saturday July 27, 2019 @11:21PM (#20545669)
TBH, I hate these kinds of articles. Instead of titling it something like "Things to be aware of with CSS background-image", or even the catchier "Don't use CSS background-image for a foreground image", it uses a much broader, click-baity unwarranted title about "anti-pattern".

I'm glad that background-images aren't indexed by search engines, or made available to screen readers, and I obviously know they aren't downloaded before the CSS that references them is. I think all of those as good things, because I use background-image just for that - things that not primary. When I print, if excluding background images makes the page unreadable, I think of it as using background images wrong.

Calling a widely used, useful feature an "anti-pattern" just because some people may use it wrong is ludicrous.

Re:Problems with the CSS background-image property by dang on Sunday July 28, 2019 @01:00AM (#20545933)
Ok, but the title isn't the article, and there are other things to discuss here.

https://news.ycombinator.com/item?id=20545932

Re:Problems with the CSS background-image property by dymk on Saturday July 27, 2019 @11:53PM (#20545756)
Well, it is a common anti pattern, in the way it’s usually used. A quick search on github for uses corroborates this.
Re:Problems with the CSS background-image property by caiocaiocaio on Saturday July 27, 2019 @11:26PM (#20545679)
It may be an anti-pattern, but is it considered harmful?
Re:Problems with the CSS background-image property by ssalka on Saturday July 27, 2019 @11:44PM (#20545729)
At the very least it's user-hostile, if I want to save the image I would have to inspect element and open the URL in a new tab, rather than just Right Click > Save Image as...
Re:Problems with the CSS background-image property by gitrebase on Saturday July 27, 2019 @11:54PM (#20545763)
Uh? Your parent comment was referring to often ill suited "X considered harmful" type of articles.
Re:Problems with the CSS background-image property by coding123 on Sunday July 28, 2019 @12:10AM (#20545792)
The Problem with Article Titles
Re:Problems with the CSS background-image property by rhizome on Sunday July 28, 2019 @12:29AM (#20545844)
background-image the hard way
Re:Problems with the CSS background-image property by tricolon on Sunday July 28, 2019 @12:50AM (#20545903)
learn you a background-image