- From: Orion Adrian <orion.adrian@gmail.com>
- Date: Fri, 23 Feb 2007 12:59:49 -0500
- 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 case. 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