fix(markdown): improve visual style of kbd elements#3989
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughUpdated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3989/ |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/markdown/partial-styles/_kbd.scss`:
- Line 28: The box-shadow line in _kbd.scss uses a mixed unit typo ("0.375px")
that should be rem to match the project's shadow conventions; change the
blur-radius from 0.375px to 0.375rem so the box-shadow entry (the line
containing "0 0.625rem 0.375px -0.5rem rgb(var(--color-black), 0.02)") uses
consistent rem units with the rest of the shadows.scss definitions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9f56d5e7-6e1e-4ed4-8e22-92f34a69f3e9
📒 Files selected for processing (1)
src/components/markdown/partial-styles/_kbd.scss
Consolidated PR Review -- 6 DimensionsPR SummaryThis PR modifies 1. Backward Compatibility -- FAIR
|
| Dimension | Verdict |
|---|---|
| Backward Compatibility | FAIR |
| Code Quality | ACCEPTABLE |
| Architecture | GOOD |
| Security | SAFE |
| Observability | SAFE |
| Performance | GOOD |
Top Recommendations
- [Medium from Backward Compatibility] The
::first-letter { text-transform: uppercase }rule silently changes how<kbd>content is displayed in markdown (e.g.,ctrlbecomesCtrl). Consider whether this is intentional -- if so, document it in the PR description as a behavioral change, not just a visual fix. If authors should control casing, remove this rule from the shared_kbd.scssand let the hotkey component apply it to its own nested<span>as it already does. - [Medium from Code Quality] The
::first-letterapproach differs between this file (applied tokbddirectly) andhotkey.scss(applied to a nestedspan). When markdown produces nested<kbd>elements for key combinations, the pseudo-element may not behave as intended. Consider aligning the approach or verifying behavior with nested elements.
🤖 Generated with Claude Code
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/markdown/partial-styles/_kbd.scss`:
- Around line 3-30: The kbd styling lost the intentional keycap-first-letter
transform; restore the uppercase rule by adding an ::first-letter selector to
the kbd block (e.g., within the existing kbd { ... } rules add &::first-letter {
text-transform: uppercase; }) so key labels render with an uppercase first
letter consistent with previous keycap presentation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: acef7021-0dd2-4b45-bb03-20a55f9c67d5
📒 Files selected for processing (1)
src/components/markdown/partial-styles/_kbd.scss
c53fa25 to
4ae8884
Compare
|
🎉 This PR is included in version 39.10.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
Review:
Browsers tested:
(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)
Windows:
Linux:
macOS:
Mobile: