Inconsistent padding behavior when background color is applied via Inspector vs Global Styles
Description
When applying a background color to a Paragraph block, when background color is applied via Global styles no padding is added but when background color is added via inspector controls we can observe padding is added which is inconsistent behavior.
Steps to Reproduce
- Add a Paragraph block with text.
Case 1 : Inspector
- Apply background color from block sidebar.
- Observe padding is added.
Case 2 : Global Styles
- Apply background color via Global Styles.
- Observe no padding is added.
Screenshots or Screencast
Expected behavior
Background color styling should behave consistently regardless of whether it is applied via Global Styles or block-level controls.
Actual behavior
Padding is only applied when background color is set via block inspector, leading to inconsistent layout.
Other Notes
Other than it , this behavior which is when we add background color to paragraph block automatically adds padding as well which i feel strange behaviour because some user may want to just apply background color but user gets unnecessary padding as well. I know it is intended behaviour because i debugged and found out below code so it seems that it is intended behavior but it feels strange.
https://github.com/WordPress/gutenberg/blob/1e811c49e4ae04abd76047776cf23779cc2ccb13/packages/block-library/src/paragraph/style.scss#L43-L46
Closing as a duplicate of #38141