-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update inline code padding and use border-radius variable #447
Open
ndiego
wants to merge
3
commits into
WordPress:trunk
Choose a base branch
from
ndiego:update-inline-code-styles
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,17 +32,17 @@ pre { | |
padding: 20px; | ||
background-color: #f7f7f7; | ||
border: 1px solid var(--wp--preset--color--light-grey-1); | ||
border-radius: 2px; | ||
border-radius: var(--wp--custom--button--border--radius); | ||
overflow: scroll; | ||
} | ||
|
||
code { | ||
display: inline-block; | ||
line-height: var(--wp--custom--body--extra-small--typography--line-height); | ||
background: var(--wp--preset--color--light-grey-2); | ||
border-radius: 2px; | ||
padding-inline-start: 3px; | ||
padding-inline-end: 3px; | ||
border-radius: var(--wp--custom--button--border--radius); | ||
padding-inline-start: 0.25em; | ||
padding-inline-end: 0.25em; | ||
renintw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
max-width: 100%; | ||
} | ||
|
||
|
@@ -185,7 +185,7 @@ pre { | |
padding: 4px 6px; | ||
background-color: var(--wp--preset--color--light-grey-2); | ||
font-size: var(--wp--preset--font-size--small); | ||
border-radius: 2px; | ||
border-radius: var(--wp--custom--button--border--radius); | ||
} | ||
|
||
.wporg-dot-link-list { | ||
|
@@ -435,7 +435,7 @@ pre { | |
|
||
.wporg-developer-code-block { | ||
$half_padding: calc(var(--wp--preset--spacing--10) / 2); | ||
$border_radius: 2px; | ||
$border_radius: var(--wp--custom--button--border--radius); | ||
|
||
.wp-code-block-button-container { | ||
background-color: var(--wp--preset--color--light-grey-2); | ||
|
@@ -633,7 +633,7 @@ pre { | |
color: var(--wp--custom--wporg-callout--color--text); | ||
background-color: var(--wp--custom--wporg-callout--color--background); | ||
border-width: 0; | ||
border-radius: 2px; | ||
border-radius: var(--wp--custom--button--border--radius); | ||
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. I think we should revert this, as it's a value copied from mu-plugins, see comment. |
||
font-size: var(--wp--preset--font-size--small); | ||
|
||
&::before { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While this is the same value, semantically it's a different use, and I think we should add a new custom var
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.
Are you suggesting adding style in the parent theme here? If so, do you think we should also include the complete styling for the code here, like the color of the code, padding, etc.? Perhaps we can ask the design team to provide a standard design for the code.
And what do you think we should call this? I reckon a callout is not a typical button or code?
Or you're just referring to adding something like these two.
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.
Yep exactly that. I guess it makes sense to add it to parent, even if most child themes might not use it.
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.
Callouts are definitely different, not sure what you're asking here sorry... can you expand on it?
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.
Ah, yeah. I'm referring to the
button
in the--wp--custom--button--border--radius
.Since this border radius belongs to a callout, I assume we also want it to be something like
--wp--custom--callout--border--radius
.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.
The custom code block style has been added to parent. And the button has also been replaced with code here through 39fb3f1.
Results
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.
Sorry I get it now. Yeah I don't think this change should be included, unless we're going to update the mu-plugins callout styles to also use a var.