-
Notifications
You must be signed in to change notification settings - Fork 3.2k
TwentyTwenty: make presets back compatible with older versions #2154
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,20 +206,24 @@ Inter variable font. Usage: | |
| /* GENERAL COLORS */ | ||
|
|
||
| .has-black-background-color { | ||
| --wp--preset--color--black: #000; | ||
| background-color: #000; | ||
| color: #fff; | ||
| } | ||
|
|
||
| .has-white-background-color { | ||
| --wp--preset--color--white: #fff; | ||
| background-color: #fff; | ||
| color: #000; | ||
| } | ||
|
|
||
| .has-black-color { | ||
| --wp--preset--color--black: #000; | ||
| color: #000; | ||
| } | ||
|
|
||
| .has-white-color { | ||
| --wp--preset--color--white: #fff; | ||
| color: #fff; | ||
| } | ||
|
|
||
|
|
@@ -352,19 +356,23 @@ Inter variable font. Usage: | |
|
|
||
| .editor-styles-wrapper p.has-small-font-size { | ||
| --wp--preset--font-size--small: 0.842em; | ||
| font-size: 0.842em; | ||
| } | ||
|
|
||
| .editor-styles-wrapper p.has-normal-font-size, | ||
| .editor-styles-wrapper p.has-regular-font-size { | ||
| --wp--preset--font-size--normal: 1em; | ||
| font-size: 1em; | ||
| } | ||
|
|
||
| .editor-styles-wrapper p.has-medium-font-size { | ||
| --wp--preset--font-size--medium: 1.1em; | ||
| font-size: 1.1em; | ||
| } | ||
|
|
||
| .editor-styles-wrapper p.has-large-font-size { | ||
| --wp--preset--font-size--large: 1.25em; | ||
| font-size: 1.25em; | ||
| } | ||
|
|
||
| .editor-styles-wrapper p.has-larger-font-size { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about the "larger" font size? Should it receive
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The existing issue is with the theme presets that have the same
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could it not use the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR doesn't aim to make any design change, just adapting existing presets, so that change is not required for the to work. If people think that's something worth doing I'd address it as a separate issue where design is involved, I'm not the best person to respond to that question :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't .editor-styles-wrapper p.has-larger-font-size {
--wp--preset--font-size--large: 1.5em;
font-size: 1.5em;
}(Sorry if my question is redundant. Seeking to understand)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, A different matter is whether the existing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha, I see. There is a direct correlation then between the slug and the CSS class generated. Cool. Thanks for your patience in explaining that to me. |
||
|
|
||
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.
Apparently, in addition to bringing back the regular CSS Properties, #2154 missed generating the CSS Custom Properties for these values. This PR also fixes it.