Jukka K. Korpela wrote:

In any browser that conforms to the CSS 2.1 specification, yes. But
browsers are increasingly deviating from CSS 2.1 here, allowing at least
a url(...) value. I think it is an unnecessary risk to rely on a CSS 2.1
principle that was really meant to say just that in CSS 2.1, the
'content' property applies to ':before' and ':after' pseudoelements only.

Well, that is not what the prose says, but each must interpret the
prose as he or she sees fit ...

You are effectively using the 'style' attribute as a carrier for
application-specific data, not for making presentational suggestions.

I agree.

So
I would classify this as a hack and kludge.

I would reluctantly agree.  But no better option appeared to present
itself; "title" was an option, but there was a distinct risk that
a browser would present the contents thereof as a tooltip, and no
way of overriding that behaviour in CSS of which I was aware.

There is a better option,
especially designed for such purposes: data-* attributes; though
formally still just part of the HTML5 draft, they can be freely used, as
they require no special support in browsers.

If they were in the HTML 4.01 specification (even the transitional
version), I would use them without compunction.  But I am not willing
even to consider using anything from HTML 5 unless and until it becomes
a full W3C specification.  To base work that we hope will still be of
use and interest in fifty years time on a specification that is no
more than a work-in-progress would strike me as close to evidence of
certifiable insanity.

Without knowing exactly how the data is to be used, I'd say that this
might be handled using a 'class' attribute, too.

Unfortunately the contraints placed on syntactically valid values
for the "class" attribute would prevent me from presenting the
data in a semantically transparent manner : I /want/ to express
the concept 'Set: 1; parts: 2' and not have to elide this into
a horror such as "Set1parts2" (or even the somewhat less objectionable
"Set1 parts2" which multiple classes would allow).

I have coerced Opera into behaving acceptably by adding an !important
style rule in the <HEAD> region.

Whenever !important seems to be the solution, it's time to reconsider
the problem.

I have never had to use !important before, I hope never to have to use
it again, but if it is both necessary and sufficient in order to
coerce Opera into behaving in a conformant manner I am willing to use
it.  And this will also have the beneficial side-effect of future-
proofing the code should browser rendering behaviour cease to be
CSS 2.1 conformant in the future, as you predict in your opening words.

Philip Taylor
______________________________________________________________________
css-discuss [css-d@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/

Reply via email to