Skip to content
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
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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--code--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--code--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%;
}

Expand Down Expand Up @@ -182,10 +182,7 @@ pre {

// Style code tags but not ones inside of the code block.
.wporg-has-embedded-code *:not(.wp-block-code):not(.wp-code-block-button-container) > code {
padding: 4px 6px;
background-color: var(--wp--preset--color--light-grey-2);
font-size: var(--wp--preset--font-size--small);
border-radius: 2px;
}

.wporg-dot-link-list {
Expand Down Expand Up @@ -435,7 +432,7 @@ pre {

.wporg-developer-code-block {
$half_padding: calc(var(--wp--preset--spacing--10) / 2);
$border_radius: 2px;
$border_radius: var(--wp--custom--code--border--radius);
Copy link
Contributor

@adamwoodnz adamwoodnz Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't inline code, rather it's the container, so I don't think it should use this var. Reason being; if I were to change this variable to increase the inline code style, I don't think I'd expect these container styles to also change.

Screenshot 2024-02-20 at 3 21 02 PM


.wp-code-block-button-container {
background-color: var(--wp--preset--color--light-grey-2);
Expand Down Expand Up @@ -633,7 +630,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);
Copy link
Contributor

Choose a reason for hiding this comment

The 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 {
Expand Down
Loading