Use canonical cases for tailwindcss classes#166
Conversation
✅ Deploy Preview for accessible-astro-starter-incluud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughThis pull request updates styling across multiple Astro components and MDX project files, primarily replacing fixed pixel-based height utilities ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
src/pages/blog/[post].astro (1)
76-103: Theh-62.5utility in this file is correct; however, fix theh-h-62.5typo in other files.The images in [post].astro correctly use
h-62.5, which is valid Tailwind v4 arbitrary syntax (generatesheight: 62.5). However, other files in the codebase useh-h-62.5(a typo), which attempts to generate invalid CSS (height: h-62.5) and will be silently dropped by Tailwind. Update the 24 instances ofh-h-62.5across all project-XX.mdx files and ensure consistency by usingh-62.5everywhere.src/content/projects/project-05.mdx (1)
24-53: Fix typo in Tailwind class:h-h-62.5should beh-62.5.
The doubleh-prefix is invalid and prevents the height class from applying. The correct Tailwind class ish-62.5(used elsewhere in the codebase). This typo appears in all project files (project-01 through project-07).src/content/projects/project-02.mdx (1)
24-53: Remove the doubled prefix: changeh-h-62.5→h-62.5across all Image components (lines 30, 37, 44, 51).The class
h-h-62.5is not defined in the Tailwind configuration or custom stylesheets and is not a standard Tailwind class. This appears to be a typo; the correct Tailwind height class ish-62.5.- class="h-h-62.5 w-full rounded-lg object-cover" + class="h-62.5 w-full rounded-lg object-cover"Note: This same typo appears in all project MDX files (project-01 through project-07).
src/content/projects/project-07.mdx (1)
24-53: Fix invalid height classh-h-62.5—it contains a double prefix and will not be recognized by Tailwind.
Theh-h-prefix is malformed. Use eitherh-[62.5%](arbitrary value syntax) for custom heights, or replace with an appropriate predefined Tailwind height utility.src/content/projects/project-06.mdx (1)
24-53:h-h-62.5is not a valid Tailwind utility and will silently fail to apply any height styling.Neither
h-h-62.5(used in all 7 project files) nor the alternativeh-62.5pattern (in other components) exist in the Tailwind default spacing scale. The spacing value 62.5 is not defined by default, and the doubleh-prefix in the project files is malformed. Images using these classes will not receive the intended height constraint, breaking the layout grid.Fix by using standard Tailwind values (
h-60,h-64), extending Tailwind config with a custom 62.5% value, or applying inline styles.
🧹 Nitpick comments (3)
src/components/BreakoutImage.astro (1)
23-26: Confirmlg:-mx-30is valid and matches the previous120pxbreakout intent.
If-mx-30isn’t generated, this becomes a no-op atlgand the breakout effect will change.Consider either (a) keeping the explicit
lg:-mx-[120px], or (b) defining a clear token (spacing or custom CSS var) that maps to the intended value and using that consistently.src/content/projects/project-04.mdx (1)
24-52:h-h-62.5looks inconsistent/possibly a typo vsh-62.5used elsewhere—please confirm and align.If this is unintentional, update to the same utility used elsewhere in the PR:
- class="h-h-62.5 w-full rounded-lg object-cover" + class="h-62.5 w-full rounded-lg object-cover"src/content/projects/project-03.mdx (1)
24-52: Standardizeh-h-62.5vsh-62.5across MDX/components to avoid silent Tailwind drops.Same suggested fix (if
h-h-62.5isn’t intentional/configured):- class="h-h-62.5 w-full rounded-lg object-cover" + class="h-62.5 w-full rounded-lg object-cover"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
src/components/BreakoutImage.astro(1 hunks)src/components/PageHeader.astro(1 hunks)src/content/projects/project-01.mdx(1 hunks)src/content/projects/project-02.mdx(1 hunks)src/content/projects/project-03.mdx(1 hunks)src/content/projects/project-04.mdx(1 hunks)src/content/projects/project-05.mdx(1 hunks)src/content/projects/project-06.mdx(1 hunks)src/content/projects/project-07.mdx(1 hunks)src/pages/blog/[post].astro(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: markteekman
Repo: incluud/accessible-astro-starter PR: 0
File: :0-0
Timestamp: 2025-12-07T13:13:40.778Z
Learning: The accessible-astro-starter project uses Prettier as its formatter, so formatting-related concerns about code style are handled automatically by Prettier.
🔇 Additional comments (2)
src/components/PageHeader.astro (1)
139-145: Keep image height utility consistent across the repo (h-62.5vsh-h-62.5).
Right now, components useh-62.5while some MDX usesh-h-62.5; one of these is likely wrong.src/content/projects/project-01.mdx (1)
24-53: [rewritten review comment]
[classification tag]
|
Hey @CodeThomnics! 👋 Thanks for taking the time to submit this PR and thinking about code quality improvements. I really appreciate the effort! 😊 However, I'm going to decline this PR for a few reasons: Technical issue: Design decision:
Thanks again for your interest in the project! 🚀 |
|
Thanks @markteekman for reacting so quick. I will keep this in mind next time i commit something. I'm trying to understand the different repo's and this helps with that. Have a great day! |
Use canonical cases for css classes suggested by the tailwind linting for less overhead.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.