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]