I came across the use of CSS on the following URL:
http://www.ibm.com/developerworks/xml/library/x-xformstipmozillacss/index.html I wanted to know if the following CSS can work in Orbeon Forms. I am sure I tried such CSS before in the Orbeon environment and it did not work, but maybe my knowledge of CSS itself was not adequate then (a couple months ago) to be able to tell myself that this technique may work or will not work. So, my question to the Orbeon experts here is will the following CSS syntax work in the Orbeon setup. xforms|input:disabled { display: none; } xforms|input:-moz-read-only .xf-value { background-color: lightgray; } xforms|input:required { background-color: cyan; } I know that I have used .xforms-input with Orbeon. But I am not sure if .xforms-input is a CSS pseudo-class. |
Administrator
|
For reference, the pipe character in "xforms|input" is CSS's way of
specifying XML element prefixes. Writing "xforms|input" will match on an element called "<xforms:input>". Not all browsers implement this CSS notation, and not all browsers of course support XForms (heck, IE doesn't even support XHTML). Such CSS is sent directly to the web browser, which doesn't see any xforms:input element since Orbeon Forms performs a translation to HTML. So the xforms|input syntax won't work with Orbeon Forms at the moment. We could make it work if we wrote a CSS translation layer on the server. That's quite doable, but we haven't done that yet. One place to do this would be XFormsResourceServer.java. That code already rewrites URLs in CSS when combining CSS resources. What would be needed there is a CSS parser and rewriter. It could be a fun project. .xforms-input is a regular CSS class. Classes starting with ".xforms" are added by the XForms engine. Pseudo-classes start with a colon, e.g. ":first" or ":required". -Erik On Jan 30, 2008, at 6:49 AM, XGuy wrote: > > I came across the use of CSS on the following URL: > http://www.ibm.com/developerworks/xml/library/x-xformstipmozillacss/index.html > > I wanted to know if the following CSS can work in Orbeon Forms. I am > sure I > tried such CSS before in the Orbeon environment and it did not work, > but > maybe my knowledge of CSS itself was not adequate then (a couple > months ago) > to be able to tell myself that this technique may work or will not > work. > > So, my question to the Orbeon experts here is will the following CSS > syntax > work in the Orbeon setup. > > xforms|input:disabled { > display: none; > } > > xforms|input:-moz-read-only .xf-value { > background-color: lightgray; > } > > xforms|input:required { > background-color: cyan; > } > > I know that I have used .xforms-input with Orbeon. But I am not sure > if > .xforms-input is a CSS pseudo-class. 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 |
Is there any CSS resource that has documentation on .xforms-input? Is it part of some Xforms-specific CSS? I was also interested in documentation on .xforms-group.
I thought that .xforms-group is just a user-defined CSS class that carries a class reference called "xforms-group" as "some-html-element class = "xforms-group" or "some-html-element=xforms-input". I would love to see a stylesheet that uses .xforms-input as .xforms-input{......} I have used this .xforms-input thing in my own stylesheet not knowing if it would work or not, but it seems to work. Maybe the CSS parser project is indeed fun!!
|
Administrator
|
Check out his part of the tutorial:
http://www.orbeon.com/ops/doc/intro-tutorial#making-things-look-nicer For example, xforms-group is a class put on the HTML element that represents an xforms:group, in this case a <span> element. So you will have in the browser <span class="xforms-group">. You can use this class to control how groups look like. The same goes for every other control. When in doubt, just view source in your web browser and you will see where the classes are put. -Erik On Jan 31, 2008, at 12:11 PM, XGuy wrote: > > Is there any CSS resource that has documentation on .xforms-input? > Is it part > of some Xforms-specific CSS? I was also interested in documentation on > .xforms-group. > > I thought that .xforms-group is just a user-defined CSS class that > carries a > class reference called "xforms-group" as "some-html-element class = > "xforms-group" or "some-html-element=xforms-input". > > I would love to see a stylesheet that uses .xforms-input as > .xforms-input{......} > > I have used this .xforms-input thing in my own stylesheet not > knowing if it > would work or not, but it seems to work. > > Maybe the CSS parser project is indeed fun!! > > > > Erik Bruchez wrote: >> >> For reference, the pipe character in "xforms|input" is CSS's way of >> specifying XML element prefixes. Writing "xforms|input" will match on >> an element called "<xforms:input>". Not all browsers implement this >> CSS notation, and not all browsers of course support XForms (heck, IE >> doesn't even support XHTML). >> >> Such CSS is sent directly to the web browser, which doesn't see any >> xforms:input element since Orbeon Forms performs a translation to >> HTML. So the xforms|input syntax won't work with Orbeon Forms at the >> moment. >> >> We could make it work if we wrote a CSS translation layer on the >> server. That's quite doable, but we haven't done that yet. One place >> to do this would be XFormsResourceServer.java. That code already >> rewrites URLs in CSS when combining CSS resources. What would be >> needed there is a CSS parser and rewriter. It could be a fun project. >> >> .xforms-input is a regular CSS class. Classes starting with ".xforms" >> are added by the XForms engine. >> >> Pseudo-classes start with a colon, e.g. ":first" or ":required". >> >> -Erik >> >> On Jan 30, 2008, at 6:49 AM, XGuy wrote: >> >>> >>> I came across the use of CSS on the following URL: >>> http://www.ibm.com/developerworks/xml/library/x-xformstipmozillacss/index.html >>> >>> I wanted to know if the following CSS can work in Orbeon Forms. I am >>> sure I >>> tried such CSS before in the Orbeon environment and it did not work, >>> but >>> maybe my knowledge of CSS itself was not adequate then (a couple >>> months ago) >>> to be able to tell myself that this technique may work or will not >>> work. >>> >>> So, my question to the Orbeon experts here is will the following CSS >>> syntax >>> work in the Orbeon setup. >>> >>> xforms|input:disabled { >>> display: none; >>> } >>> >>> xforms|input:-moz-read-only .xf-value { >>> background-color: lightgray; >>> } >>> >>> xforms|input:required { >>> background-color: cyan; >>> } >>> >>> I know that I have used .xforms-input with Orbeon. But I am not sure >>> if >>> .xforms-input is a CSS pseudo-class. >> >> -- >> 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 >> >> > :-D:-D > -- > View this message in context: http://www.nabble.com/will-this-Mozilla-CSS-syntax-work-in-Orbeon-Forms--tp15183206p15213700.html > 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 |
Free forum by Nabble | Edit this page |