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

Re: Survival of Styling with Copy and Paste

From: Orion Adrian <orion.adrian@gmail.com>
Date: Fri, 23 Feb 2007 12:59:49 -0500
Message-ID: <abd6c8010702230959h593af05bwe4e0c4c52bf0b9d1@mail.gmail.com>
To: "W3C CSS" <www-style@w3.org>

Basically you walk the DOM getting the computed style of each element
and then create the (X)HTML fragment applying those styles using the
style attribute or a series of generated id's (ugly to be sure) and
adding those styles to the stylesheet.

Regardless of where the stylesheet is the only safe way to get the
styling information is to walk the DOM and get computedStyle in each

On 2/20/07, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote:
> On 20/02/2007 21:30, Andrew Fedoniouk wrote:
> > So the only feasible option of inter-document copying is use of
> > pure html without any styling information. CSS (cascading) simply
> > does not work in this use case.
> This is false. The second feasible option is to get the computed style
> of the element copied and compared it to the initial values of all
> properties to extract minimalist inline styles that could be applied
> to the element when copied. Not that hard to implement...
> </Daniel>


Orion Adrian
Received on Friday, 23 February 2007 18:00:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:27 UTC