Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block canvas: remove unneeded CSS #6752

Closed
wants to merge 6 commits into from
Closed
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
30 changes: 3 additions & 27 deletions block-canvas/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Author: Automattic
Author URI: https://automattic.com/
Description: Block Canvas is a simple theme that supports full-site editing. It comes with a set of minimal templates and design settings that can be manipulated through Global Styles. Use it to build something beautiful.
Requires at least: 6.0
Tested up to: 6.0
Tested up to: 6.1
Requires PHP: 5.7
Version: 0.0.20
Version: 0.0.18
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: block-canvas
Expand All @@ -29,7 +29,6 @@ GNU General Public License for more details.

/*
* Font smoothing
* https://github.com/WordPress/gutenberg/issues/35934
*/
body {
-moz-osx-font-smoothing: grayscale;
Expand All @@ -39,37 +38,14 @@ body {
/*
* Control the hover stylings of outline block style.
* Unnecessary once block styles are configurable via theme.json
* https://github.com/WordPress/gutenberg/issues/42794
* https://github.com/WordPress/gutenberg/issues/42794 and https://github.com/WordPress/gutenberg/issues/44417
*/
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
background-color: var(--wp--preset--color--secondary);
color: var(--wp--preset--color--background);
border-color: var(--wp--preset--color--secondary);
}

/**
* Currently table styles are only available with 'wp-block-styles'
* theme support (block css) thus the following needs to be included
* since 'wp-block-styles' aren't used for this theme.
* https://github.com/WordPress/gutenberg/issues/45065
*/
.wp-block-table thead {
border-bottom: 3px solid;
}
.wp-block-table tfoot {
border-top: 3px solid;
Comment on lines -56 to -60
Copy link
Member

Choose a reason for hiding this comment

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

I think these are still needed too.

Copy link
Member

Choose a reason for hiding this comment

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

We can remove these lines now as Core includes them in the default styles: WordPress/gutenberg#46567.

We should probably wait for GB 14.9 to be released before merging this.

}
.wp-block-table td,
.wp-block-table th {
padding: var(--wp--preset--spacing--30);
border: 1px solid;
word-break: normal;
}
.wp-block-table figcaption {
font-size: var(--wp--preset--font-size--small);
text-align: center;
Comment on lines -69 to -70
Copy link
Member

Choose a reason for hiding this comment

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

It looks like these lines are still needed, but I recently opened a GB PR to address this: WordPress/gutenberg#46172 (I meant to look at this a while ago and this reminded me!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for following up — can we proceed with removing these or do you think some of the styles above are still needed?

Copy link
Member

Choose a reason for hiding this comment

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

I guess it depends on how opinionated Block Canvas should be. I quite like the default styles of this caption being a smaller font size and centered, but perhaps we should remove these styles so we're relying on the defaults Core provides?

We could also use the caption element in theme.json to at least apply the small font size, rather than using CSS here.

}

/*
* Link styles
* https://github.com/WordPress/gutenberg/issues/42319
Expand Down