-
Notifications
You must be signed in to change notification settings - Fork 198
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
Let buttons get their styles from the theme #7587
Conversation
It messes up the button styles and uses very little CSS from that stylesheet otherwise.
Test the previous changes of this PR with WordPress Playground. |
WordPress Dependencies ReportThe
This comment was automatically generated by the |
Sensei should not be so opinionated.
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Tested it with the following themes: Course, Astra, Divi, 2021. I noticed that in Astra without Learning Mode comments look not well. I'm attaching also a screenshot of a post page with comment where the comments look fine. And in Divi with Learning Mode comments look also not well... And the comment submit button looks unstyled. (Screenshots below.) Preparation:With Learning ModeCourse ThemeAstraDivi2021Without Learning ModeCourse ThemeAstraDivi2021 |
@merkushin I think a lot of that is expected. I concentrated primarily on making the Course theme comments look good, so if there are any issues there I would definitely want to fix those. After that, I concentrated on ensuring that the button styles matched what the theme uses. So for Astra, for example, the buttons now use Astra's button styles. One improvement I will try to make in this PR is to have the non-block themes use Learning Mode's button styles instead of the theme's, but I don't think I'll attempt to fix any other sort of spacing issues (unless they didn't exist before this PR). |
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.
Comments in the Course theme look good.
After that, I concentrated on ensuring that the button styles matched what the theme uses.
In Divi I noticed the submit button is unstyled at all, it uses neither Course theme styles, nor Divi styles.
But if our focus here is only on the Course theme, then it's fine.
Test the previous changes of this PR with WordPress Playground. |
@merkushin I've updated the Post Comment button styles in Learning Mode for both classic and block themes in 0d4a268 and 3872b8a. The button should now look similar to the Next Lesson button, but without a border. DiviNote that I didn't attempt to style the Reply "button" as Divi is doing some fancy things there. Twenty Twenty Four |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
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.
Thanks for the update! The button looks good everywhere now! :)
Resolves #7090.
Proposed Changes
frontend.css
is loaded for lessons in Learning Mode, even though LM lessons uses very little of the CSS in that file. This CSS file is responsible for styling buttons, which was the reason why the comment styling looked so bad.To resolve this, this PR stops loading
frontend.css
for lessons in Learning Mode. To facilitate this change, it also:frontend.scss
and into a block-specific stylesheet (lesson-properties.scss
).single-lesson-style.scss
.Note that I didn't reference the Figma designs linked in the issue as it's no longer possible to see things like spacing, colors etc. without Figma's Dev Mode. So I just tried to make it look decent.
Testing Instructions
Note: There may be slight differences between the comments in Learning Mode vs. those in the legacy view (i.e. non-Learning Mode) for the Course theme, as the ones in the legacy view already have some non-default block settings set for the comment-related blocks in https://github.com/Automattic/themes/blob/trunk/course/patterns/comments.php. The differences will be theme-dependent.
Pre-Merge Checklist
Screenshots
No Learning Mode, Course Theme - Before
No Learning Mode, Course Theme - After
Learning Mode, Course Theme - After