Administrator
|
Alessandro Vernet wrote:
> On 11/11/05, Erik Bruchez <[hidden email]> wrote: > >>>And how would one go about displaying the alert if the control is >>>invalid or required but empty with this type of CSS, which seems like >>>a reasonable scenario? >> >>Maybe something like this: >> >>xforms|alert { display: none; } >>*:invalid > xforms|alert { display: inline; } >>*:required-but-empty > xforms|alert { display: inline; } >> >>Of course, the second pseudo-class is not specified by XForms, but >>that's a problem, as we know. > > > Right now we have two classes that we use on the label representing > the alert: xforms-alert-inactive and xforms-alert-active. Instead we > could have the classes: > > xforms-alert-[valid|invalid]-[required|optional]-[empty|filled] > > That's 8 classes, and that would give the full control to the person > writing the CSS on when/how to display the alert depending on the > control being valid, required, and empty. Now it's annoying to have 8 > classes, but I don't see any other solution as IE does not let you set > a style on a combination of CSS classes. Ideas? -Erik -- 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 |
Administrator
|
Erik Bruchez wrote:
> Alessandro Vernet wrote: > >> On 11/11/05, Erik Bruchez <[hidden email]> wrote: >> >>>> And how would one go about displaying the alert if the control is >>>> invalid or required but empty with this type of CSS, which seems like >>>> a reasonable scenario? >>> >>> >>> Maybe something like this: >>> >>> xforms|alert { display: none; } >>> *:invalid > xforms|alert { display: inline; } >>> *:required-but-empty > xforms|alert { display: inline; } >>> >>> Of course, the second pseudo-class is not specified by XForms, but >>> that's a problem, as we know. >> >> >> >> Right now we have two classes that we use on the label representing >> the alert: xforms-alert-inactive and xforms-alert-active. Instead we >> could have the classes: >> >> xforms-alert-[valid|invalid]-[required|optional]-[empty|filled] >> >> That's 8 classes, and that would give the full control to the person >> writing the CSS on when/how to display the alert depending on the >> control being valid, required, and empty. Now it's annoying to have 8 >> classes, but I don't see any other solution as IE does not let you set >> a style on a combination of CSS classes. Ideas? > > > I don't have a better idea at the moment. to control required/optional and empty/filled, then you need two entries in your CSS. Typically you will want to do: .xforms-alert-valid-required-empty, .xforms-alert-invalid-required-empty { ... } In this particular case, the syntax will be fairly heavy, but save for multiplying classes, I don't know if there is a generic solution. Also, not only xforms:alert should be supported, but also xforms:hint (and maybe xforms:help and xforms:message). In fact whatever solution is found for pseudo-classes should in theory apply to any XForms element, e.g. xforms-input-valid, etc. -Erik -- 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 |
Administrator
|
On 11/16/05, Erik Bruchez <[hidden email]> wrote:
> Actually I was wrong ;-) I just wanted to comment that if you just wants > to control required/optional and empty/filled, then you need two entries > in your CSS. Typically you will want to do: > > .xforms-alert-valid-required-empty, > .xforms-alert-invalid-required-empty { ... } > > In this particular case, the syntax will be fairly heavy, but save for > multiplying classes, I don't know if there is a generic solution. > > Also, not only xforms:alert should be supported, but also xforms:hint > (and maybe xforms:help and xforms:message). In fact whatever solution is > found for pseudo-classes should in theory apply to any XForms element, > e.g. xforms-input-valid, etc. xforms-alert, xforms-invalid, etc, and one would be able to write: .xforms-alert.xforms-valid.xforms-required.xforms-empty, .xforms-alert.xforms-invalid.xforms-required.xforms-empty { ... } However this syntax to do "ands" on classes does not seem to work correctly on IE. So unless there is another way to do this in IE, we would have a multiplication of classes, especially if we want all those classes not only for alerts but for every control and label, hint, etc. I will look this up and follow-up on this here. Alex -- Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |