incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric_Marcoux...@DMR.CA
Subject Tr :Re: [Proposal] inhibiting css properties in skin definition file
Date Wed, 05 Jul 2006 19:25:37 GMT
<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><DIV>Hello,</DIV><DIV>&nbsp;</DIV><DIV>We
would like to work on this improvement. Is there any comments about our suggestion ? If no,
then we will proceed as indicated below. Otherwise, please let us know.</DIV><DIV>_______________________________________<BR><BR>Eric&nbsp;Marcoux...<BR>Fujitsu
Consulting&nbsp;(<A href="http://www.fujitsu.com/ca/en/services/consulting/" target=blank>http://www.fujitsu.com/ca/en/services/consulting/</A><A
href="https://secure.dmr.com/go/www.dmrconseil.ca)" target=blank >)</A><BR>Member
of the quebec JUG (http://<A href="https://secure.dmr.com/go/www.javaquebec.org)" target=blank
>www.javaquebec.org)</A><BR><BR>Sun&nbsp;Certified&nbsp;Programmer&nbsp;for&nbsp;Java&nbsp;2&nbsp;Platform&nbsp;1.4<BR>Sun&nbsp;Certified&nbsp;Web&nbsp;Component&nbsp;Developer&nbsp;for&nbsp;J2EE<BR>Sun&nbsp;Certified&nbsp;Business&nbsp;Component&nbsp;Developer&nbsp;for&nbsp;J2EE<BR><DIV><BR></DIV><FONT
color=#990099>-----Réacheminé par Eric Marcoux-QC/DMR/CA le 05/07/2006 03:21PM -----<BR><BR></FONT><blockquote
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid;
MARGIN-RIGHT: 0px">Pour : adffaces-dev@incubator.apache.org<BR>De : Simon_Lessard@DMR.CA<BR>Date
: 03/07/2006 08:33AM<BR>cc: adffaces-dev@incubator.apache.org, mmarinschek@apache.org<BR>Objet
: Re: [Proposal] inhibiting css properties in skin definition file<BR><BR><FONT
face="Default Monospace,Courier New,Courier,monospace" size=2  >Hello,<BR><BR>I
just finished a project using ADF Faces and I have some insight to share <BR>about the
problems we had with the skin.<BR><BR>I like the inhitbit idea. However, I think
the semantic of overriding a <BR>selector should be modified. More specifically, let
examine the current <BR>ADF Faces behavior.<BR><BR>In Base skin definition
let say we have <BR><BR>someAlias:alias<BR>{<BR>&nbsp;color: red;<BR>}<BR><BR>.someSelector<BR>{<BR>&nbsp;-ora-rule-ref("selector:someAlias:alias");<BR>&nbsp;background-color:
blue;<BR>}<BR><BR>In customSkin.css we got<BR><BR><BR>.someSelector<BR>{<BR>&nbsp;color:
yellow;<BR>}<BR><BR>Then, the resulting CSS will use <BR><BR>.someSelector<BR>{<BR>&nbsp;color:
red;<BR>&nbsp;background-color: blue;<BR>}<BR><BR>Which is a very
odd behavior for two reason:<BR>It seems that the -ora-rule-ref get resolved after everything
else, thus <BR>overwriting style placed in the overriden selector.<BR>With inhibit,
you could suppress the background-color. However, I don't <BR>know if that's the best
solution. Let think in OOP: <BR>What happen when you override a method? The parent method
will never be <BR>called and thus, you'll never automatically inherit some treatment,
unless <BR>you do a call to super.methodName. <BR><BR>This would be, I believe,
the best way to work with the skin as well since <BR>you don't have to know what properties
are set by the parent. Considering <BR>it's planned to be able to extends any skin in
the future, I believe it <BR>will be hard for the framework users to know all the properties
they need <BR>to suppress from the parent at first because of automatic inheritance
of <BR>the parent skin's properties, they will have to execute the page and see <BR>the
result, which seems counter-intuitive and unproductive.<BR><BR>So, my suggestions
for the skin facility would be:<BR><BR>1) Add a new keyword like -super or -inherit
that would make the current <BR>selector inherit the properties defined by its parent<BR>2)
Add a -suppressProperty or -inhibit property to remove some items added <BR>by calling
a -super<BR>3) Add also a -suppressImport or -inhibitImport that would remove an <BR>-ora-rule-ref
from the parent.<BR>4) Give priority to the more specific over the more general relatively
to <BR>the imported aliases. That is:<BR><BR>Given we have 2 skins, parent.css
and child.css defining the following<BR><BR>parent.css<BR><BR>aliasParent:alias<BR>{<BR>&nbsp;someProperty1
: someValue1;<BR>&nbsp;someProperty2 : someValue2;<BR>&nbsp;someProperty3
: someValue3;<BR>}<BR><BR>aSelector<BR>{<BR>&nbsp;-ora-rule-ref("selector:
aliasParent:alias");<BR>&nbsp;someProperty1: someValue4;<BR>}<BR><BR>child.css<BR><BR>aliasChild:alias<BR>{<BR>&nbsp;someProperty2
: someValue5;<BR>}<BR><BR>aSelector<BR>{<BR>&nbsp;-super;<BR>&nbsp;-ora-rule-ref("selector:
aliasChild:alias");<BR>&nbsp;someProperty3 : someValue6;<BR>}<BR><BR>Then
the resulting CSS for the parent skin would use for selector <BR>aSelector:<BR>&nbsp;someProperty1
: someValue4;<BR>&nbsp;someProperty2 : someValue2;<BR>&nbsp;someProperty3
: someValue3;<BR><BR>and the resulting CSS for child skin would use:<BR>&nbsp;someProperty1
: someValue4;<BR>&nbsp;someProperty2 : someValue5;<BR>&nbsp;someProperty3
: someValue6;<BR><BR><BR><BR>Sounds good?<BR><BR><BR>Simon
Lessard<BR>DMR Conseil Inc. (<A href="http://www.dmrconseil.ca/"   target=blank>http://www.dmrconseil.ca</A>)<BR>Téléphone
: (418) 653-6881<BR><BR>Sun Certified Programmer for Java 2 Platform 1.4<BR><BR><BR><BR><BR>"John
Fallows" &lt;john.r.fallows@gmail.com&gt;<BR>2006-06-29 20:17<BR>Please
respond to adffaces-dev<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp;To:
&nbsp; &nbsp; adffaces-dev@incubator.apache.org, mmarinschek@apache.org<BR>&nbsp;
&nbsp; &nbsp; &nbsp;cc: <BR>&nbsp; &nbsp; &nbsp; &nbsp;Subject:
&nbsp; &nbsp; &nbsp; &nbsp;Re: [Proposal] inhibiting css properties in skin
<BR>definition file<BR><BR><BR>On 6/25/06, Martin Marinschek &lt;martin.marinschek@gmail.com&gt;
wrote:<BR>&gt;<BR>&gt; +1 for the proposal in a whole<BR>&gt;
+1 for using inhibit - I like it more than reset or null<BR><BR><BR>Agreed.
&nbsp;+1 proposal, +1 inhibit.<BR><BR>suggestion for ca new prefix-name: changing
ora to oam (org apache <BR>myfaces)<BR><BR><BR>Yes, this is another
part of the repackaging effort. &nbsp;Are we limited to 3<BR>chars here?<BR><BR>tc,<BR>-john.<BR><BR>regards,<BR>&gt;<BR>&gt;
Martin<BR>&gt;<BR>&gt; On 6/24/06, Jeanne Waldman &lt;jeanne.waldman@oracle.com&gt;
wrote:<BR>&gt; &gt;<BR>&gt; &gt; Hi there,<BR>&gt; &gt;<BR>&gt;
&gt;<BR>&gt; &gt; I have another skinning proposal. This is a useful feature
that is in<BR>&gt; &gt; xss that I think we should port to skinning css. It
is the css <BR>property<BR>&gt; &gt; resetting feature.<BR>&gt;
&gt;<BR>&gt; &gt; A bit of background first. Trinidad defines a base skin.
We call this<BR>&gt; &gt; skin 'simple'. It defines basic, simple css properties
for the <BR>Trinidad<BR>&gt; &gt; components. An application developer
can create a skin, and this<BR>&gt; &gt; automatically extends the simple skin.
Think of the simple skin as a<BR>&gt; &gt; base class in Java. You can extend
one skin from another, but they are<BR>&gt; &gt; all derived from the base skin.<BR>&gt;
&gt;<BR>&gt; &gt; When a skin extends the base skin, it is ADDING style
properties to <BR>the<BR>&gt; &gt; base skin's style properties.<BR>&gt;
&gt;<BR>&gt; &gt; Let's say the base skin defines the font-size for the<BR>&gt;
&gt; af|inputText::label selector. This means that your skin will inherit<BR>&gt;
&gt; this font. Your skin can redefine font-size, and put a new font-size<BR>&gt;
&gt; instead. But currently, you can't say, "I don't want any font-size<BR>&gt;
&gt; specified on af|inputText::label".<BR>&gt; &gt;<BR>&gt; &gt;
I'm proposing that we come up with a skinning syntax that allows the<BR>&gt; &gt;
person writing a skin to do this.<BR>&gt; &gt;<BR>&gt; &gt; We
have this feature in the .xss syntax. In .xss, you'd do this:<BR>&gt; &gt;<BR>&gt;
&gt; &lt;style name="foo" resetProperties="true"/&gt;<BR>&gt; &gt;
or to reset one property, you'd do this:<BR>&gt; &gt; &lt;style name="foo"&gt;<BR>&gt;
&gt; &nbsp; &nbsp; &nbsp;&lt;property name="font-size"/&gt;<BR>&gt;
&gt; &lt;/style&gt;<BR>&gt; &gt;<BR>&gt; &gt; How
could we do this in css-syntax?<BR>&gt; &gt;<BR>&gt; &gt; One
proposal is to add a special property like our '-ora-rule-ref'<BR>&gt; &gt;
property. (by the way, we'll need another discussion on whether to<BR>&gt; &gt;
change the -ora- prefix, and what to change it to).<BR>&gt; &gt;<BR>&gt;
&gt; Here is a proposal:<BR>&gt; &gt;<BR>&gt; &gt; .foo {-ora-inhibit:
all}<BR>&gt; &gt; .bar {-ora-inhibit: text-align font-size color} // inhibit/reset/null<BR>&gt;
&gt; out these specific properties<BR>&gt; &gt;<BR>&gt; &gt;
Let me know what you think.<BR>&gt; &gt;<BR>&gt; &gt; Thanks,<BR>&gt;
&gt; Jeanne<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt;
&gt;<BR>&gt;<BR>&gt;<BR>&gt; --<BR>&gt;<BR>&gt;
<A href="http://www.irian.at/" target=blank  >http://www.irian.at</A><BR>&gt;<BR>&gt;
Your JSF powerhouse -<BR>&gt; JSF Consulting, Development and<BR>&gt;
Courses in English and German<BR>&gt;<BR>&gt; Professional Support for
Apache MyFaces<BR>&gt;<BR>&gt;<BR><BR><BR>-- <BR><A
href="http://apress.com/book/bookDisplay.html?bID=10044" target=blank  >http://apress.com/book/bookDisplay.html?bID=10044</A><BR>Author:
Pro JSF and Ajax: Building Rich Internet Components, Apress<BR><BR></FONT></blockquote><br></DIV></FONT>
Mime
View raw message