2012-10-22 19:50, Philip TAYLOR wrote:
<SPAN class="Apparatus referentium" style="content: 'Set: 1; parts: 2'">I use it because (a) it is permitted (i.e., it is in accordance with the specification and therefore validates, yet has no effect on the rendered output in any conforming browser),
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.
and (b) because it is a reliable way of passing information into the DOM which I can later retrieve in order to affect the processing of the data.
You are effectively using the 'style' attribute as a carrier for application-specific data, not for making presentational suggestions. So I would classify this as a hack and kludge. 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.
In this particular case I tag two (or more) disjoint spans with the same style/content information to allow client-side scripting
Without knowing exactly how the data is to be used, I'd say that this might be handled using a 'class' attribute, too.
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.
Yucca ______________________________________________________________________ css-discuss [[email protected]] 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/
