see inline for some random thoughts. :) I'm glad you brought this up, because I need to come up with a solution soon for our internal project that we are working on so that our developers can write their renderers correctly.

[EMAIL PROTECTED] wrote:

Hello all,

I raised that issue a while back, but now it's a bit more important since I'm trying to finalize ADFFACES-49 issue. What selector synthax do you prefer for states:
1.1. <component>::<subPart>:<state>
1.2. <component>:<state>::<subPart>.
We use both syntaxes, and they mean different things.

1.1 means this: The subPart of the component  is in this state.
For example:
af|train::stop:disabled (when this train's stop is disabled, then style the stop like this) af|train:disabled::stop (when the entire train is disabled, style all the stops like this)

1.2 means this: The component is in this state, and this is the subpart.
For example:
af|inputText:disabled::content (when the af:inputText disabled="true", then style the content piece like this)

I prefer the former and it's easier to implement. However, we already have some :disabled that use the latter synthax.

Secondly, there's also the issue raised by Jeanne, how should we manage which states are intercepted and which should pass through and be copied in the final CSS: 2.1. Use a component specific list, so that :disabled could pass through for some components but get intercepted for some others? If that solution is selected, how/where should we configure that list, in the faces-config's metadata?
I like this one the best because let's say I use :disabled and I intercept it and do some funky things with it. Then let's say I decide that the css spec deals
with :disabled perfectly fine, and I don't need to intercept it.
Also, let's say :hover and :active work great on some dom elements, but do they work for everything?
Let's say I have this: <span class="myText">Hello!</span> and this css:
.myText {color: black}
.myText:hover {color:red}
Does this work? (not in my tests)

But what if this represents a component. I might want them to be able to specify .myText:hover and have it work even if the built-in browser support wasn't there.
So I would want
af|myComponent:hover to work.
I'd render this
<span class="af_myComponent p_AFHover">Hello!</span>
when they are hovering over my span.


2.2. Use a list of pseudo-classes passing through for all components. Such list would have to be based on W3C, but as Jeanne observed, such list would break our :disabled that we're intercepting currently and could lead to som.e problems if more pseudo-classes are added in future version of CSS.
Yes, I'd have to change the name of :disabled. But so far that is the only css valid pseudo-class that I use to date. We have others like :hover (see above... if we don't want this to pass through, we'll need to change it to something else).

2.3. Use a static list of pseudo-classes to intercept used by all components? If so, where should we place it? This solution probably has the same flaws as 2.2 if a new pseudo-classes i nthe CSS specification matches a name defined in the intercept list. 2.4. Use a prefix for intercepted pseudo-classes like the -ora- used for properties?
I like this second best. If we did this, then I'd suggest that we also prefix the pseudo-elements. The problem is, taking my :hover example, some components might be rendered such that the browser automatically works with :hover on the generated css, but others don't, so those that don't have to have
:-tri-hover ?


My votes are:
+1 for 1.1
+1 for 2.2, but I would not place states resolvable during rendering in that list, so that disabled is still intercepted.

Reply via email to