-
Notifications
You must be signed in to change notification settings - Fork 360
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
Move CSS from style.css to theme.json or block stylesheets #8634
base: trunk
Are you sure you want to change the base?
Conversation
Also, all search blocks should be styled the same regardless of whether they're in the sidebar or not.
Preview changesI've detected changes to the following themes in this PR: Course. I will update this comment with the latest preview links as you push more changes to this PR. Note The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions. |
Core editor styles override the custom styles if set in `theme.json`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for taking on such a big cleanup!
Overall it looks great! I've noticed just a few minor bugs:
- The "Contact Teacher" button is missing some padding. The "Reset Lesson" and "Complete Lesson" buttons have the same issue.
- The buttons are a bit bigger compared to before. I'm not sure if this is intended.
![image](https://private-user-images.githubusercontent.com/1612178/407804075-96c7296d-f6a9-4043-8a65-6cf11c844100.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzcyMTEsIm5iZiI6MTczOTMzNjkxMSwicGF0aCI6Ii8xNjEyMTc4LzQwNzgwNDA3NS05NmM3Mjk2ZC1mNmE5LTQwNDMtOGE2NS02Y2YxMWM4NDQxMDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMDUwODMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWQwNDc5OWJiMjI1M2UxYTdlMDcwNWM5MDMyMjliYzc4MTM2ZjBmY2E1ZTMyZTgxYmExNjY4ZThlZDZlZjczMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VutdFhy_Yx1h7NAkNZtFxqUmzmNIsMiLnf5f5suOCFY)
(before -> after)
Thanks @m1r0! I took a quick peek but wasn't able to reproduce the Contact Teacher button issue immediately. I know they are Outline style buttons. Would you mind checking the DevTools to see what's happening there? It's clearly not getting the same padding as the Fill style. 🙏🏻 |
@m1r0 The padding shouldn't be any different. The only related change I made was to move the custom button padding from I spent some more time trying to reproduce these issues but wasn't able to. Perhaps there are some Global Styles / site editor template customizations that need to be reset? There are a bunch of other style-related issues that I'd like to address once I'm finished with this one. |
For the padding issue, it almost looks like your button is still trying to reference the CSS padding variable for some reason (maybe because the CSS was cached?), but can't find it because it was removed. To be safe, I've reverted the padding changes in 615cb6c. This should resolve the issue with the button height as well. 🙌🏻 Thanks for the review! |
Thanks for the updates, Donna! It's better but the button styles are still a bit off: ![]() ![]() ![]() (before -> after) If this helps, you can reproduce it in WP Playground. Here are the Playground links that include the Sensei plugin for trunk and your branch. |
Changes proposed in this Pull Request:
This PR seeks to clean up
style.css
, putting the CSS intheme.json
where possible (and when there aren't too many styles), or block stylesheets otherwise.It also puts the block styles in alpha order in
theme.json
for ease of maintenance.Testing Instructions
Click around in the frontend and in the editor and ensure the UI looks the same as before. Specific things to check: