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
Fix block border color issues in bundled themes (Pullquote) #2944
base: trunk
Are you sure you want to change the base?
Fix block border color issues in bundled themes (Pullquote) #2944
Conversation
Hi @adamwoodnz! 👋 Thank you for your contribution to WordPress! 💖 It looks like this is your first pull request to No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making. More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post. Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook. If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook. The Developer Hub also documents the various coding standards that are followed:
Thank you, |
src/wp-content/themes/twentynineteen/sass/variables-site/_colors.scss
Outdated
Show resolved
Hide resolved
27ea788
to
281ba6e
Compare
src/wp-content/themes/twentytwentyone/assets/sass/07-utilities/color-palette.scss
Outdated
Show resolved
Hide resolved
5cc4a96
to
3561188
Compare
a24d9ca
to
3f42dec
Compare
3f42dec
to
64bfa9b
Compare
Thank you for continuing the work on this feature. The CSS changes are still needed. I have opened a related issue in the Gutenberg GitHub repo: |
You're welcome!
To be clear; do you mean there is more work to do in this PR? |
Yes I think the theme support should be added to the functions.php files setup functions. Otherwise the user can not take full advantage of the CSS border changes? |
So will that mean that any block that supports border added in these themes, will now get border controls displayed? How far back do you think we should add this support.. beyond twentynineteen? |
Ah yes I can see this working after adding it. |
5f71b29
to
4722757
Compare
Lets start with these 3 themes because the PR has the potential to grow too big. |
Discovered that twentytwenty actually has border styles off for the pullquote block. It seems that the fix should be to disable the controls in that scenario. It also has no padding so if you change background color it doesn't look great: We could allow border and improve the styling by changing the styles to something like: .editor-styles-wrapper .wp-block-pullquote {
color: inherit;
position: relative;
text-align: center;
}
.editor-styles-wrapper .wp-block-pullquote:not(.has-border-color):not([style*=border-width]) {
border: none;
padding: 0;
} Thoughts @carolinan ? |
I was wrong this was only in the editor. Added a fix to add editor support. Haven't addressed padding. |
I've now tested the 3 themes with pullquote and group blocks, including changing colors with customizer and custom block colors, and I believe all are working as expected. Are there any other blocks in particular that you think warrant testing? |
afa1d81
to
2cb9c56
Compare
These E2E tests seem very flaky; failures due to |
2cb9c56
to
3ea251f
Compare
I've just rebased again @carolinan, are you able to give this another review please? Pretty keen to get this wrapped up 🙂 |
3ea251f
to
673d339
Compare
- fixes issues with Pullquote border styling
…for nested blocks
673d339
to
5e7d505
Compare
This PR fixes issues with block border colors in the bundled Twenty Twenty One, Twenty Twenty and Twenty Nineteen themes, in particular the Pullquote block.
Currently when a border color is set from the theme color palette for a Pullquote block, it is shown in the editor but not on the frontend. This includes when these colors are changed through the customizer. Custom colors selected through the border color block setting are applied correctly.
Style rules have been added targeting classes already applied to the blocks, eg.
.has-primary-border-color
. As such the effects will not be limited to the Pullquote block, but I'm yet to find another block affected.Closes https://core.trac.wordpress.org/ticket/55974
NOTE: Testing notes on the ticket also mention that there are issues with Twenty Sixteen and Twenty Fifteen, but this PR does not address those.
Screenshots
Twenty Twenty One
Twenty Twenty
Twenty Nineteen
Testing
Tested in Chrome, Firefox, Safari and Edge on MacOS.
Steps
For each of the themes Twenty Twenty One, Twenty Twenty and Twenty Nineteen:
Default colors
Customized theme colors (not supported in Twenty Twenty One)
Custom block colors