Re: :click pseudo element

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 UTC