Making WordPress.org

Opened 4 years ago

Closed 3 months ago

#5133 closed enhancement (fixed)

Don't load wp4.css on the homepage.

Reported by: dufresnesteven's profile dufresnesteven Owned by:
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

This is an experiment/proof of concept.

WP4.css contains styles that are consistently overwritten in each theme because they are generic and most likely out of date.

While it may seem daunting to pull it out, I think we can de-risk the task by excluding it from each theme (or page) one by one, starting with the homepage. We could then control the damage as we go and at some point we'll be ready to pull the trigger on killing it for good (even if we get 10 new, most likely trivial bugs, in the door as a result) .

Attachments (3)

5133.diff (7.0 KB) - added by dufresnesteven 4 years ago.
This diff updates wporg-main to include some wp4.css styles so we can exclude it.
5133.1.diff (7.0 KB) - added by dufresnesteven 4 years ago.
Update the mobile layout to match wporg-main.
5133.3.diff (7.1 KB) - added by dufresnesteven 4 years ago.
Add styles to hide download-mobile buttons. We need to move over meta data next.

Download all attachments as: .zip

Change History (8)

#1 follow-up: @dd32
4 years ago

There's some functionality on WordPress.org to do just that.

If a WordPress.org theme (or page I guess) registers support for wp4-styles then the global header won't output wp4.css:

themes/pub/wporg-themes/functions.php:	add_theme_support( 'wp4-styles' );
themes/pub/wporg/functions.php:		add_theme_support( 'wp4-styles' );
themes/pub/wporg-plugins/functions.php:	add_theme_support( 'wp4-styles' );

That'll also disable Open Sans and Dashicon loading too, so it's assumed the theme handles fonts.

Last edited 4 years ago by dd32 (previous) (diff)

#2 in reply to: ↑ 1 @dufresnesteven
4 years ago

Replying to dd32:

There's some functionality on WordPress.org to do just that.

Brilliant 🥳.

#3 follow-up: @netweb
4 years ago

If I’m remembering correctly some of this work was performed by @obenland as part of #1015, which might also be helpful for reference @dufresnesteven

#4 in reply to: ↑ 3 @dufresnesteven
4 years ago

Replying to netweb:

If I’m remembering correctly some of this work was performed by @obenland as part of #1015, which might also be helpful for reference @dufresnesteven

Perfect. Thanks.

@dufresnesteven
4 years ago

This diff updates wporg-main to include some wp4.css styles so we can exclude it.

@dufresnesteven
4 years ago

Update the mobile layout to match wporg-main.

@dufresnesteven
4 years ago

Add styles to hide download-mobile buttons. We need to move over meta data next.

#5 @dufresnesteven
3 months ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.