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

Do not apply text color if it is being overriden #24626

Merged
merged 1 commit into from
Nov 6, 2020

Conversation

webmandesign
Copy link
Contributor

Fixing #24625

@ZebulanStanphill ZebulanStanphill added [Block] Buttons Affects the Buttons Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Package] Block library /packages/block-library CSS Styling Related to editor and front end styles, CSS-specific issues. labels Aug 31, 2020
To reduce potential of style conflicts. (+2 squashed commits)
Squashed commits:
[4a3717f8da] Inherit a text color for outlined button, not forcing a specific one
[8b062a80bd] Do not apply text color if it is being overriden

Fixing WordPress#24625
@jorgefilipecosta
Copy link
Member

Hi @webmandesign,

I'm sorry I started an alternative PR because I did not notice you had PR. Apparently using the "Fixing" keyword does not link an issue to the PR. Fix, fixes, etc do the linking making it more easier to notice a PR has an issue, the full list of keywords one can use to link PR's to issues is available at https://docs.github.com/en/enterprise/2.16/user/github/managing-your-work-on-github/closing-issues-using-keywords#about-issue-references.

This PR needed a rebase, so I rebased and I kept the color #32373c. This color is essentially a default and I think removing it and using inherit may be considered a breaking change. So given that we are very close to 5.6 release I would prefer not to have this risk.

Regarding the background color fix I proposed in #26707, I think it is still needed because although the outline does not have a background by default the user is able to select one:
image

Without the fix in #26707, the background selection may not work.

So I'm merging this PR which was the first one to fix the text color issue, and then merging #26707 that fixes the background issue.

Thank you for reporting and fixing this issue 👍

@jorgefilipecosta jorgefilipecosta merged commit 826914c into WordPress:master Nov 6, 2020
@github-actions github-actions bot added this to the Gutenberg 9.4 milestone Nov 6, 2020
@webmandesign
Copy link
Contributor Author

Hi @jorgefilipecosta,

Sorry for the keyword, I'll know for the future.

Thanks for merging the PR. It's really unfortunate that Gutenberg forces the color here. As a theme author I need to override it in styles unnecessary, in my opinion. To me it makes perfect sense that outlined button inherit a text color of the container. Forcing a specific color (which does not comes from a theme) is very confusing to users.

Seeing this color I was also thinking about Gutenberg color audit. It seems there might be multiple instances of similar color forcing.

As for background color I understand your point. But from my perspective the outline styling has no specific meaning then. If a default button styling in the theme is the one as in your image, user can recreate such button even if the style is selected to be outline. Which is pretty confusing to me. Outline should remove any background. That's how I understand it. But I don't see this as big of an issue as the forced text color :)

Thanks and regards,

Oliver

@tellthemachines tellthemachines added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 11, 2020
tellthemachines added a commit that referenced this pull request Nov 12, 2020
* Cover block: Restore default overlay background (#26569)

* Restore default Cover overlay background

The default Cover block overlay background was removed. This changed the
style of existing blocks on existing sites.

Restore the default background in such a way that it does not conflict
with theme-provided background-color styles and there is no need to
artificially add extra specificity.

Fix regression: #26545

* Limit the interface skeleton to a max width of 100% to prevent some blocks managing to exceed the width (#26552)

* Cover Block: Restore opacity controls (#26625)

* Fix image block centering when resizing to a smaller size (#26376)

* Fix image block centering when resizing to a smaller size

* Revert previous 100% width fix

* Remove display: table when image block is resized to avoid centering of block

* Match frontend classes for alignment in editor

* Gallery: Remove caption fallback for alt attribute (#26676)

* Fix quote block default alignment (#26680)

* Gallery: Remove obsolete deprecation entry (#26736)

* Do not apply text color if it is being overriden (#24626)

* Fix: Preset colors don't work on button block style outline (#26707)

* Tests: Add fixture for Column deprecation (#26774)

* Fix/column width units (#26757)

* Fix issues with different units in column widths

* Columns with fixed width should keep width on recalculation

* Address review feedback

* fix undefined index notice in Social Link Block (#25663)

* fix undefined index notice

* use isset instead of array_key_exists check

* Update packages/block-library/src/social-link/index.php

Co-authored-by: Greg Ziółkowski <[email protected]>

Co-authored-by: Greg Ziółkowski <[email protected]>

* Adds in missing styling for toolbar when using text-only setting (#26769)

* Adds in missing styling for toolbar when using text-only setting

* Increases margin

* Moves style to correct file

* Inserter: Fix 'Browse All' in Quick Inserter (#26443)

* Inserter: Fix 'Browse All' in Quick Inserter

Maintain the insertion point in @wordpress/block-editor state when
moving from the Quick Inserter to the Inserter.

This fixes a bug where the insertion point is wrong after clicking a
block appender and selecting 'Browse All'.

Care is taken to not regress a previous bug where the insertion point is
wrong after clicking an inline insertion button and selecting 'Browse
ALl'.

* Inserter: Fix typo

Co-authored-by: Daniel Richards <[email protected]>

* Call getBlockInsertionPoint once

* Add useSelect dependencies

* Make setInsertionPoint unstable

* Avoid setting `isVisible` state when `SET_INSERTION_POINT` is triggered

* Make index required and clarify rootClientId usage

* Split insertionPoint into two reducers

* Fix getInsertionPoint selector that expects default state of reducer to be null

* Avoid resetting insertionPoint state on HIDE_INSERTION_POINT

Co-authored-by: Daniel Richards <[email protected]>

Co-authored-by: Jon Surrell <[email protected]>
Co-authored-by: Jacopo Tomasone <[email protected]>
Co-authored-by: Daniel Richards <[email protected]>
Co-authored-by: Bernie Reiter <[email protected]>
Co-authored-by: Greg Ziółkowski <[email protected]>
Co-authored-by: Oliver Juhas <[email protected]>
Co-authored-by: Jorge Costa <[email protected]>
Co-authored-by: Fabian Kägy <[email protected]>
Co-authored-by: Tammie Lister <[email protected]>
Co-authored-by: Robert Anderson <[email protected]>
@tellthemachines tellthemachines removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Package] Block library /packages/block-library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants