Re: [css-d] ::first-word pseudo-element (and other pseudo-ideas)

2010-12-11 Thread Freelance Traveller
On Sat, 11 Dec 2010 15:24:52 -0800, Rick Gordon 
wrote:

>Understandably, sensitivities concerning ethnocentricity can be 
>triggered within such a discussion, but how about:

>1) A definition which will work among the greatest majority of 
>linguistic cases -- languages that have a commonly accepted range of 
>word delimiters (which I think might include all European and Semitic 
>languages, or other languages written with Roman/Cyrillic/Greek/Semitic 
>alphabets), and make that a default, which might be finessed with an 
>explicit language tag, which might modify the default delimiter list.

An explicit declaration of the language would, in my opinion, be a good
idea on general principles. Admittedly, I don't do it on my own pages,
but I *can* see where an explicit language setting might make it easier
for rendering engines or other programs that might want to process text
in language-relevant ways to make appropriate assumptions regarding how
the source language data should be interpreted.

>2) Allow for the use of specific word-break and work-inclusion tags that 
>would work in any lingusitic context, or where an override is required.

For this, Unicode points 8203 and 8204, the zero-width space and the
zero-width non-joiner, might be possible candidates.  Add these to the
list of allowed "word" delimiters, and existing algorithms need not be
significantly modified.

In any case, the problem becomes getting people to use such tools
consistently; in the messages that Gabriele quoted, Thai was explicitly
mentioned, and it is simply not "natural" for a native Thai speaker/
writer to think in terms of breaking up his/her writing into discrete
words, even with something like the zwnj.  I don't believe that Thai is
unique in that respect; the same may be true of many Southeast Asian,
East Asian, and *nesian languages that have not adopted western or
Indian scripts.


-- 
Jeff Zeitlin, Editor
Freelance Traveller
The Electronic Fan-Supported
Traveller® Fanzine and Resource

edi...@freelancetraveller.com
http://www.freelancetraveller.com
http://come.to/freelancetraveller
http://freelancetraveller.downport.com/



®Traveller is a registered trademark of
Far Future Enterprises, 1977-2009. Use of
the trademark in this notice and in the
referenced materials is not intended to
infringe or devalue the trademark.

Freelance Traveller extends its thanks to the following
enterprises for hosting services:

CyberNET Web Hosting (http://www.cyberwebhosting.net)
The Traveller Downport (http://www.downport.com)
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] ::first-word pseudo-element (and other pseudo-ideas)

2010-12-11 Thread Rick Gordon
Understandably, sensitivities concerning ethnocentricity can be triggered 
within such a discussion, but how about:

1) A definition which will work among the greatest majority of linguistic cases 
-- languages that have a commonly accepted range of word delimiters (which I 
think might include all European and Semitic languages, or other languages 
written with Roman/Cyrillic/Greek/Semitic alphabets), and make that a default, 
which might be finessed with an explicit language tag, which might modify the 
default delimiter list.

2) Allow for the use of specific word-break and work-inclusion tags that would 
work in any lingusitic context, or where an override is required.

Rick Gordon

--

On 12/11/10 at 11:13 PM +0100, Gabriele Romanato wrote in a message entitled
"[css-d] ::first-word pseudo-element (and other pseudo-ideas":

>I'm following an interesting discussion on www-style about new ideas for new 
>pseudo-elements in CSS3. Latest entries concern the ::first-word 
>pseudo-element. I quote the most relevant ones:
>
>--
>
>Pierre Bertet wrote:
>
>>But the ::first-letter already do this, defining a "letter", wich is
>>not very clear too. To clarify this, the CSS3 Selectors spec refers to
>>the Unicode Standard Annex #29 [1].
>>This document seems very complex to me, but it also contains a "Word
>>Boundaries" section, which seems to defines exactly that.
>
>>So my questions are:
>>This section could it not be used to clarify what a "word" is?
>
>The extensive caveats in the notes to that section of TUS Annex #29 would need 
>to be taken into account. Word boundary identification needs to be tailored 
>for many languages, and the basic Unicode mechanism only aims to provide 'as 
>workable a default as possible'.
>
>Words -- and syllables, which present similar issues for selecting appropriate 
>text elements for styling -- are units of spoken language that may or may not 
>be easily isolated as units in written language, depending on particular 
>writing systems as applied to particular languages. In some systems, e.g. 
>Thai, word selection is only possible with dictionary support.
>
>
>
>So the point is that it doesn't exist a clear definition of word (in its 
>textual representation, but, ouch, also in linguistics) and for that reason 
>this proposal has been rejected. But there are other interesting ideas of this 
>sort, such as:
>
>1. nth-line()
>Pseudo-class. It should select the nth-line of a block. But is there a 
> definition of line that could be accepted?
>
>2. nth-word()
>Pseudo-class. See the objections above.
>
>
>The point is that we all have good ideas and hints on CSS, but the sad truth 
>is that on www-style they don't pass the first reader comments.
>Anyway, I encourage you on following these discussions because there's always 
>something new to learn.
>
>Good night, (my time, Rome CET)
>
>G. :-)
>
>http://www.css-zibaldone.com
>http://www.css-zibaldone.com/test/  (English)
>http://www.css-zibaldone.com/articles/  (English)
>http://onwebdev.blogspot.com/  (English)
>
>
>
>
>
>
>
>
>__
>css-discuss [cs...@lists.css-discuss.org]
>http://www.css-discuss.org/mailman/listinfo/css-d
>List wiki/FAQ -- http://css-discuss.incutio.com/
>List policies -- http://css-discuss.org/policies.html
>Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


-- 
___

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___

WWW:   http://www.shelterpub.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-11 Thread Tim Climis
On Saturday, April 11, 2009 8:11:32 am you wrote:
> I would use a  - OR -  it's a bit of a stretch for a definition
> list, but how about:
>
> 
>Question or name(s) here:
>Answer or reply here
>Question or name(s) here:
>Answer or reply here
> 
>

I'm actually doing that right now.  I agree that it's a little bit of a 
stretch, but I think a case can be made for it. The question in how to 
identify the speaker in the   And I'm leaning toward span for the same 
reason.

My code looks something like:


  Question?
  
Person 1:answer
Person 2:answer
  


> You could use a CSS background image for "Q" and "A":
> dt { font-weight: bold; background-image: url(path/to/Q.gif); }
> dd { background-image: url(path/to/A.gif); }
>

That only works for the Q: and A:, but not the Kirsten and Neal that started 
the problem in the first place.

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-11 Thread Jono
Climis, Tim wrote:
>> ...you might just as well introduce  or  (or some other inline 
>> element, to be styled), and 
>> then you would not need to create an extra line break.
>>
>> No pure CSS solution (i.e. an approach that does not require any added 
>> markup to separate the first line from the rest of the content) is possible.
>> 
> That's sort of what I thought.  So  or  it is.  I haven't 
> decided which I like better for semantic purposes yet.
>   
I would not use  unless that text is intended to convey 
additional meaning and/or emphasis.  Some screen readers will read 
text inside of strong tags with emphasized pitch as if 
excited.  In this case,  I do not think that would be helpful, it's a 
simple Q & A so no emphasis is really needed for either.

I would use a  - OR -  it's a bit of a stretch for a definition 
list, but how about:


   Question or name(s) here:
   Answer or reply here
   Question or name(s) here:
   Answer or reply here


You could use a CSS background image for "Q" and "A":
dt { font-weight: bold; background-image: url(path/to/Q.gif); }
dd { background-image: url(path/to/A.gif); }

Or, you could simply place the 'Q' and 'A' in the HTML:

   Q: Question or name(s) here:
   A: Answer or reply here
   Q: Question or name(s) here:
   A: Answer or reply here


Semantically, it's debatable.  Markup-wise, it's much cleaner.

-- 

