W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: :click pseudo element

From: Jonas Hartmann <j0n4s.h4rtm4nn@googlemail.com>
Date: Mon, 7 Feb 2011 17:01:57 +0100
Message-Id: <12754F18-37EE-451B-B0AE-F245001E5F04@googlemail.com>
To: thomasin a <nevereatredjellybeans@gmail.com>, www-style list <www-style@w3.org>
Hello,

I think the :hover element was already a mistake. I consider it bad for CSS to be /just a bit/ "behavioural".

If you consider JS to be too complex / much of a hassle for behavioural style changes maybe there should be a "new" set of tools like behavioural styles? You can see how much CSS grows if just animations are added. Those are not even really behavioural because they have no interactional concept. They play from the start to the end. Though just by being temporal (like behavioural actions are) they add lots of complexity (frames, keyframes, starts, stops, repeats, etc....).

A further counter argument to :click is that without using javascript using clicks on elements that are "usually" clicked (e.g. semantically they are "control elements" rather than pure (dead) information) instantly(!) triggers a HTTP request which means that in a prefect world (instant GET response) the style changes would not be seen. Which means there would be need for things like a delay: 3s property, or alike. Feels wrong to me to do that within CSS (not wrong per se, but just wrong within CSS).

On 2011-01-29, at 23:19, thomasin a wrote:

> In order to fully realise the use of the new CSS3 transformation and transition abilities, I think a :click pseudo element needs to be added, identical to :hover but with the click being the trigger instead. I have noticed a lot of people want it, instead reverting to a few short lines of Javascript when instead you could make a CSS and HTML pure site, with the code being a lot simpler and easy to understand too. 
> 
> I hope you've considered this, and will consider it, because it is a Javascript function I use almost every time I program, and it would be a lot easier and useful to have it in CSS as well. 
> 
> -Thomasin
Received on Monday, 7 February 2011 16:19:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT