Title: REQUEST: New pseudo selector: empty Post by: . on November 06, 2007, 04:36:00 pm Is it possible to create a new pseudo selector for when an input field is empty? This would allow for mandatory fields that have no entries to be highlighted automatically.
Something like: <Style name=".mandatory:empty"> <StyleAttribute name="backgroundColor" value="lightGreen" /> </Style> In the form: EDIT f001 = FORMONLY.required_field, STYLE="bg_white size5 mandatory"; Thanks Jeff PS: Is this okay in here, or should it be in the mailing list? Title: Re: REQUEST: New pseudo selector: empty Post by: Bernard M. on November 07, 2007, 04:36:36 pm Yes, Jeff the technical forum is the right place for your request. I guess people have just to take the habit.
I've registered you request as feature request #Fz.2422. Thanks for the suggestion. Title: Re: REQUEST: New pseudo selector: empty Post by: . on November 08, 2007, 09:17:51 am Jeff,
I presume you expect the style to be applyed "live", i.e. when the user enters data in the field, the color changes, right ? This may raise an performance issue: currently, styles are applyed:
With this, we would need to recompute and reapply styles on the current field on each keystroke, which may slow the program. To be tested !. Is there any other pseudo selector you would like to see in further versions ? We've already registred some requests about table (last row, header), we're also thinking about platform pseudo selector (osx, win, lnx...)... Pierre-Nicolas Title: Re: REQUEST: New pseudo selector: empty Post by: . on November 09, 2007, 10:24:09 am Pierre-Nicolas,
Would you expect COLORWHERE to one-day be handled by a pseudo-selector, something like... Code
Code
Reuben Title: Re: REQUEST: New pseudo selector: empty Post by: . on November 09, 2007, 03:17:22 pm Jeff, Hi Pierre-Nicolas. I presume you expect the style to be applyed "live", i.e. when the user enters data in the field, the color changes, right ? This may raise an performance issue: currently, styles are applyed:
With this, we would need to recompute and reapply styles on the current field on each keystroke, which may slow the program. To be tested !. Is there any other pseudo selector you would like to see in further versions ? We've already registred some requests about table (last row, header), we're also thinking about platform pseudo selector (osx, win, lnx...)... Pierre-Nicolas I wouldn't expect this to react during the edit of the field, 'after field' would be good enough for most people I would imagine. As we set a general ':focus' colour anyway I would expect the field to have taken on that colour whilst the user is editing the field. As for other selectors, I think my needs are fairly well met at the moment although last row sounds like a good idea. Thanks Jeff Title: Re: REQUEST: New pseudo selector: empty Post by: . on November 11, 2007, 10:29:46 pm Thanks for your feedback.
The next thing to decide is the priority of this selector. Today, the :focus is the most important selector. Should :empty (or whatever the name of this selector can be) have higher or lower priority ? i.e. do you expect your current field be red because it's empty, or light orange because it's the current field ? Personnaly, I would expect :focus to remain top priority. Title: Re: REQUEST: New pseudo selector: empty Post by: . on November 11, 2007, 10:37:44 pm Pierre-Nicolas, Would you expect COLORWHERE to one-day be handled by a pseudo-selector, something like... ... Reuben Hi Reuben, This was not expected, but it looks like something useful, right ? We need first to check:
What was proposed a long time ago was to use STYLEWHERE instead of COLORWHERE:
Not sure which one is the best solution. As a lazy guy I would vote for STYLEWHERE so GDC is ready, but this blows GWC's smart field mode - so maybe both solutions ? Title: Re: REQUEST: New pseudo selector: empty Post by: . on November 12, 2007, 12:03:38 pm Thanks for your feedback. Hi Pierre-Nicolas, The next thing to decide is the priority of this selector. Today, the :focus is the most important selector. Should :empty (or whatever the name of this selector can be) have higher or lower priority ? i.e. do you expect your current field be red because it's empty, or light orange because it's the current field ? Personnaly, I would expect :focus to remain top priority. I think your expectation is correct. :focus should remain the highest priority, so in your example (:focus = orange, :empty=red) the field would be red until it got focus, then would become orange. On exiting the field it would either revert to red if left empty or default to normal if an entry has been made. This should only happen after the field has been exited - not during edit. If the field is the first entry field it would still start orange because it has focus and only ever go red if the user moves off the field having left it blank. This would work because the users focus has already been drawn to the field because it was the first field. Thanks Jeff Title: Re: REQUEST: New pseudo selector: empty Post by: Tady D. on March 11, 2024, 10:30:26 am Quote I think your expectation is correct. :focus should remain the highest priority, so in your example (:focus = orange, :empty=red) the field would be red until it got focus, then would become orange. On exiting the field it would either revert to red if left empty or default to normal if an entry has been made. This should only happen after the field has been exited - not during edit. If the field is the first entry field it would still start orange because it has focus and only ever go red if the user moves off the field having left it blank. This would work because the users focus has already been drawn to the field because it was the first field. Thanks snow rider 3d (https://snowrider3d.com) Jeff Title: Re: REQUEST: New pseudo selector: empty Post by: Victor G. on March 14, 2024, 03:23:50 am Jeff, Hi Pierre-Nicolas. I presume you expect the style to be applyed "live", i.e. when the user enters data in the field, the color changes, right ? This may raise an performance issue: currently, styles are applyed:
With this, we would need to recompute and reapply styles on the current field on each keystroke, which may slow the program. To be tested !. Is there any other pseudo selector you would like to see in further versions ? We've already registred some requests about table (last row, header), we're also thinking about platform pseudo selector (osx, win, lnx...)... coreball (https://coreball.co) Pierre-Nicolas I wouldn't expect this to react during the edit of the field, 'after field' would be good enough for most people I would imagine. As we set a general ':focus' colour anyway I would expect the field to have taken on that colour whilst the user is editing the field. As for other selectors, I think my needs are fairly well met at the moment although last row sounds like a good idea. Thanks Jeff |