*JONO YOUNG*
Designer | Developer | Illustrator
//

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-10 Thread Climis, Tim
> Besides, if you can and wish to add extra markup, you might just as well 
> introduce  or  (or some other inline element, to be styled), and 
> then you would not need to create an extra line break.
>
> No pure CSS solution (i.e. an approach that does not require any added 
> markup to separate the first line from the rest of the content) is possible.

That's sort of what I thought.  So  or  it is.  I haven't decided 
which I like better for semantic purposes yet.

---Tim
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-10 Thread Jukka K. Korpela
Divya Manian wrote:

> You can try using :first-line [1]. Probably use a  to separate
> the lines? Not sure if it will work though (Certainly not semantic!).

It would work technically well (:first-line has been in CSS since CSS 1.0 
and is widely supported), but introducing an extra line break would be an 
odd way to deal with bolding. Moreover, in that approach, the colon ":" 
after the word would get styled too, and the question was about styling the 
first word only.

Besides, if you can and wish to add extra markup, you might just as well 
introduce  or  (or some other inline element, to be styled), and 
then you would not need to create an extra line break.

No pure CSS solution (i.e. an approach that does not require any added 
markup to separate the first line from the rest of the content) is possible.

If you can affect the JavaScript code for the page, then you could probably 
write a relatively simple piece of JavaScript that traverses the document, 
modifies the structure by adding elements for the first words, and assigns 
style properties to them as desired.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-09 Thread Divya Manian
On 4/9/09 3:35 PM, "David Laakso"  wrote:

> Climis, Tim wrote:
>> I've got a newsletter that includes interviews in a Q and A format.
>> 
>> Usually, there's a question with a "Q:" in front of it, and then an answer
>> with an "A:".  But I just discovered an interview with two people that goes:
>> "Q:" "Neal:" "Kirsten:"
>> 
>> My stylesheet currently uses :first-letter to style the Q and A.  But that
>> just styles the N and K on Neal and Kirsten, and what I'd really like to do
>> is style the whole word.
>> 
>> A "first-word" pseudo element would work perfectly in all my cases, but it
>> appears that there is no :first-word pseudo element.  Is there some trick I
>> can use as a substitute?
>> 
>> ---Tim Climis


You can try using :first-line [1]. Probably use a  to separate the
lines? Not sure if it will work though (Certainly not semantic!).


[1] http://reference.sitepoint.com/css/pseudoelement-firstline


__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-09 Thread David Laakso
Climis, Tim wrote:
> I've got a newsletter that includes interviews in a Q and A format.
>
> Usually, there's a question with a "Q:" in front of it, and then an answer 
> with an "A:".  But I just discovered an interview with two people that goes: 
> "Q:" "Neal:" "Kirsten:"
>
> My stylesheet currently uses :first-letter to style the Q and A.  But that 
> just styles the N and K on Neal and Kirsten, and what I'd really like to do 
> is style the whole word.
>
> A "first-word" pseudo element would work perfectly in all my cases, but it 
> appears that there is no :first-word pseudo element.  Is there some trick I 
> can use as a substitute?
>
> ---Tim Climis
>
>
>
>   


Not with CSS at the moment.
An html substitute might be:
name
css might read:
b {color:red; text-transform: uppercase;font-weight:normal;}
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] :first-word?

2009-04-09 Thread Bill Brown
Climis, Tim wrote:
> I've got a newsletter that includes interviews in a Q and A format.
> 
> Usually, there's a question with a "Q:" in front of it, and then an
> answer with an "A:".  But I just discovered an interview with two
> people that goes: "Q:" "Neal:" "Kirsten:"
> 
> My stylesheet currently uses :first-letter to style the Q and A.  But
> that just styles the N and K on Neal and Kirsten, and what I'd really
> like to do is style the whole word.
> 
> A "first-word" pseudo element would work perfectly in all my cases,
> but it appears that there is no :first-word pseudo element.  Is there
> some trick I can use as a substitute?

This depends on the context.
Do you have any links to a sample or maybe even a hint as to the HTML 
used for this example?

-- 

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/