Skip to content

Commit

Permalink
Twenty Nineteen: Override flex order in comment form.
Browse files Browse the repository at this point in the history
This change updates Twenty Nineteen bundled theme to fix the DOM order in the comment form, and to add a new `.comment-form-wrapper` class to change `flex` display to `block` for this specific area.

Props garrett-eclipse, audrasjb, sabernhardt.
Fixes #46600.

Built from https://develop.svn.wordpress.org/trunk@52993


git-svn-id: http://core.svn.wordpress.org/trunk@52582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
audrasjb committed Mar 25, 2022
1 parent 746f114 commit 876dde2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
7 changes: 3 additions & 4 deletions wp-content/themes/twentynineteen/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
get_template_part( 'template-parts/post/discussion', 'meta' );
}
?>
</div><!-- .comments-title-flex -->
</div><!-- .comments-title-wrap -->
<?php
if ( have_comments() ) :

Expand Down Expand Up @@ -101,10 +101,9 @@
// Show comment form at bottom if showing newest comments at the bottom.
if ( comments_open() && 'asc' === strtolower( get_option( 'comment_order', 'asc' ) ) ) :
?>
<div class="comment-form-flex">
<span class="screen-reader-text"><?php _e( 'Leave a comment', 'twentynineteen' ); ?></span>
<div class="comment-form-flex comment-form-wrapper">
<h2 class="comments-title"><?php _e( 'Leave a comment', 'twentynineteen' ); ?></h2>
<?php twentynineteen_comment_form( 'asc' ); ?>
<h2 class="comments-title" aria-hidden="true"><?php _e( 'Leave a comment', 'twentynineteen' ); ?></h2>
</div>
<?php
endif;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@
}
}

.comment-form-wrapper,
.comment-form-wrapper .comments-title {
display: block;
}

.comment-list {
list-style: none;
padding: 0;
Expand Down
5 changes: 5 additions & 0 deletions wp-content/themes/twentynineteen/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -4693,6 +4693,11 @@ body.page .main-navigation {
display: block;
}

.comment-form-wrapper,
.comment-form-wrapper .comments-title {
display: block;
}

.comment-list {
list-style: none;
padding: 0;
Expand Down
5 changes: 5 additions & 0 deletions wp-content/themes/twentynineteen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4699,6 +4699,11 @@ body.page .main-navigation {
display: block;
}

.comment-form-wrapper,
.comment-form-wrapper .comments-title {
display: block;
}

.comment-list {
list-style: none;
padding: 0;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52992';
$wp_version = '6.0-alpha-52993';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 876dde2

Please sign in to comment.