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

Remove meta boxes area inputs styles. #5561

Merged
merged 2 commits into from
Mar 14, 2018

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Mar 12, 2018

This PR tries to make sure the styles of the content added by plugins in the meta boxes area stay unchanged.

I'd propose to consider content in the meta boxes area as "legacy content": plugins already style their content based on the current WordPress styles and they shouldn't be forced to adapt because Gutenberg provides new styles.

Specifically, this PR removes all styles applied to input (all inputs), select, and textarea elements allowing them to inherit from the WP styles. Note: also removes a rule for a #post element that is not used any longer (it was a form element in previous meta boes area implementation).

Example before:

screen shot 2018-03-12 at 11 24 16

After:

screen shot 2018-03-12 at 11 16 40

Worth noting the meta boxes area below the post is really "legacy" since plugins are strongly encouraged to integrate following the new Gutenberg patterns (Sidebar API etc.).

Fixes #5482.

@afercia afercia requested a review from jasmussen March 12, 2018 10:28
@jasmussen
Copy link
Contributor

I tend to agree with the reasoning here, and given that removing the override styles simplifies the code, I think that aspect makes sense too. Overriding CSS in general, no matter the intent, is a form of technical debt, so thumbs up to that.

Just to get a sanity check, adding Gutenberg-Core for review, though.

@jasmussen jasmussen requested a review from a team March 12, 2018 10:36

.edit-post-meta-boxes-area__clear {
clear: both;
&__clear {
Copy link
Member

Choose a reason for hiding this comment

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

FWIW I found the previous form, with independent selector, to be more readable. I tend to avoid & except for applying modifiers (&.is-empty, &:disabled)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No strong preferences. I tend to put everything inside a block when there's a prefix to use. Will resolve conflicts and wait.

@aduth
Copy link
Member

aduth commented Mar 14, 2018

Needs conflicts resolved before merge.

@jasmussen
Copy link
Contributor

And maybe also wait an hour until 2.4 is released.

@aduth aduth mentioned this pull request Mar 14, 2018
3 tasks
@afercia afercia merged commit e9c1c20 into master Mar 14, 2018
@afercia afercia deleted the update/meta-boxes-area-remove-inputs-styles branch March 14, 2018 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants