You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file block uses some styles (background color), but not all from the button (radius, borders).
The button in the file block should look the same as a regular button.
Additionally und unfortunately, since it is not even a real button, it's not possible to select buttons styles, which is a pitty.
Step-by-step reproduction instructions
Change the global styles of a button
Insert a file block with a opinionated styles
Screenshots, screen recording, code snippet
Environment info
WP 6.2.2
GB 16.2.1
custom theme
Please confirm that you have searched existing issues in the repo.
No
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Confirmed this in testing - the File block button neither uses the Button styles set in global styles, nor has any controls to customize the styling of it.
I believe this issue is also related to #51272. As #51272 suggests, this issue could also be resolved if we could apply styles via global styles to elements inside individual blocks.
I'm not sure that the File Block should inherit styles from a different block.
However, maybe the File Block could use an inner Button Block? Then it should naturally inherit Button Block styles, since it would contain that block. I proposed this here: #57314
This appears resolved by #41753 (file download link already carries .wp-element-button so it inherits global Button element color/typography styles) and #64509 (added full border support — radius/color/width/style — to the File block). The remaining gap noted, using an inner Button block instead, is tracked separately in #57314. Closing this one as addressed.
Activity
jordesign commentedon Aug 2, 2023
Confirmed this in testing - the File block button neither uses the Button styles set in global styles, nor has any controls to customize the styling of it.
t-hamano commentedon Aug 2, 2023
I believe this issue is also related to #51272. As #51272 suggests, this issue could also be resolved if we could apply styles via global styles to elements inside individual blocks.
creativecoder commentedon Dec 21, 2023
I'm not sure that the File Block should inherit styles from a different block.
However, maybe the File Block could use an inner Button Block? Then it should naturally inherit Button Block styles, since it would contain that block. I proposed this here: #57314
jasmussen commentedon Aug 13, 2026
This appears resolved by #41753 (file download link already carries .wp-element-button so it inherits global Button element color/typography styles) and #64509 (added full border support — radius/color/width/style — to the File block). The remaining gap noted, using an inner Button block instead, is tracked separately in #57314. Closing this one as addressed.