-
Notifications
You must be signed in to change notification settings - Fork 71
feat(typography): ✨ improve emphasis styles for East Asian scripts #1165
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
Conversation
WalkthroughRefactors language-specific emphasis styling in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
There was a problem hiding this 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
📒 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
LGTM other than the block comment. |
There was a problem hiding this 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
&: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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
&: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.
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). |
Let's continue with the slash comments then. |
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