Skip to content

Conversation

AmeroHan
Copy link
Contributor

@AmeroHan AmeroHan commented Oct 16, 2025

clreq: dots are used in both horizontal and vertical writing modes.
mlreq: wavy lines are used instead of dots.

And I fixed a bug introduced in 2d9febf making Chinese text-emphasis-position failed to apply.

Summary by CodeRabbit

  • New Features
    • Added dedicated Mongolian (mn-Mong) emphasis handling, including a vertical-text fallback using a wavy underline.
  • Bug Fixes
    • Corrected emphasis rendering for Chinese and Korean with appropriate markers and positioning for improved readability.
    • Standardized Mongolian (mn) text style to avoid unintended italics.
  • Style
    • Reorganized language-specific typography rules for clearer, more consistent emphasis behavior.
  • Documentation
    • Added inline comments explaining language-specific emphasis assumptions and current limitations.

@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Refactors language-specific emphasis styling in typography.less: replaces a shared emphasis block with separate per-language em rules, adds text-emphasis/-webkit-text-emphasis for zh and ko, normalizes mn, introduces a mn-Mong vertical-text placeholder, and adds explanatory comments.

Changes

Cohort / File(s) Summary
Typography emphasis rules
resources/skins.citizen.styles/common/typography.less
Split combined language emphasis handling into per-language blocks. Added font-style: normal for mn. Added text-emphasis and -webkit-text-emphasis shapes/positions for zh and ko. Reorganized ja ordering. Added mn-Mong vertical-text placeholder (text-decoration: underline wavy) and inline comments about language-specific assumptions/limitations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble at selectors, tidy and spry,
placing dots where zh and ko fly.
mn stands upright, calm and clear,
Mongol waves whisper — a placeholder cheer. 🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title accurately captures the core change by stating that emphasis styles for East Asian scripts are being improved, and it aligns with both the raw summaries of language-specific typographic updates and the PR objectives. It is concise, specific, and directly related to the modifications described without introducing unrelated topics.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ae0f48 and 8a3d382.

📒 Files selected for processing (1)
  • resources/skins.citizen.styles/common/typography.less (1 hunks)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a3d382 and c3c0c29.

📒 Files selected for processing (1)
  • resources/skins.citizen.styles/common/typography.less (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: 🔍 CI
resources/skins.citizen.styles/common/typography.less

[error] 68-68: stylelint: Unexpected double-slash CSS comment (no-invalid-double-slash-comments)

}

em {
// Languages that do not use italics for emphasis
Copy link
Member

Choose a reason for hiding this comment

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

Would you be able to use block comment instead of slash comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Sorry for forgetting to lint before commit.

@alistair3149
Copy link
Member

LGTM other than the block comment.
Thanks for your deep dive into emphasis styles!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3c0c29 and bc02e53.

📒 Files selected for processing (1)
  • resources/skins.citizen.styles/common/typography.less (1 hunks)

Comment on lines +91 to 95
&:lang( mn-Mong ) {
// For vertical text, wavy line should appear on the right side
// but we are unable to implement that
text-decoration: underline wavy;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Convert remaining slash comment to block comment.

CI previously failed on no-invalid-double-slash-comments; these new // lines will keep tripping stylelint. Switch them to a /* … */ block to satisfy the linter.

-		// For vertical text, wavy line should appear on the right side
-		// but we are unable to implement that
+		/* For vertical text, wavy line should appear on the right side,
+		 * but we are unable to implement that */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
&:lang( mn-Mong ) {
// For vertical text, wavy line should appear on the right side
// but we are unable to implement that
text-decoration: underline wavy;
}
&:lang( mn-Mong ) {
/* For vertical text, wavy line should appear on the right side,
* but we are unable to implement that */
text-decoration: underline wavy;
}
🤖 Prompt for AI Agents
In resources/skins.citizen.styles/common/typography.less around lines 91 to 95,
the two single-line `//` comments inside the `&:lang( mn-Mong )` block violate
the `no-invalid-double-slash-comments` linter rule; replace those `//` comments
with a single or two `/* ... */` block comments (e.g., convert each `// ...`
into `/* ... */` or combine into one `/* For vertical text, wavy line should
appear on the right side but we are unable to implement that */`) so the file
uses valid block comments and stylelint stops failing.

@AmeroHan
Copy link
Contributor Author

I have submitted the revised code. However, I still have a question: when should I use block comments, and when should I use slash comments? I haven't seen a clear distinction in the code regarding their respective use cases (such as documentation comments versus general comments).

@alistair3149
Copy link
Member

alistair3149 commented Oct 16, 2025

I have submitted the revised code. However, I still have a question: when should I use block comments, and when should I use slash comments? I haven't seen a clear distinction in the code regarding their respective use cases (such as documentation comments versus general comments).

Generally when the comment is multi-line, we should use a comment block.
EDIT: It seems that the official Wikimedia coding conventions suggests using slash comment at all times: https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Comments

Let's continue with the slash comments then.

@alistair3149 alistair3149 merged commit 4e82bdc into StarCitizenTools:main Oct 16, 2025
5 checks passed
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.

2 participants