Making WordPress.org

Opened 4 years ago

Last modified 4 years ago

#5133 new enhancement

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 (7)

#1 follow-up: @dd32
4 years ago

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

If a WordPress.org theme 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.

Version 0, edited 4 years ago by dd32 (next)

#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.

Note: See TracTickets for help on using tickets.