WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #49228, comment 33


Ignore:
Timestamp:
07/07/2020 02:00:31 PM (17 months ago)
Author:
sabernhardt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49228, comment 33

    initial v1  
    11> That said, let's see if we can also make it work with the previous markup (with the input inside the `<label>` tag) for any custom widgets out there.
    22
    3 @afercia 49228.4.diff and now [attachment:"49228.5.diff"] do not add margin to any labels around checkboxes that still might be in custom widgets. 49228.3.diff did that already. However, if a custom widget form has a checkbox inside the label, it's quite possible there's a text input (other than title) inside a label as well. I updated my previous patch in case it should be more exclusive. 49228.5.diff would ignore labels following hidden inputs and would add the styles only on labels following their checkboxes and radio buttons on smaller screens.
     3@afercia 49228.4.diff and now [attachment:"49228.5.diff"] do not add margin to any labels around checkboxes that still might be in custom widgets. 49228.3.diff did that already. However, if a custom widget form has a checkbox inside the label, it's quite possible there's a text input (other than title) inside a label as well. I updated my previous patch in case the styling should exclude the other labels. 49228.5.diff would ignore labels following hidden inputs and would add the styles only on labels following their checkboxes and radio buttons on smaller screens.
    44
    55[attachment:"49228.rss-widget.diff"] combines all the RSS widget checkboxes within one paragraph tag. This is separate from the styles patch because I think it would be better to leave the multiple paragraphs instead (at least for now). The widget form has a little extra space compared to other core widgets, but some custom widgets have checkboxes in separate paragraphs, too. This patch could provide value as a starting point for the `fieldset` markup later.