CSS problem

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

CSS problem

StephR
I can't understand how orbeon works with css files :

- Sometimes there is only xforms-server/xforms-min.css
- Sometimes there is only xforms-server/orbeon.css

I have of course the one I made.

The problem is that in orbeon.css, there are styles for the body, a, h1, etc... but I don't want them. But when orbeon.css is not called, then my page is all screwed up. So I copy pasted what was in orbeon.css in my css file !!!! Isn't there a nicer way? I'm not to familiar with css files : which css file will be used if there is styles in orbeon.css and in mycssfile.css ???

I don't know if it is clear :/
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

Erik Bruchez
Administrator
Steph,

You should really not use orbeon.css: that file is really just used  
for the Orbeon Forms examples. To remove it, either create your own  
theme stylesheet, or simply use theme-plain.xsl. Your pages should not  
be screwed-up if orbeon.css is absent, but without proper CSS  
definitions, your page may look quite plain.

-Erik

On Nov 21, 2007, at 3:35 AM, StephR wrote:

>
> I can't understand how orbeon works with css files :
>
> - Sometimes there is only xforms-server/xforms-min.css
> - Sometimes there is only xforms-server/orbeon.css
>
> I have of course the one I made.
>
> The problem is that in orbeon.css, there are styles for the body, a,  
> h1,
> etc... but I don't want them. But when orbeon.css is not called,  
> then my
> page is all screwed up. So I copy pasted what was in orbeon.css in  
> my css
> file !!!! Isn't there a nicer way? I'm not to familiar with css  
> files :
> which css file will be used if there is styles in orbeon.css and in
> mycssfile.css ???
>
> I don't know if it is clear :/
> --
> View this message in context: http://www.nabble.com/CSS-problem-tf4849580.html#a13875534
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

GEORGE.ADAMS

Steph,
CSS stands for Cascading Style Sheets. The last stylesheet loaded will override any previously loaded styles.
You should be able to create a stylesheet that is referenced after orbean.css. The styles you don't like from orbeon.css can be copied and altered in your own stylesheet.
In the xforms-bookcast example page view.xhtml styles were added and overridden right in the head of the page. Your stylesheet can be added like this
<xhtml:link href="/apps/sifshared/shared.css" rel="stylesheet" type="text/css" />
in the head of your web page

George


Erik Bruchez <[hidden email]>
Sent by: Erik Bruchez <[hidden email]>

11/21/07 02:15 PM

Please respond to
[hidden email]

To
[hidden email]
cc
Subject
Re: [ops-users] CSS problem





Steph,

You should really not use orbeon.css: that file is really just used  
for the Orbeon Forms examples. To remove it, either create your own  
theme stylesheet, or simply use theme-plain.xsl. Your pages should not  
be screwed-up if orbeon.css is absent, but without proper CSS  
definitions, your page may look quite plain.

-Erik

On Nov 21, 2007, at 3:35 AM, StephR wrote:

>
> I can't understand how orbeon works with css files :
>
> - Sometimes there is only xforms-server/xforms-min.css
> - Sometimes there is only xforms-server/orbeon.css
>
> I have of course the one I made.
>
> The problem is that in orbeon.css, there are styles for the body, a,  
> h1,
> etc... but I don't want them. But when orbeon.css is not called,  
> then my
> page is all screwed up. So I copy pasted what was in orbeon.css in  
> my css
> file !!!! Isn't there a nicer way? I'm not to familiar with css  
> files :
> which css file will be used if there is styles in orbeon.css and in
> mycssfile.css ???
>
> I don't know if it is clear :/
> --
> View this message in context: http://www.nabble.com/CSS-problem-tf4849580.html#a13875534
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

StephR
In reply to this post by Erik Bruchez
Hi Erik,

I'm trying to customize the template, so I took yours (theme-examples.xls) and modified it. I never did a direct call to orbeon.css, so who calls it ? What I have now is pretty awful : myCss.css has the exact copy of orbeon.css + my styling. So somethings, if I look my source page, I have xforms-min.css + myCss.css, sometimes orbeons.css + myCss.css... etc...

Where do you think
the problem is coming from?

Thanks for your help

Stephane



Erik Bruchez a écrit :
Steph,

You should really not use orbeon.css: that file is really just used for the Orbeon Forms examples. To remove it, either create your own theme stylesheet, or simply use theme-plain.xsl. Your pages should not be screwed-up if orbeon.css is absent, but without proper CSS definitions, your page may look quite plain.

-Erik

On Nov 21, 2007, at 3:35 AM, StephR wrote:


I can't understand how orbeon works with css files :

- Sometimes there is only xforms-server/xforms-min.css
- Sometimes there is only xforms-server/orbeon.css

I have of course the one I made.

The problem is that in orbeon.css, there are styles for the body, a, h1,
etc... but I don't want them. But when orbeon.css is not called, then my
page is all screwed up. So I copy pasted what was in orbeon.css in my css
file !!!! Isn't there a nicer way? I'm not to familiar with css files :
which css file will be used if there is styles in orbeon.css and in
mycssfile.css ???

I don't know if it is clear :/
-- 
View this message in context: http://www.nabble.com/CSS-problem-tf4849580.html#a13875534
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

Erik Bruchez
Administrator
Did you modify the epilogue to use theme-plain.xsl? By default, it  
will use theme-examples.xsl.

-Erik

On Nov 21, 2007, at 2:07 PM, Stephane Ruchet wrote:

> Hi Erik,
>
> I'm trying to customize the template, so I took yours (theme-
> examples.xls) and modified it. I never did a direct call to  
> orbeon.css, so who calls it ? What I have now is pretty awful :  
> myCss.css has the exact copy of orbeon.css + my styling. So  
> somethings, if I look my source page, I have xforms-min.css +  
> myCss.css, sometimes orbeons.css + myCss.css... etc...
>
> Where do you think the problem is coming from?
>
> Thanks for your help
>
> Stephane
>
>
>
> Erik Bruchez a écrit :
>>
>> Steph,
>>
>> You should really not use orbeon.css: that file is really just used  
>> for the Orbeon Forms examples. To remove it, either create your own  
>> theme stylesheet, or simply use theme-plain.xsl. Your pages should  
>> not be screwed-up if orbeon.css is absent, but without proper CSS  
>> definitions, your page may look quite plain.
>>
>> -Erik
>>
>> On Nov 21, 2007, at 3:35 AM, StephR wrote:
>>
>>>
>>> I can't understand how orbeon works with css files :
>>>
>>> - Sometimes there is only xforms-server/xforms-min.css
>>> - Sometimes there is only xforms-server/orbeon.css
>>>
>>> I have of course the one I made.
>>>
>>> The problem is that in orbeon.css, there are styles for the body,  
>>> a, h1,
>>> etc... but I don't want them. But when orbeon.css is not called,  
>>> then my
>>> page is all screwed up. So I copy pasted what was in orbeon.css in  
>>> my css
>>> file !!!! Isn't there a nicer way? I'm not to familiar with css  
>>> files :
>>> which css file will be used if there is styles in orbeon.css and in
>>> mycssfile.css ???
>>>
>>> I don't know if it is clear :/
>>> --
>>> View this message in context: http://www.nabble.com/CSS-problem-tf4849580.html#a13875534
>>> Sent from the ObjectWeb OPS - Users mailing list archive at  
>>> Nabble.com.
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email]  
>>> mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

StephR
Here is what I have done :

  • Modified the epilogue-servlet to use theme-mepia.xsl (started from your theme-example and then modified it)
    • <p:otherwise>
                          <!-- Default case: show portal theme and rewrite data -->
                          <p:processor name="oxf:unsafe-xslt">
                              <p:input name="data" href="#xformed-data"/>
                              <p:input name="request" href="#request"/>
                              <p:input name="config" href="theme-mepia.xsl"/>
                              <p:output name="data" id="themed-data"/>
                          </p:processor>
  • Now in theme-mepia.xsl
    • I do not understand why I have to put <xsl:import href="theme-plain.xsl"/> as you did in your example. An explanation would be nice. If I comment it, when I want to access news.xhtml file, I have two css used : mepia.css and xforms-htmlarea-dialog-min.css and the layout is screwed. When I put it back, the layout is ok
    • So if I want to change the yellow background, it's in xforms-htmlarea-dialog-min.css . But I am not calling it so I can't/don't want to edit it. But if I check my source code, my css file is put BEFORE the xforms one. So then I moved the call of mepia.css a bit lower in the code (check example below) and now it works.
    • Here is the relevant part of theme-mepia.xsl:
    <!-- Get generic templates from plain theme: WHY ????? -->
    <xsl:import href="theme-plain.xsl"/>

   
<!-- XML formatting -->
    <xsl:import href="oxf:/ops/utils/formatting/formatting.xsl"/>
    
   
<!-- This contains some useful request information -->
    <xsl:variable name="request" select="doc('input:request')" as="document-node()"/>

    <xsl:template match="/">
        <xhtml:html>
           
            <xhtml:head>
                <xhtml:title>Mepia</xhtml:title>
                <!-- Before I put my call to mepia.css here -->
                <!-- Standard scripts/styles -->
                <!-- NOTE: The XForms engine may place additional scripts and stylesheets here as needed -->
               
<!-- I also tried here -->
                <!-- Handle head elements -->
                <xsl:for-each select="/xhtml:html/xhtml:head/(xhtml:meta | xhtml:link | xhtml:style | xhtml:script)">
                    <xsl:element name="xhtml:{local-name()}" namespace="{namespace-uri()}">
                        <xsl:copy-of select="@*"/>
                        <xsl:apply-templates/>
                    </xsl:element>
                </xsl:for-each>
           
<link rel="stylesheet" href="/mepia4/design/mepia.css" type="text/css" />
         </xhtml:head>
        
         <xhtml:body>
But I have to admit I really don't like the idea where I have to add double styling in my css file to crush to one that is made in xforms-htmlarea-dialog-min.css. What do you do generally?

