Re: CSS Generated content selection

After a few days back and forth on this one I'm going to attempt a  
summary, and float an idea:

1. It's generally felt that generated quotes should be copied in most  
circumstances.
2. Whether list bullets should be copied is debatable, but certainly  
depends on the receiving application. Plain text, yes. MS Word or  
HTML, no, because what we should be doing is copying rich text with  
styling information that says "bullet this item".
3. Generated newlines should generally be copied, although see (2).
4. No word on other generated content yet - eg h1::before  
{ content:"Chapter" counter(chapter) } - which I hope we're going to  
see more of as CSS3 rolls out. Generated Table of Contents, anyone?

It strikes me that one way around this would be to create a  
"clipboard" media type for CSS3 - something like

   @media clipboard {
       q::before { content: "\"" }
       ul        { list-style-type: none }
   }

or even

   @media clipboard and (richtext:true) {
       q::before { content: "\"" }
       ul        { list-style-type: none }
   }
   @media clipboard and (richtext:false) {
       q::before { content: "\"" }
       ul	{ list-style-type: "*" }
   }

As it's configurable this should keep everyone happy. There are some  
quite interesting tricks that could be done with this too:

   @media clipboard {
       q::before  { content: "\"" }
       ul         { list-style-type: "*" }
       img	 { content:"[Image of " attr(alt) "]"; }
       a::after   { content:"[" attr(href) "]"; }
       div.header { display:none }
   }


Which would replace images with their "alt" tags, insert the URL of  
hyperlinks when copying text and prevent "header" divs from being  
copied at all.


Cheers... Mike



On 26 Apr 2007, at 10:54, Zoffix Znet wrote:

>
> On Thu, 2007-04-26 at 02:16 -0400, Barry Pannebaker wrote:
>
>> This does not solve the overall question of whether a UA should  
>> supply presentation markers, (quotation marks, asterisks for  
>> bullets, etc), when HTML is cut and pasted into plain text, but  
>> perhaps it will help with one of the most frequent problem  
>> instances, that of quotation marks.
>>
>> (I realize that if this passes muster here, it will also have to  
>> be submitted to an HTML list.)
>
> I think this will only complicate the copy/paste matter for the UA  
> since
> with <q> and <blockquote> elements the question is only "should the
> quotes from the <q> element be copy/pasted". With your proposal  
> however
> there is simply no way for the UA to know how many lines will by
> copy/pasted unless it would to keep the original number of lines.
>
> Personally, I agree that if the user sees the quotes in the original
> document it would be confusing and frustrating for him or her to see
> them vanish in the pasted version.
>
> -- 
> 	Thank you for your time.
>
>                Regards, Zoffix Znet
>
>         ( http://zoffix.com ,   http://haslayout.net )
>
>

Received on Thursday, 26 April 2007 11:24:10 UTC