[wp-trac] [WordPress Trac] #49549: Bundled Themes: Update calendar widget styles for 5.4 markup

WordPress Trac noreply at wordpress.org
Mon Mar 2 10:20:36 UTC 2020


#49549: Bundled Themes: Update calendar widget styles for 5.4 markup
-------------------------------------+--------------------------
 Reporter:  ianbelanger              |       Owner:  ianbelanger
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.4
Component:  Bundled Theme            |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  css
-------------------------------------+--------------------------
Changes (by sabernhardt):

 * keywords:  needs-patch => has-patch needs-testing


Comment:

 Borders and background colors are left out of the first patch (child
 themes may have overridden color choices and then would need to be
 revised). The second patch includes them, in case that's preferable.

 In both patches, **all** themes:
 * Use `display:table` on the `nav` element and `display:table-cell` on the
 `span` elements inside it
 * Set the width to 100% (except for Twenty Eleven at 95%)

 Theme-specific changes include:

 **Twenty Twenty**
 * Adjusts `font-size` to 1.8rem on navigation element
 * Uses same styles for calendar's table cells on the navigation `span`
 elements (font-size, font-weight, line-height, padding, text-align)
 * Removes bottom margin from calendar table
 * Removes underline from the links, as specified before
 * Aligns month links to the outside edges
 * ''Second patch'' adds side and bottom borders (setting `border-color` in
 functions.php)

 **Twenty Nineteen**
 Note: these stylesheets were edited separately from the SCSS file, not
 compiled, if that makes a difference.
 * Moves the bottom margin from the calendar table to the `nav` element
 * Adds the heading font to navigation links, and uses the non-Latin font
 fallbacks for 31 languages
 * Adds 0.5em padding to the `span` tags so they match the cells

 **Twenty Seventeen**
 * Moves the bottom margin from the calendar table to the `nav` element
 * Centers the navigation links
 * Sets a width (15%) to the center ".pad" `span`
 * Adds 0.4em top and bottom padding to the `nav` element
 * ''Second patch'' adds bottom border

 **Twenty Sixteen**
 * Matches calendar table cells' line-height, centering and lack of
 padding, then adjusts line-height with the cells at `(min-width:
 56.875em)`
 * Sets a width (15%) to the center ".pad" `span`
 * ''Second patch'' adds side and bottom borders

 **Twenty Fifteen**
 * Sets a width (15%) to the center ".pad" `span`
 * Matches calendar table cells' line-height, centering and lack of
 padding, then adjusts line-height with the cells at the five larger
 breakpoints
 * Moves the bottom margin from the calendar table to the `nav` element at
 `(min-width: 46.25em)`
 * ''Second patch'' adds side and bottom borders

 **Twenty Fourteen**
 * Adjusts navigation line-height to 2
 * Aligns text for previous and next months to outside edges
 * ''Second patch'' adds side and bottom borders, with box-sizing
 adjustment

 **Twenty Twelve**
 * Gives the same styles to `.wp-calendar-nav` as were assigned to the
 `#wp-calendar` table (margin, width, font-size, line-height, color)
 * Adds side padding to the next link container `span` (`.wp-calendar-nav-
 next`) to match the former `tfoot` cell

 **Twenty Eleven**
 * Centers the navigation links
 * ''Second patch'' adds background color plus top and bottom borders

 **Twenty Ten**
 * Assigns fonts to `.calendar_wrap` container, to match `#wp-calendar`
 * Aligns text for next month links to the outside edges

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49549#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list