Next observation : in my menu, I added a link to a page that on purpose doesn't exist. So I have the
Orbeon Forms - Page Not Found
We are sorry, but the resource you have requested is not available on this server.
Then again, if I check my source page, now I have a call to orbeon.css and mepia.css ! Isn't there a way to remove all automatics calls to css files and only have a folder in our apps where we would have orbeons.css, xforms-htmlarea-dialog-min.css, our css... and then knowing exactly what we want we wouldn't need to have double styling ??? Or am I missing completely a feature here ?

Thanks for the help




Erik Bruchez a écrit :
Did you modify the epilogue to use theme-plain.xsl? By default, it will use theme-examples.xsl.

-Erik

On Nov 21, 2007, at 2:07 PM, Stephane Ruchet wrote:

Hi Erik,

I'm trying to customize the template, so I took yours (theme-examples.xls) and modified it. I never did a direct call to orbeon.css, so who calls it ? What I have now is pretty awful : myCss.css has the exact copy of orbeon.css + my styling. So somethings, if I look my source page, I have xforms-min.css + myCss.css, sometimes orbeons.css + myCss.css... etc...

Where do you think the problem is coming from?

Thanks for your help

Stephane



Erik Bruchez a écrit :

Steph,

You should really not use orbeon.css: that file is really just used for the Orbeon Forms examples. To remove it, either create your own theme stylesheet, or simply use theme-plain.xsl. Your pages should not be screwed-up if orbeon.css is absent, but without proper CSS definitions, your page may look quite plain.

-Erik

On Nov 21, 2007, at 3:35 AM, StephR wrote:


I can't understand how orbeon works with css files :

- Sometimes there is only xforms-server/xforms-min.css
- Sometimes there is only xforms-server/orbeon.css

I have of course the one I made.

The problem is that in orbeon.css, there are styles for the body, a, h1,
etc... but I don't want them. But when orbeon.css is not called, then my
page is all screwed up. So I copy pasted what was in orbeon.css in my css
file !!!! Isn't there a nicer way? I'm not to familiar with css files :
which css file will be used if there is styles in orbeon.css and in
mycssfile.css ???

I don't know if it is clear :/
-- 
View this message in context: http://www.nabble.com/CSS-problem-tf4849580.html#a13875534
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.


-- 
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

Erik Bruchez
Administrator
> • I do not understand why I have to put <xsl:import href="theme-
> plain.xsl"/> as you did in your example. An explanation would be  
> nice. If I comment it, when I want to access news.xhtml file, I have  
> two css used : mepia.css and xforms-htmlarea-dialog-min.css and the  
> layout is screwed. When I put it back, the layout is ok

You don't have to import theme-plain.xsl. The only thing I can see if  
that theme-plain.xsl uses a generic copy template, so when you say  
xsl:apply-templates in your theme then nodes from the input document  
will be copied to the output. So maybe add the following to your theme  
instead of including theme-plain.xsl, and remove the inclusion:

     <xsl:template match="@*|node()" priority="-2">
         <xsl:copy>
             <xsl:apply-templates select="@*|node()"/>
         </xsl:copy>
     </xsl:template>

I will modify theme-examples.xsl to no longer include theme-plain.xsl.

> But I have to admit I really don't like the idea where I have to add  
> double styling in my css file to crush to one that is made in xforms-
> htmlarea-dialog-min.css. What do you do generally?

I think that doing what you just did there is perfectly fine. Orbeon  
Forms provides default CSS definitions. Overloading seems preferable  
to going and modifying the Orbeon Forms definitions themselves. This  
in particular would requiring merging files whenever you upgrade to a  
more recent version, and we have worked hard over the last 2 years to  
make it easier to upgrade Orbeon Forms.

> Next observation : in my menu, I added a link to a page that on  
> purpose doesn't exist. So I have the
> Orbeon Forms - Page Not Found
> We are sorry, but the resource you have requested is not available  
> on this server.

> Then again, if I check my source page, now I have a call to  
> orbeon.css and mepia.css ! Isn't there a way to remove all  
> automatics calls to css files and only have a folder in our apps  
> where we would have orbeons.css, xforms-htmlarea-dialog-min.css, our  
> css... and then knowing exactly what we want we wouldn't need to  
> have double styling ??? Or am I missing completely a feature here ?

Do you mean the source code of the error page? Check RESOURCES/config/
not-found.xhtml: you will see that the default error page does include  
orbeon.css. The "not found" page is meant to be configurable, so feel  
free to remove orbeon.css from there.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: CSS problem

StephR
> You don't have to import theme-plain.xsl. The only thing I can see if
> that theme-plain.xsl uses a generic copy template, so when you say
> xsl:apply-templates in your theme then nodes from the input document
> will be copied to the output.
That was dum of me. Thanks.

> I think that doing what you just did there is perfectly fine. Orbeon
> Forms provides default CSS definitions. Overloading seems preferable
> to going and modifying the Orbeon Forms definitions themselves. This
> in particular would requiring merging files whenever you upgrade to a
> more recent version, and we have worked hard over the last 2 years to
> make it easier to upgrade Orbeon Forms.
Indeed, I don't want to touch to the css files in Orbeon, because they
will be updated with future releases. If overloading css is not a
problem, I'm a happy man.

Thanks for the info.

Steph


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws