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

Re: [css3-values][css3-images] element() function

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 1 Sep 2010 16:47:08 +1200
Message-ID: <AANLkTimAAnTj=Yzm0mFm50-Rk03NGZP9+1OBk-oVjHkG@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Simon Fraser <smfr@me.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Wed, Sep 1, 2010 at 12:21 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> Isn't that what generated content is for?
>
> #foo::after {
>  content: "";
>  position: absolute;
>  width: 100%;
>  height: 100%;
>  top: 100%;
>  left: 0;
>  background: element(#foo);
>  transform: rotateX(180deg);
>  /* Stuff to do masking */
> }
>
> This requires either that #foo is also positioned (can just be
> relpos), or that we have sufficient control over abspos positioning
> roots that we can tell the ::after to just position off of its parent.
>

One small enhancement that would make that more palatable is to support
"element(self)" as a special value that refers to the element to which the
CSS rule applies. Then a single rule could add reflections to many elements.
(We don't support that yet but it would be easy to do.)

Another possible way of tackling reflections would be to have a dedicated
pseudo-element "::reflection" and property
"reflection-position:bottom|top|left|right". I'm not sure what the right
flexibility/convenience tradeoff is, although I do think that making
reflections fully styleable pseudo-elements is desirable.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
Received on Wednesday, 1 September 2010 04:47:37 GMT

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