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

Highlight inline code #16141

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Content Management
- “Related To”, “Not Related To”, “Author”, and relational field condition rules now allow multiple elements to be specified. ([#16121](https://github.com/craftcms/cms/discussions/16121))
- Improved the styling of inline code fragments. ([#16141](https://github.com/craftcms/cms/pull/16141))

### Accessibility
- Improved the accessibility of Checkboxes and Radio Buttons fields that allow custom options. ([#16080](https://github.com/craftcms/cms/pull/16080))
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css.map

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/web/assets/cp/src/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,26 @@ code,
&.smalltext {
font-size: 0.8em !important;
}

.instructions &,
.pane &,
.note & {
background-color: var(--gray-100);
padding-block: 0.0625em;
padding-inline: 0.25em;
border-radius: var(--small-border-radius);
border: 1px solid var(--hairline-color);
}

.warning & {
background-color: var(--warning-background);
border-color: var(--warning-border-color);
}

.tip & {
background-color: var(--notice-background);
border-color: var(--notice-border-color);
}
}

.code {
Expand Down
4 changes: 4 additions & 0 deletions src/web/assets/cp/src/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@
--error-color-rgb: 216 31 35;
--error-color: rgb(var(--error-color-rgb));
--warning-color: var(--amber-700);
--warning-background: var(--amber-100);
--warning-border-color: var(--amber-300);
--success-color: var(--teal-700);
--notice-color: var(--sky-700);
--notice-background: var(--sky-100);
--notice-border-color: var(--sky-300);

// status colors
--enabled-color: var(--teal-550);
Expand Down