Strength of CSS rules in Orbeon 4.0

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Strength of CSS rules in Orbeon 4.0

ricetrac
Hello,

First, thank You for the new version of Orbeon : 4.0

I'm trying to update my application with the new version.
I would like some clarification on the evolution of CSS rules.

In my application, currently with Orbeon 3.8, I use both the stylesheet of Orbeon and my own stylesheet.
With version 4.0, if I understood, I must impact my html pages by adding the class "Orbeon" styles that come with Orbeon continues to apply. Is that correct?

Example :
with orbeon 3.8 :   <xhtml:body>...</xhtml:body>
With orbeon 4.0 :   <xhtml:body class="orbeon">...</xhtml:body>

Than You.

Julien
Reply | Threaded
Open this post in threaded view
|

Re: Strength of CSS rules in Orbeon 4.0

Alessandro  Vernet
Administrator
Hi Julien,

You only need to add the "orbeon" class to the body if you are using the separate deployment, otherwise the class is added automatically for you. And even with separate deployment, we would like it to be done automatically, per the issue linked below.

https://github.com/orbeon/orbeon-forms/issues/877

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Strength of CSS rules in Orbeon 4.0

ricetrac
I'm not using the separate deployment, but I have the same result that the issue https://github.com/orbeon/orbeon-forms/issues/877

In the WEB-INF directory, I have only the web.xml file (attached to this email).

Thank You.
Julien.
web.xml
Reply | Threaded
Open this post in threaded view
|

Re: Strength of CSS rules in Orbeon 4.0

Eduardo Chiocconi
I am experiencing the same problem on my end. I am upgrading from 4.0.0.m10 to 4.0.0.GA and I am seeing the same elements as a header when in the old version they did not appear.
Reply | Threaded
Open this post in threaded view
|

Re: Strength of CSS rules in Orbeon 4.0

ricetrac
Hello,

I found where is the problem: it is because I use the theme-plain.xsl.
In the theme-examples.xsl, there is this code :
    <xsl:template match="xh:body">
        <xsl:copy>
            <xsl:apply-templates select="@* except @class"/>
            <xsl:attribute name="class" select="string-join(('orbeon', @class), ' ')"/>
...
        </xsl:copy>
    </xsl:template>


But not in the theme-plain.xsl.
If I add this template in the theme-plain.xsl, it's OK.

It's strange, but it seems to me, with the 4.0 RC2, I did not have this problem.

julien
Reply | Threaded
Open this post in threaded view
|

Re: Strength of CSS rules in Orbeon 4.0

Alessandro  Vernet
Administrator
Hi Julien,

Good find! Indeed, for the examples that class is added by the theme-examples.xsl, but theme-plain.xsl doesn't add it. So I think either theme-plain.xsl should also add that class, or there should be another way for that class to be added. I updated the issue to reflect this.

https://github.com/orbeon/orbeon-forms/issues/877

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet