Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Remove obsolete block CSS #168

Closed
scruffian opened this issue Sep 28, 2020 · 8 comments
Closed

Remove obsolete block CSS #168

scruffian opened this issue Sep 28, 2020 · 8 comments

Comments

@scruffian
Copy link
Collaborator

There is a blocks directory inside scss. A lot of this code is from when Gutenberg block appearance in core was much less stable. However much of this code is now obsolete, and should be removed. Some of it could also be submitted to core if it's not there.

For example: Automattic/themes#2503

@carolinan
Copy link
Contributor

carolinan commented Sep 28, 2020

I also believe most of it can be removed but it was unclear why it was in Seedlet.

We have not started testing or working with individual blocks yet.
This would be updated if any changes need to be made compared to the default block code.

"Some of it could be submitted to core" I did not understand. Did you mean that we need to create issues for changing blocks in Gutenberg?

@scruffian
Copy link
Collaborator Author

Did you mean that we need to create issues for changing blocks in Gutenberg?

There are some cases where this CSS does actually fix an issue in Gutenberg blocks. In those cases we should keep the CSS temporarily, but also submit it to Gutenberg as a PR so that the fix can live in the block itself. e.g.:

WordPress/gutenberg#25291

@carolinan
Copy link
Contributor

carolinan commented Sep 29, 2020

Yes, it was the core part that I wanted clarification on.
There is a label for trac, but non for Gutenberg. We should create one when we run in to this, but it is even more likely for the full site editing project.

@carolinan
Copy link
Contributor

The action needed here is to go through the block styles here
https://github.com/WordPress/twentytwentyone/tree/trunk/assets/sass/05-blocks

Check if there are any unnecessary duplicate styles -styles that are already in WordPress core where the theme styles are overriding it even though it is not needed.

Optionally check if there any styles here that fixes a problem where an issue should be opened in Gutenberg.

@scruffian Did you have any specific block code in mind that needs to be removed?

@rolf-yoast rolf-yoast self-assigned this Oct 13, 2020
@rolf-yoast
Copy link
Collaborator

As far as I can see the scss included is all theme specific. If @carolinan agrees I would like to close this issue.

@scruffian
Copy link
Collaborator Author

An example is the Pullquote block. We have been able to remove a lot of this CSS in other themes, as the base styles from Gutenberg are already doing most of the work.

@rolf-yoast rolf-yoast removed their assignment Oct 15, 2020
@aristath
Copy link
Member

Since the theme needs to be compatible with WP5.3 I don't think there's lots of things we can clean-up here.
When checked against the Gutenberg master branch there are indeed lots of things that can be simplified. However, when checked against Gutenberg v7.0.0, a lot of things are different.
I'd say it's safer to leave them as-is to be sure things will work on older WP versions as well...

@scruffian
Copy link
Collaborator Author

I hadn't thought of that. Good point. I think we can close this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants