By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 1,922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

adding commas to quote elements

P: n/a
<style type="text/css">
q:after{content:',"'}
</style>

<q>This will be the shame of CSS</q> claimed Marek Mänd and added that
<q>consumers expect to create generated content via CSS where there
would be no comma right after HERE</q>
Jul 21 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On Sat, 30 Oct 2004 23:15:05 +0300, Marek Mänd <ca********@mail.ee>
wrote:
<style type="text/css">
q:after{content:',"'}
</style>

<q>This will be the shame of CSS</q> claimed Marek Mänd and added that
<q>consumers expect to create generated content via CSS where there
would be no comma right after HERE</q>


It's too late in the evening for riddles; what are you getting at?

--
Rex
Jul 21 '05 #2

P: n/a
Jan Roland Eriksson wrote:
On Sat, 30 Oct 2004 23:15:05 +0300, Marek Mänd <ca********@mail.ee>
wrote:
<style type="text/css">
q:after{content:',"'}
</style>
<q>This will be the shame of CSS</q> claimed Marek Mänd and added that
<q>consumers expect to create generated content via CSS where there
would be no comma right after HERE</q>

It's too late in the evening for riddles; what are you getting at?

I want comma added before "claimed" but not comma added after HERE.
I dont want to use classnames.
If after quote end tag there is no opening tag, but a textnode
I want to add comma so it becomes

"This will be the shame of CSS," claimed

If after quote end tag there is no texnode following,
or there is a closing tag of the outer element or
there is new opening tag
I want to add fullstop. And fullstop after the "-quotes
but comma inside the "-quotes.

And do that with css generated content. That the browser itsself will
have the intelligence to add commas for me.

I think this is far beyound the capabilities of css but I need
confirmation for that.
Jul 21 '05 #3

P: n/a
Marek Mänd <ca********@mail.ee> wrote:
Jan Roland Eriksson wrote:
On Sat, 30 Oct 2004 23:15:05 +0300, Marek Mänd <ca********@mail.ee>
wrote:
<style type="text/css">
q:after{content:',"'}
</style>
<q>This will be the shame of CSS</q> claimed Marek Mänd and added that
<q>consumers expect to create generated content via CSS where there
would be no comma right after HERE</q> It's too late in the evening for riddles; what are you getting at?

I want comma added before "claimed" but not comma added after HERE.


So put in a comma.
I dont want to use classnames.
If after quote end tag there is no opening tag, but a textnode
I want to add comma so it becomes

"This will be the shame of CSS," claimed

If after quote end tag there is no texnode following,
or there is a closing tag of the outer element or
there is new opening tag
I want to add fullstop. And fullstop after the "-quotes
but comma inside the "-quotes.

And do that with css generated content. That the browser itsself will
have the intelligence to add commas for me.
Commas in quotations aren't any more a function of CSS than commas
anywhere else, or any other punctuation marks. I suspect that you're
getting the idea that it *would* be from what you've read about using
CSS for the quotation marks, but *that* was really just a bunch of
silliness in the first place. If markup and CSS were appropriate for
punctuation, then HTML ought to have contained the full compliment of
structural elements that involve punctuation: <sentence>,
<relative-clause>, <exclamation>, etc. To have just one construct
that's supposed to automate the punctuation for you, while leaving the
rest of it to be handled directly in the text, was absurd.

I think this is far beyound the capabilities of css but I need
confirmation for that.


It is.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 21 '05 #4

P: n/a
On Sun, 31 Oct 2004 02:40:29 +0300, Marek Mänd <ca********@mail.ee>
wrote:
Jan Roland Eriksson wrote:
On Sat, 30 Oct 2004 23:15:05 +0300, Marek Mänd <ca********@mail.ee>
wrote:
<style type="text/css">
q:after{content:',"'}
</style>
<q>This will be the shame of CSS</q> claimed Marek Mänd and added that
<q>consumers expect to create generated content via CSS where there
would be no comma right after HERE</q>
It's too late in the evening for riddles; what are you getting at?

I want comma added before "claimed" but not comma added after HERE.


So, use appropriate markup that will parse itself into a usable
structure for your stylesheet to work on.

This, what you are asking about (now), is as simple as pi.

--
Rex
Jul 21 '05 #5

P: n/a
"Marek Mänd" <ca********@mail.ee> wrote in
comp.infosystems.www.authoring.stylesheets:
I want comma added before "claimed" but not comma added after HERE.
I dont want to use classnames.


And you shouldn't. The comma is content, not presentation. If it
belongs in your text, it belongs in your text _not_ slipped in by
CSS.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 21 '05 #6

P: n/a
Marek Mänd <ca********@mail.ee> wrote:
q:after{content:',"'}


In addition to the issue of adding commas or full stops or whatever
(which you could handle by using classes, thereby creating extra
complication into the markup), it is remarkable how people manage to add
_wrong_ quotation marks when they try to use <q> and generated content.

The Ascii quotation mark " is not a correct quotation mark in English, or
in any other human language. It has been used for some decades due to the
restrictions imposed by typewriters and early computers, but why would
you use elaborated modern techniques to generate the dull and wrong
Ascii quotation marks? You can use them much simpler, and much more
reliably simply by typing them into document content, as you type commas,
full stops, semicolons, quotation marks, and other punctuation - no need
to rely on CSS _and_ on support to the <q> element (which is being phased
out in XHTML 2.0, by the way).

It's not just a matter of casual mistakes, or a matter of simplistic
examples. Even the CSS 2.0 specification, and even the CSS 2.1 draft (or
"proposed recommendation", if you wish to make it sound more official),
the examples (using the quotes property, but this is a technicality)
manages to get _both_ examples (English and Norwegian) wrong
( http://www.w3.org/TR/CSS21/generate.html#quotes-specify ).
So if _they_ get this all wrong, authors can hardly be expected to do
much better.

Summary: Don't do quotes in CSS. If you don't know orthography and
typography, use Ascii quotation marks " (and Ascii apostrophes ' as
single quotation marks) throughout. If you do, write the correct
quotation marks into HTML documents in a suitable manner, such as
directly utf-8 encoded data, or character references, or (in some cases)
as entity references. But make sure you know the correct punctuation;
check it from reliable references. And don't do quotes in CSS.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 21 '05 #7

P: n/a
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in
comp.infosystems.www.authoring.stylesheets:
The Ascii quotation mark " is not a correct quotation mark in English, or
in any other human language.
I disagree.
Summary: Don't do quotes in CSS.


I agree.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 21 '05 #8

P: n/a
Marek Mänd wrote:
<style type="text/css">
q:after{content:',"'}
</style>

<q>This will be the shame of CSS</q> claimed Marek Mänd


Sadly for Marek Mänd, noone else really cared that s/he didn't like CSS.
Some even wondered if s/he was just trolling a little more, desperate to
start a "css sucks"/"no it doesn't" fight.

--
Brian (remove "invalid" to email me)
Jul 21 '05 #9

P: n/a
in comp.infosystems.www.authoring.stylesheets, =?ISO-8859-
1?Q?Marek_M=E4nd?= wrote:
<style type="text/css">
q:after{content:',"'}
</style>

<q>This will be the shame of CSS</q> claimed Marek Mänd and added that
<q>consumers expect to create generated content via CSS where there
would be no comma right after HERE</q>


Your example is just plain stupid.

Make another example, using some form of XML intended for marking up
sentences and and subsentences, which are in HTML covered by , . etc.

Anyway, as said long ago, just becase CSS can't do everything, it is not
a failure. Just like you, you can't do everything, but you are not
failure.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 21 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.