[wp-trac] [WordPress Trac] #60469: Twenty Twenty: .privacy-policy CSS class affecting page body (was: Twenty Twenty privacy-policy CSS class affecting page body)

WordPress Trac noreply at wordpress.org
Wed Feb 7 20:25:31 UTC 2024


#60469: Twenty Twenty: .privacy-policy CSS class affecting page body
---------------------------+---------------------
 Reporter:  mnydigital     |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  high           |   Milestone:  6.5
Component:  Bundled Theme  |     Version:  5.9
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:  css
---------------------------+---------------------
Changes (by sabernhardt):

 * component:  Themes => Bundled Theme
 * priority:  normal => high
 * version:   => 5.9
 * milestone:  Awaiting Review => 6.5
 * keywords:   => needs-patch


Old description:

> Twenty Twenty has a CSS class for styling the privacy policy footer link:
>
> {{{
> .privacy-policy {
>     margin: 1.2rem 0 0;
> }
> }}}
>
> This has the unintended consequence of applying the same margin to the
> body of the privacy policy page.
>
> I suggest changing the CSS to a.privacy-policy or something along those
> lines.

New description:

 Twenty Twenty has a CSS class for styling the privacy policy footer link:

 {{{
 .privacy-policy {
     margin: 1.2rem 0 0;
 }
 }}}

 This has the unintended consequence of applying the same margin to the
 body of the privacy policy page.

 I suggest changing the CSS to p.privacy-policy or something along those
 lines.

--

Comment:

 The problem is bigger than just the margins. It also affects the text
 color within the page content and some of the links.

 Twenty Twenty-One scopes the `.privacy-policy` styles to the footer, and I
 think I would rather do the same for Twenty Twenty than use the `p`
 element. However, I'll make a patch both ways to consider both options.

 The link and its styles were added in [52023]. I apparently also missed
 updating the 'secondary' selectors in `twentytwenty_get_elements_array()`.

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


More information about the wp-trac mailing list