Skip to content

Commit

Permalink
[JENKINS-70805] Remove !important from styles in <pre> (#7836)
Browse files Browse the repository at this point in the history
* [JENKINS-70805] Remove `!important` from styles in `<pre>`.

Jenkins should allow plugins to change the fonts in themes
or plugins that render preformatted text.

* Restore spacing of `<pre>` in CodeMirror.

---------

Co-authored-by: Tim Jacomb <[email protected]>
Co-authored-by: Alexander Brandes <[email protected]>
  • Loading branch information
3 people authored May 1, 2023
1 parent cde5a55 commit 7a75b7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions war/src/main/scss/base/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ pre {
padding: 0.8rem 1rem;
border-radius: 10px;
background-color: var(--pre-background);
color: var(--pre-color) !important;
font-family: var(--font-family-mono) !important;
font-weight: 500 !important;
line-height: 1.66 !important;
color: var(--pre-color);
font-family: var(--font-family-mono);
font-weight: 500;
line-height: 1.66;

a {
font-weight: inherit;
Expand Down
7 changes: 7 additions & 0 deletions war/src/main/scss/form/codemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
cursor: text;
margin-bottom: var(--section-padding);

// Override the defaults of codemirror.css
pre {
font-family: var(--font-family-mono) !important;
font-weight: 500 !important;
line-height: 1.66 !important;
}

&:hover {
border-color: var(--input-border-hover);
}
Expand Down

0 comments on commit 7a75b7c

Please sign in to comment.