WordPress.org

Making WordPress.org

Opened 15 months ago

Last modified 15 months ago

#5133 new enhancement

Don't load wp4.css on the homepage.

Reported by: 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 15 months 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 14 months ago.
Update the mobile layout to match wporg-main.
5133.3.diff (7.1 KB) - added by dufresnesteven 13 months 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
15 months 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 15 months ago by dd32 (previous) (diff)

#2 in reply to: ↑ 1 @dufresnesteven
15 months ago

Replying to dd32:

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

Brilliant 🥳.

#3 follow-up: @netweb
15 months 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
15 months 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
15 months ago

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

@dufresnesteven
14 months ago

Update the mobile layout to match wporg-main.

@dufresnesteven
13 months ago

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

Note: See TracTickets for help on using tickets.