Skip to content

Commit

Permalink
BaseControl: change label's display: block (#63911)
Browse files Browse the repository at this point in the history
* BaseControl: change label to `display: block`

* Remove unnecessary font-weight override

* Remove unnecessary display: block overrides

* CHANGELOG

* snapshots

---

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
  • Loading branch information
7 people authored and pull[bot] committed Sep 4, 2024
1 parent d6243ca commit 063f5d0
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/gallery/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@

.gallery-image-sizes {
.components-base-control__label {
display: block;
margin-bottom: 4px;
}

Expand Down
4 changes: 0 additions & 4 deletions packages/block-library/src/latest-posts/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
}

.editor-latest-posts-image-alignment-control {
.components-base-control__label {
display: block;
}

.components-toolbar {
border-radius: $radius-block-ui;
}
Expand Down
4 changes: 0 additions & 4 deletions packages/block-library/src/video/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@
}

.editor-video-poster-control {
.components-base-control__label {
display: block;
}

.components-button {
margin-right: $grid-unit-10;
}
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

### Bug Fixes

- `BaseControl`: change label's `display` to `block`. ([#63911](https://github.com/WordPress/gutenberg/pull/63911))
- `ComboboxControl`: Fix ComboboxControl reset button when using the keyboard. ([#63410](https://github.com/WordPress/gutenberg/pull/63410))
- `Button`: Never apply `aria-disabled` to anchor ([#63376](https://github.com/WordPress/gutenberg/pull/63376)).
- `SelectControl`: Fix hover/focus color in wp-admin ([#63855](https://github.com/WordPress/gutenberg/pull/63855)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const StyledField = styled.div`
const labelStyles = css`
${ baseLabelTypography };
display: inline-block;
display: block;
margin-bottom: ${ space( 2 ) };
/**
* Removes Chrome/Safari/Firefox user agent stylesheet padding from
Expand Down
5 changes: 0 additions & 5 deletions packages/components/src/border-control/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import {

import type { Border } from './types';

const labelStyles = css`
font-weight: 500;
`;

const focusBoxShadow = css`
box-shadow: inset ${ CONFIG.controlBoxShadowFocus };
`;
Expand Down Expand Up @@ -140,7 +136,6 @@ export const borderControlPopoverControls = css`
> div:first-of-type > ${ StyledLabel } {
margin-bottom: 0;
${ labelStyles }
}
&& ${ StyledLabel } + button:not( .has-text ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down Expand Up @@ -369,7 +369,7 @@ exports[`ToggleGroupControl controlled should render correctly with text options
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down Expand Up @@ -593,7 +593,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down Expand Up @@ -923,7 +923,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down Expand Up @@ -214,7 +214,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
display: inline-block;
display: block;
margin-bottom: calc(4px * 2);
padding: 0;
}
Expand Down

0 comments on commit 063f5d0

Please sign in to comment.