myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanne Waldman <jeanne.wald...@oracle.com>
Subject Re: [Trinidad] Skining - strange default value in: base-desktop.xss
Date Thu, 16 Aug 2007 19:42:20 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Simon,<br>
This should be true. If it isn't, it is a bug.<br>
<br>
- Jeanne<br>
<br>
Simon Lessard wrote:
<blockquote
 cite="mid254acf980708160551n39ba1165vf32b848caf559b12@mail.gmail.com"
 type="cite">Hello Cristi,<br>
  <br>
Although maybe we should deal with that issue, they way you used skin
additions is not what it was meant to be at first. Normally skin
additions should be used to extend the selector set of another existing
skin, like when adding new components, not CSS splitting. Therefore,
skin additions should not be overlapping most of the times. There might
still be an issue if we have the following case:
  <br>
  <br>
  <span style="font-family: courier new,monospace;">SimpleSkin +++++
SimpleSkinAddition</span><br style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; |</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; |</span><br
 style="font-family: courier new,monospace;">
  <span style="font-family: courier new,monospace;">CustomSkin +++++
CustomSkinAddition<br>
  <br>
  </span>In that case, CustomSkinAddition should indeed have priority
over SimpleSkinAddition. That being said, I would not be all against
allowing SkinAddition to be used for file splitting.
  <br>
  <br>
  <br>
Regards,<br>
  <br>
~ Simon<br>
  <br>
  <br>
  <div><span class="gmail_quote">On 8/15/07, <b
 class="gmail_sendername">Cristi Toth</b> &lt;<a
 href="mailto:cristi.toth@gmail.com">cristi.toth@gmail.com</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;"><span
 class="gmail_quote"></span><span>Hi Jeane!<br>
    <br>
The problem is that I need to split the skin style-sheet into more files<br>
because it's getting huge and harder to maintain<br>
So I'm using skin-additions.
    <br>
    </span>And the property from the skin-addition is always overriden
by the base skin.
    <br>
I really think that the skin-addition should have the same priority as
the skin-extension<br>
    <br>
here's a snippet from my trinidad-skins file:<br>
    <span style="font-family: courier new,monospace;">&lt;skins xmlns="
    <a href="http://myfaces.apache.org/trinidad/skin" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">http://myfaces.apache.org/trinidad/skin</a>"&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&lt;skin&gt;
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&lt;id&gt;aaadesktop&lt;/id&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&lt;family&gt;aaa&lt;/family&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&lt;render-kit-id&gt;org.apache.myfaces.trinidad.desktop&lt;/render-kit-id&gt;
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&lt;style-sheet-name&gt;css/aaa.css&lt;/style-sheet-name&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; &lt;/skin&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&lt;skin-addition&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&lt;skin-id&gt;aaa.desktop&lt;/skin-id&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&lt;style-sheet-name&gt;css/layout.css&lt;/style-sheet-name&gt;
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&lt;/skin-addition&gt;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&lt;/skins&gt;</span><br>
    <br>
and here's a piece from the skin-addition's style sheet:<br>
    <font size="2"><span style="font-family: courier new,monospace;">general-block
{</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
padding: 0px;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
margin: 0px;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
border: 0px;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">base-block {</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-rule-ref:
selector("AFMediumBackground:alias");
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-rule-ref:
selector("AFDefaultFontFamily:alias");</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-rule-ref:
selector("AFDefaultFont:alias");</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-rule-ref:
selector("general-block");
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
width: 100%;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
height: 100%;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">html {</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-rule-ref:
selector("base-block");</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">body&nbsp; {</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-rule-ref:
selector("base-block");</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
-tr-inhibit:
margin-top;
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
overflow:
hidden;</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}<br>
    <br>
    </span></font><font size="2">and here's a piece from the generated
CSS:<br>
    <br>
    <span style="font-family: courier new,monospace;">general-block
{padding:0px;margin:0px;border:0px}</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">base-block,html
{background-color:#EBF0F5;font-family:Arial, Helvetica,
sans-serif;font-weight:normal;font-size:12px;padding:0px;margin:0px;border:0px;width:100%;height:100%}
    </span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">body
{background-color:#EBF0F5;font-family:Arial, Helvetica, sans-serif;
font-weight:normal;font-size:12px;padding:0px;margin:0px;border:0px;width:100%;height:100%;overflow:hidden;
    <span style="font-weight: bold;">margin-top:8px</span>}</span><br
 style="font-family: courier new,monospace;">
    </font><br>
thanks for help!<span class="q"><span><br>
Cristi Toth<br>
    <br>
-------------<br>
Codebeat<br>
    <a href="http://www.codebeat.ro" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">www.codebeat.ro</a><br>
    <br>
    <br>
    <br>
    <br>
    </span></span>
    <div><span class="e" id="q_1146befec5d771ca_2">
    <div><span>
    <div><span class="gmail_quote">On 8/15/07, <b
 class="gmail_sendername">Jeanne Waldman</b> &lt;<a
 href="mailto:jeanne.waldman@oracle.com" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">
