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

Re: Suggestion: Realtime/time and date based transitions

From: Michiel Crefcoeur <mpcref@gmail.com>
Date: Tue, 27 Sep 2011 17:50:24 +0200
Message-ID: <CA+XjBumdbW7fpCFTUSkPMc9QVOD0CsE4JmEedpUkSebbbVt2qg@mail.gmail.com>
To: Lea Verou <leaverou@gmail.com>
Cc: Gabriel Zackari <gabriel.zackari@gmail.com>, www-style@w3.org
I like the idea!
I see it more as a media selector extension, although the term "media" might
not be correct in this case:

@media screen and (min-time: time(12-25)) and (max-time: time(12-27)) {
  #merrychristmas {
    display:block;
    background-image:url(santa.jpg);
  }
  /*start snow animation etc.*/
}

The used time notation is just a basic idea:
time(yyyy-mm-dd hh:mm:ss)
Not specifying yyyy defaults to current year, not specifying a time part
defaults to 00:00:00.

cheers,
Michiel


2011/9/27 Lea Verou <leaverou@gmail.com>

>  On 27/9/11 11:23, Gabriel Zackari wrote:
>
> Sorry if this has been up before.
>
>  *Suggestion:*
>
>  Ability to set a  real-time based start and end for a transition/CSS at a
> certain time during the day.
> And even date.
>
>  *Example: *
>
>  Clock and/or even Date values could be set to trigger a transition.
>
>  *Why:*
>
>  This would allow users to have time based website designs.
>
>  At night a website could change to a dark theme.
> Adult type content and ads containing violince etc could be displayed only
> after a certain time.
> You could make a CSS clock by timing the transition to a real clock.
>
>  Opening hours of events could be displayed.
>
>  /Gabriel
>
> This could be a good idea, but I think it calls more for a selector
> (pseudo-class in particular), rather than a property value. Something like
> :date(2011-9-27 11:40) or :date(9-27 11:40) or :date(11:40) etc. Then you
> could use this selector to kick-start animations or whatever.
>
> --
> Lea Verou (http://leaverou.me | @LeaVerou)
>
>
Received on Tuesday, 27 September 2011 15:50:52 GMT

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