Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backport-changelog/7.1/13105.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/13105

* https://github.com/WordPress/gutenberg/pull/81160
Comment on lines +1 to +3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarthaknagoshe2002 Could you move this file to the backport-changelog/7.2/ directory? This is because this PR will actually be released in 7.2.

1 change: 1 addition & 0 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ private static function sanitize_viewport_settings( $viewport_settings ) {
// The block classes are necessary to target older content that won't use the new class names.
'caption' => '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
'cite' => 'cite',
'label' => 'label',
Comment thread
sarthaknagoshe2002 marked this conversation as resolved.
'select' => 'select',
'textInput' => 'textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=text],[type=tel],[type=url])',
);
Expand Down
8 changes: 4 additions & 4 deletions packages/block-library/src/categories/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
&.wp-block-categories-dropdown.aligncenter {
text-align: center;
}
& .wp-block-categories__label:not(.screen-reader-text) {
width: 100%;
display: block;
}
}
:where(.wp-block-categories__label:not(.screen-reader-text)) {
width: 100%;
display: block;
}
17 changes: 7 additions & 10 deletions packages/block-library/src/comments/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@
font-size: 0.875em;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
label {
display: block;
margin-bottom: 0.25em;
}
}

.comment-form {

textarea,
Expand Down Expand Up @@ -140,6 +130,13 @@
}
}

:where(.wp-block-post-comments .comment-form-comment label),
:where(.wp-block-post-comments .comment-form-author label),
:where(.wp-block-post-comments .comment-form-email label),
:where(.wp-block-post-comments .comment-form-url label) {
display: block;
margin-bottom: 0.25em;
}

// Using :where to give this a low specificity so that element styles take precedence.
// Needed for backwards compatibility.
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/form-input/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.wp-block-form-input__label {
:where(.wp-block-form-input__label) {
width: 100%;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -30,7 +30,7 @@
}
}

.wp-block-form-input__label-content {
:where(.wp-block-form-input__label-content) {
width: fit-content;
}

Expand Down
16 changes: 7 additions & 9 deletions packages/block-library/src/post-comments-form/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@
}
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
label {
display: block;
margin-bottom: 0.25em;
}
}

.comment-form-cookies-consent {
display: flex;
gap: 0.25em;
Expand All @@ -85,3 +76,10 @@
}
}
}

:where(.wp-block-post-comments-form .comment-form-author label),
:where(.wp-block-post-comments-form .comment-form-email label),
:where(.wp-block-post-comments-form .comment-form-url label) {
display: block;
margin-bottom: 0.25em;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/search/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $button-spacing-y: math.div($grid-unit-15, 2); // 6px
max-width: 100%;
}

.wp-block-search__label {
:where(.wp-block-search__label) {
width: 100%;
}

Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/search/theme.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.wp-block-search {
.wp-block-search__label {
font-weight: bold;
}
:where(.wp-block-search .wp-block-search__label) {
font-weight: bold;
}

.wp-block-search__button {
Expand Down
1 change: 1 addition & 0 deletions packages/blocks/src/api/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ export const __EXPERIMENTAL_ELEMENTS: Record< string, string > = {
caption:
'.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
cite: 'cite',
label: 'label',
select: 'select',
textInput:
'textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=url])',
Expand Down
3 changes: 3 additions & 0 deletions schemas/json/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2368,6 +2368,9 @@
}
]
},
"label": {
"$ref": "#/definitions/stylesPropertiesComplete"
},
"select": {
"allOf": [
{
Expand Down
Loading