jeanne.waldman@oracle.com</a>&gt; wrote:</span>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
      <div bgcolor="#ffffff" text="#000000"><font
 face="Times New Roman, Times, serif">Can you send me a simple
test case for this scenario so I can see if it is a bug or you are not<br>
implementing it correctly.<br>
      <br>
What should be happening is we read the base skin in and merge in the
skin extension after.<br>
The skin extensions css properties take precedence. They extend the
base skin's properties.<br>
      <br>
When we write out the css-2 stylesheet, we have a performance step
where we group all the<br>
selectors with the same css properties together. This will then appear
to be reordering the properties.<br>
      <br>
      </font>
      <pre><font face="Times New Roman, Times, serif" size="+1">Instead of the
selectors being generated in the order you wrote them:
.af_foo {font-size: 8px; color: red; font-weight: bold; font-style: italic; font-family: Tahoma}



.af_bar {font-size: 12px; color: black; border-width: 1px}
.af_zoo {font-size: 8px; color: red; font-weight: bold; font-style: italic; font-family: Tahoma}
.af_xyz {color: red}
.af_abc {font-size: 12px; color: black; border-width: 1px}




You'll see them grouped together:
.af_foo, .af_zoo {font-size: 8px; color: red; font-weight: bold;font-style: italic; font-family:
Tahoma}
.af_bar, .af_abc {font-size: 12px; color: black; border-width: 1px}



.af_xyz {color: red}</font></pre>
      <span><br>
      <br>
- Jeanne</span>
      <div><span><br>
      <br>
Cristi Toth wrote:
      <blockquote
 cite="http://mid5aca2d400708091607p1f5c531eq3ef5ef17e397dcd2@mail.gmail.com"
 type="cite">My problem is even bigger :(<br>
as Simon Lessard already noticed in StyleSheetDocument, on line 477<br>
the method: <span style="font-family: courier new,monospace;">private
StyleNode _resolveStyle(...)</span>&nbsp; is really buggy <br>
        <br>
The problem is that it takes all the style definitions of a selector /
element in a 'random' order <br>
and the properties in the first instances are being overwritten by the
same properties from the later instances <br>
This is not good...<br>
At least it would have been ... ok, if the definitions from the skin
extension style-sheet would have been last<br>
but in my example, the base-desktop.xss seems to be last,<br>
so even if I inhibit the annoying { margin-top: 8px }&nbsp; property in the
skin, <br>
it is still overwritten by the instance in base-desktop.xss, which is
last (so it has greater priority)<br>
        <br>
This is serious trouble<br>
and I don't know how to override this behavior in my current project!
(I can't wait for a snapshot fix) <br>
Can anybody suggest some solution?<br>
        <br>
Is there an issue on this problem ?<br>
        <br>
thanks,<br>
Cristi Toth<br>
        <br>
-------------<br>
Codebeat<br>
        <a href="http://www.codebeat.ro" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">www.codebeat.ro</a><br>
        <br>
        <br>
        <div><span class="gmail_quote">On 8/10/07, <b
 class="gmail_sendername">Cristi Toth</b> &lt;<a
 href="mailto:cristi.toth@gmail.com" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">cristi.toth@gmail.com
        </a>&gt;
wrote:</span>
        <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">Hi!<br>
          <br>
I found a strange default value for IE browser: <span
 style="font-weight: bold;">body</span> { margin-top: 8px } in
base-desktop.xss<br>
on line 3943:<br>
          <br>
          <span style="font-family: courier new,monospace;">&lt;styleSheet
browsers="ie"&gt; </span><br
 style="font-family: courier new,monospace;">
          <span style="font-family: courier new,monospace;">&nbsp; </span><br
 style="font-family: courier new,monospace;">
          <span style="font-family: courier new,monospace;">&nbsp; &lt;style
selector="body"&gt; </span><br
 style="font-family: courier new,monospace;">
          <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&lt;property
name="margin-top"&gt;8px&lt;/property&gt;</span><br
 style="font-family: courier new,monospace;">
          <span style="font-family: courier new,monospace;">&nbsp;
&lt;/style&gt;</span><br style="font-family: courier new,monospace;">
          <span style="font-family: courier new,monospace;">...</span><br>
          <br>
Why on earth would anybody need this setting? <br>
          <br>
I lost some valuable time on finding this...<br>
And its effect was really annoying!<br>
          <span><br clear="all">
          <br>
-- <br>
Cristi Toth<br>
-------------<br>
Codebeat<br>
          <a href="http://www.codebeat.ro" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">www.codebeat.ro</a>
          </span></blockquote>
        </div>
        <br>
      </blockquote>
      </span></div>
      </div>
    </blockquote>
    </div>
    </span></div>
    </span></div>
  </blockquote>
  </div>
  <br>
</blockquote>
</body>
</html>

Mime
View raw message