Lurker News

Comments (168) 24 threads

Show all comments

Showing thread 23 of 24

jandrese3 replies#
CSS has gone too far. At least when I'm worried about a nasty javascript attack from a site I can be somewhat reassured that noscript/umatrix will work. Am I going to have to start whitelisting CSS now too? Am I too late?
Raphmedia1 reply#
You are. CSS has gone "too far" the second it allowed linking to images.

I can simply background-image:url("myTrackingPixel.png") and then track whenever someone tries to load that image from my server.

jandrese1 reply#
It drives me crazy when I see someone has implemented Doom in CSS, but it still requires black magic to do a simple responsive three column layout without using bleeding edge features that aren't widely supported yet.
dmitrygr4 replies#
Falls apart entirely on phones (tiny columns of one word wide each, AND horizontal scrolling), so you only proved OP's point...

Continue this thread — 4 replies

vlunkr1 reply#
As other comments have stated, this only works if the 'value' attr is being set on the input box as you type (which React will do), so it still requires JS.
rocqua#
There are a lot of sites where you wouldn't need to inject the JS code for react though.
Manishearth1 reply#
This isn't a CSS feature, CSS does not let you select on the value of a password field (it lets you select on the value of the `value` attribute, which doesn't change when you type)

This is a React feature, where React apps specifically use the value attribute (`element.setAttribute("value", ...)`) to set the value, instead of `element.value`.

ry_ry#
Or if that attribute was populated via props from it's parent, which is a more common implementation.