Skip to content

fix: remove redundant font-family from .response-text .inline-code#339

Open
abhiramvsmg wants to merge 1 commit into
alibaba:mainfrom
abhiramvsmg:fix/remove-redundant-mono-font
Open

fix: remove redundant font-family from .response-text .inline-code#339
abhiramvsmg wants to merge 1 commit into
alibaba:mainfrom
abhiramvsmg:fix/remove-redundant-mono-font

Conversation

@abhiramvsmg

Copy link
Copy Markdown

Removed the redundant font-family: var(--mono); declaration from .response-text .inline-code in style.css, since it's rendered as a <code> element and now inherits the same font from the new global code, pre rule added in PR #328.

Left .file-path and .tool-name untouched — they render as <span> and <strong>, not <code>/<pre>, so the global rule doesn't apply to them and removing their font-family would break monospace rendering.

Fixes #336

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ 1 posted as inline comment(s)
  • 📝 0 posted as summary

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@alibaba alibaba deleted a comment from github-actions Bot Jul 9, 2026
@lizhengfeng101

Copy link
Copy Markdown
Collaborator

Thanks for the cleanup! The reasoning is sound and I verified it end-to-end:

  • fix(viewer): fix monospace font rendering in pre/code blocks on Windows #328 added the global code, pre { font-family: var(--mono); } rule.
  • .inline-code is rendered as a <code> element (session.html:180), so it still inherits var(--mono) after the removal — no visual regression.
  • ✅ Correctly left .file-path (<span>) and .tool-name (<strong>) untouched, since the global code, pre rule does not apply to them.

One thing to fix before merge:

The declaration wasn't deleted cleanly — it was replaced with a line of trailing whitespace (and the indentation is off), leaving a dangling blank line inside the block:

.response-text .inline-code {
    background: var(--inline-code-bg);
    padding: 0.15em 0.35em;
    border-radius: 4px;
    font-size: 0.88em;
       /* <- leftover blank line with trailing spaces */
}

Please remove the whole line instead so the block ends cleanly at font-size. It won't fail CI (no .editorconfig / CSS lint here), but it adds noise to future diffs. Once that's cleaned up, this LGTM. 👍

@lizhengfeng101

Copy link
Copy Markdown
Collaborator

Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(viewer): remove redundant font-family: var(--mono) on .inline-code

3 participants