More CSS questions

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

More CSS questions

Andrew S. Townley-2
Hi folks,

I found this post from May:
http://mail-archive.objectweb.org/ops-users/2006-05/msg00330.html

In it, Erik answered some questions about CSS.  I'm trying to apply some
styling consistently across OPS and Mozilla's XForms 0.6 implementation.

While I understand that OPS generates HTML and from looking at the
generated code, it attempts to track pseudo classes, I was wondering if
it would be possible (somewhere that the HTML is generated within each
installation) to change things so that there is a corresponding <span>
(or I suppose a div would also work--my CSS is a bit rusty at the
moment) created that wraps each logical xforms control.  I've tested
this with manually adding bogus spans and styles and it seems to give
consistent results with Mozilla's XForms implementation.

This approach would allow you to do things like (from Dubinko's book but
slightly modified to match the generated OPS classes):

.xforms-group { display: table; }
.xforms-input { display: table-row; }
.xforms-label { display: table-cell; }
.xforms-control { display: table-cell; }

My goal here is to build a single stylesheet that takes care of
formatting to a certain degree across the different implementations.  I
don't really want to embed a lot of table-based markup or other sorts of
things because I need to style at the XForms level first and then take
into account any specific functions of server-based implementations.

Does this make sense?  Does it seem reasonable?  Is there any better way
to do what I want?

Thanks in advance,

ast
***************************************************************************************************
The information in this email is confidential and may be legally privileged Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.
***************************************************************************************************




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: More CSS questions

Erik Bruchez
Administrator
Andrew,

 > I was wondering if it would be possible (somewhere that the HTML is
 > generated within each installation) to change things so that there
 > is a corresponding <span> (or I suppose a div would also work--my
 > CSS is a bit rusty at the moment) created that wraps each logical
 > xforms control.  I've tested this with manually adding bogus spans
 > and styles and it seems to give consistent results with Mozilla's
 > XForms implementation.

Absolutely a good suggestion, in fact we plan to do this in particular
to fix this bug (see the comments):

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207

 > This approach would allow you to do things like (from Dubinko's book but
 > slightly modified to match the generated OPS classes):
 >
 > .xforms-group { display: table; }
 > .xforms-input { display: table-row; }
 > .xforms-label { display: table-cell; }
 > .xforms-control { display: table-cell; }

Note that the CSS above assumes you are not supporting IE (6 or 7),
which doesn't support those display types (to my and many users'
despair). This makes such elegant solutions unrealistic for many
developers.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: More CSS questions

Andrew S. Townley-2
Great!  I think you should be able to stay as close as possible to
styling XForms logical elements (even with using stand-in classes) so
that you don't have to go too far into a particular implementation's
details.

As I said, I'm ideally looking for solutions that are as interoperable
across implementations as possible.  I haven't been testing with IE yet,
so I wasn't aware of the CSS support issue you mentioned.  As I said, my
CSS is a little rusty.  I seem to only use it once or twice a year which
leaves me just enough time to forget most of it by the time I need it
again.

I'm not sure if I remember right, but for maximum support for
cross-browser CSS (IE5 and onward), maybe it would make more sense to
enclose each control in a div so that browsers who don't pay attention
to block styles on spans would be able to have a better chance of doing
the right thing.

I'm sure when all this is over, my CSS skills will be back for at least
another 6 months... ;)

Thanks for the reply,

ast

On Sat, 2006-07-22 at 23:23, Erik Bruchez wrote:

> Andrew,
>
>  > I was wondering if it would be possible (somewhere that the HTML is
>  > generated within each installation) to change things so that there
>  > is a corresponding <span> (or I suppose a div would also work--my
>  > CSS is a bit rusty at the moment) created that wraps each logical
>  > xforms control.  I've tested this with manually adding bogus spans
>  > and styles and it seems to give consistent results with Mozilla's
>  > XForms implementation.
>
> Absolutely a good suggestion, in fact we plan to do this in particular
> to fix this bug (see the comments):
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207
>
>  > This approach would allow you to do things like (from Dubinko's book but
>  > slightly modified to match the generated OPS classes):
>  >
>  > .xforms-group { display: table; }
>  > .xforms-input { display: table-row; }
>  > .xforms-label { display: table-cell; }
>  > .xforms-control { display: table-cell; }
>
> Note that the CSS above assumes you are not supporting IE (6 or 7),
> which doesn't support those display types (to my and many users'
> despair). This makes such elegant solutions unrealistic for many
> developers.
>
> -Erik
***************************************************************************************************
The information in this email is confidential and may be legally privileged Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.
***************************************************************************************************




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws