-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twenty twenty-four: fixed contrast issues, improved documentations, general polishing before release #5623
Twenty twenty-four: fixed contrast issues, improved documentations, general polishing before release #5623
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,23 +20,6 @@ | |
* @return void | ||
*/ | ||
function twentytwentyfour_block_styles() { | ||
/** | ||
* The wp_enqueue_block_style() function allows us to enqueue a stylesheet | ||
* for a specific block. These will only get loaded when the block is rendered | ||
* (both in the editor and on the front end), improving performance | ||
* and reducing the amount of data requested by visitors. | ||
* | ||
* See https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ for more info. | ||
*/ | ||
wp_enqueue_block_style( | ||
'core/button', | ||
array( | ||
'handle' => 'twentytwentyfour-button-style-outline', | ||
'src' => get_parent_theme_file_uri( 'assets/css/button-outline.css' ), | ||
'ver' => wp_get_theme( get_template() )->get( 'Version' ), | ||
'path' => get_parent_theme_file_path( 'assets/css/button-outline.css' ), | ||
) | ||
); | ||
|
||
register_block_style( | ||
'core/details', | ||
|
@@ -50,7 +33,6 @@ function twentytwentyfour_block_styles() { | |
.is-style-arrow-icon-details { | ||
padding-top: var(--wp--preset--spacing--10); | ||
padding-bottom: var(--wp--preset--spacing--10); | ||
border-bottom: 1px solid var(--wp--preset--color--contrast-2, currentColor); | ||
} | ||
|
||
.is-style-arrow-icon-details summary { | ||
|
@@ -164,6 +146,40 @@ function twentytwentyfour_block_styles() { | |
|
||
add_action( 'init', 'twentytwentyfour_block_styles' ); | ||
|
||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change from WordPress/twentytwentyfour#719 ✅ |
||
* Enqueue block stylesheets. | ||
*/ | ||
|
||
if ( ! function_exists( 'twentytwentyfour_block_stylesheets' ) ) : | ||
/** | ||
* Enqueue custom block stylesheets | ||
* | ||
* @since Twenty Twenty-Four 1.0 | ||
* @return void | ||
*/ | ||
function twentytwentyfour_block_stylesheets() { | ||
/** | ||
* The wp_enqueue_block_style() function allows us to enqueue a stylesheet | ||
* for a specific block. These will only get loaded when the block is rendered | ||
* (both in the editor and on the front end), improving performance | ||
* and reducing the amount of data requested by visitors. | ||
* | ||
* See https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ for more info. | ||
*/ | ||
wp_enqueue_block_style( | ||
'core/button', | ||
array( | ||
'handle' => 'twentytwentyfour-button-style-outline', | ||
'src' => get_parent_theme_file_uri( 'assets/css/button-outline.css' ), | ||
'ver' => wp_get_theme( get_template() )->get( 'Version' ), | ||
'path' => get_parent_theme_file_path( 'assets/css/button-outline.css' ), | ||
) | ||
); | ||
} | ||
endif; | ||
|
||
add_action( 'init', 'twentytwentyfour_block_stylesheets' ); | ||
|
||
/** | ||
* Register pattern categories. | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,8 @@ | |
|
||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|20"}}}} --> | ||
<div class="wp-block-columns alignwide"> | ||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|base-3","width":"1px"}}}} --> | ||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--base-3);border-top-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)"> | ||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|contrast-3","width":"1px"}}}} --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes from Change from WordPress/twentytwentyfour#722 ✅ |
||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--contrast-3);border-top-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)"> | ||
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"padding":{"top":"1px"}}},"fontSize":"medium"} --> | ||
<h4 class="wp-block-heading has-text-align-center has-medium-font-size" style="padding-top:1px"> | ||
<em><?php echo esc_html_x( 'Free', 'Sample heading for the first pricing level', 'twentytwentyfour' ); ?></em> | ||
|
@@ -52,8 +52,8 @@ | |
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Access to 5 exclusive <em>Études Articles</em> per month.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast-3"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" /> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast-2"}}}},"textColor":"contrast-2"} --> | ||
|
@@ -62,8 +62,8 @@ | |
</p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast-3"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" /> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast-2"}}}},"textColor":"contrast-2"} --> | ||
|
@@ -114,16 +114,16 @@ | |
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Access to 20 exclusive <em>Études Articles</em> per month.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast-3"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" /> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:paragraph {"align":"center"} --> | ||
<p class="has-text-align-center"><?php echo esc_html_x( 'Weekly print edition.', 'Feature for pricing level', 'twentytwentyfour' ); ?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast-3"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" /> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:paragraph {"align":"center"} --> | ||
|
@@ -149,8 +149,8 @@ | |
</div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|base-3","width":"1px"}}}} --> | ||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--base-3);border-top-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)"> | ||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|contrast-3","width":"1px"}}}} --> | ||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--contrast-3);border-top-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)"> | ||
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"padding":{"top":"1px"}}},"fontSize":"medium"} --> | ||
<h4 class="wp-block-heading has-text-align-center has-medium-font-size" style="padding-top:1px"> | ||
<em><?php echo esc_html_x( 'Expert', 'Sample heading for the third pricing level', 'twentytwentyfour' ); ?></em> | ||
|
@@ -172,16 +172,16 @@ | |
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Exclusive, unlimited access to <em>Études Articles</em>.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast-3"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" /> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:paragraph {"align":"center"} --> | ||
<p class="has-text-align-center"><?php echo esc_html_x( 'Weekly print edition.', 'Feature for pricing level', 'twentytwentyfour' ); ?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast-3"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" /> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:paragraph {"align":"center"} --> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ | |
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3","className":"is-style-wide"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast","className":"is-style-wide"} --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change from WordPress/twentytwentyfour#722 ✅ |
||
<hr class="wp-block-separator has-text-color has-contrast-color has-alpha-channel-opacity has-contrast-background-color has-background is-style-wide"/> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:group {"style":{"spacing":{"blockGap":"16px"}},"layout":{"type":"constrained"}} --> | ||
|
@@ -37,8 +37,8 @@ | |
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3","className":"is-style-wide"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast","className":"is-style-wide"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-color has-alpha-channel-opacity has-contrast-background-color has-background is-style-wide"/> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:group {"style":{"spacing":{"blockGap":"26px"}},"layout":{"type":"constrained"}} --> | ||
|
@@ -62,8 +62,8 @@ | |
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:separator {"backgroundColor":"base-3","className":"is-style-wide"} --> | ||
<hr class="wp-block-separator has-text-color has-base-3-color has-alpha-channel-opacity has-base-3-background-color has-background is-style-wide" /> | ||
<!-- wp:separator {"backgroundColor":"contrast","className":"is-style-wide"} --> | ||
<hr class="wp-block-separator has-text-color has-contrast-color has-alpha-channel-opacity has-contrast-background-color has-background is-style-wide"/> | ||
<!-- /wp:separator --> | ||
|
||
<!-- wp:group {"style":{"spacing":{"blockGap":"16px"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} --> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ | |
*/ | ||
?> | ||
|
||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"},"margin":{"top":"0","bottom":"0"}},"dimensions":{"minHeight":"100vw"}},"backgroundColor":"accent-3","layout":{"type":"flex","orientation":"vertical","justifyContent":"center","verticalAlignment":"center"}} --> | ||
<div class="wp-block-group alignfull has-accent-3-background-color has-background" style="min-height:100vw;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--50)"> | ||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"},"margin":{"top":"0","bottom":"0"}},"dimensions":{"minHeight":"100vh"}},"backgroundColor":"accent-3","layout":{"type":"flex","orientation":"vertical","justifyContent":"center","verticalAlignment":"center"}} --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes from WordPress/twentytwentyfour#720 ✅ |
||
<div class="wp-block-group alignfull has-accent-3-background-color has-background" style="min-height:100vh;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--50)"> | ||
<!-- wp:group {"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:image {"align":"center","width":"45px","height":"49px","scale":"cover","sizeSlug":"full","linkDestination":"none"} --> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change from WordPress/twentytwentyfour#722 ✅