forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gav...." <brightoncomput...@brightontown.com.au>
Subject RE: [jira] Commented: (FOR-891) css-validator reports CSS errors and many warnings for pelt skin
Date Sat, 10 Jun 2006 13:16:21 GMT
Some discussion was started on Forrest Friday with David & Thorsten.

Although I agree that any new CSS for profile.css should go in
profile.css.xslt , this is not the end of it.

As an example, lets take the first profile.css Warning from the Validator
which says :-

'You have no color with your background-color: #top'

Looking profile.css.xslt this is :-

<xsl:template match="color[@name='header']">
	#top          { color: <xsl:value-of select="@value"/>;}  
</xsl:template>

Ok, so where does @value come from, that'll be skinconf.xsl as a first stop
:-

     <xsl:if test="not(color[@name='header'])">
       <color name="header" value="FFFFFF" />
     </xsl:if>  

But the value of FFFFFF is only set if it has not been set in skinconf.xml,
which it has :-

    <color name="header"   value="#294563" />

Ok, that is all fine, but to then cure the Warning we need to add a color in
#top to pair up with the background-color.

Adding code to profile.css.xslt is not good enough, where will its value
come from ?

We need to add this value into skinconf.xsl also so profile.css.xslt can use
the value in its value-of select.

But theres more, currently if color is already set in skinconf.xml, then
this added code in skinconf.xsl wont get parsed - so we need to add the
Extra needed color into skinconf.xml also (in this case).

There is also the confusion already in that this one example points out a
Flaw that can confuse others even further - that is that the 'color'
mentioned is actually a background-color, and we need to add a 'color' to
Make validator happy.

This is what I did as a test.

Changed code in profile.css.xslt :-

<xsl:template match="color[@name='header']">
	#top          { color: <xsl:value-of select="@value"/>;
	background-color: <xsl:value-of select="@background"/>;}  
</xsl:template>

Changed code in skinconf.xsl :-

     <xsl:if test="not(color[@name='header'])">
       <color name="header" value="000000" background="#FFFFFF"/>
     </xsl:if>  

Changed code in skinconf.xml :-

<color name="header"   value="#000000" background="#294563"/>

This all works fine and the 'Warning' from the Validator has gone
For this particular example. There are about 50 other Warnings
>From the Validator for this particular file. All will need 
Similar treatment.

I could not explain myself clearer enough on IRC, I hope this clarifys
A bit that you can not just add a line of code to just one file.

If there are better suggestions...

Gav...

> -----Original Message-----
> From: Gavin (JIRA) [mailto:jira@apache.org]
> Sent: Thursday, 8 June 2006 9:01 PM
> To: dev@forrest.apache.org
> Subject: [jira] Commented: (FOR-891) css-validator reports CSS errors and
> many warnings for pelt skin
> 
>     [ http://issues.apache.org/jira/browse/FOR-
> 891?page=comments#action_12415349 ]
> 
> Gavin commented on FOR-891:
> ---------------------------
> 
> No thanks, I'll send in a new patch shortly to hopefully close the Issue.
> 
> > css-validator reports CSS errors and many warnings for pelt skin
> > ----------------------------------------------------------------
> >
> >          Key: FOR-891
> >          URL: http://issues.apache.org/jira/browse/FOR-891
> >      Project: Forrest
> >         Type: Bug
> 
> >   Components: Skins (general issues), Documentation and website
> >     Versions: 0.8-dev
> >     Reporter: David Crossley
> >     Assignee: Gavin
> >  Attachments: screen.css.diff, screen_2.css.diff
> >
> > Our home page does not pass CSS validation with
> http://jigsaw.w3.org/css-validator/
> 
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.8.3 - Release Date: 6/7/2006



Mime
View raw message