Skip to content

fix: remove unecessary important declarations#751

Merged
rohanchkrabrty merged 5 commits intomainfrom
fix/CLD-2878/remove_unecessary_important_declarations
Apr 22, 2026
Merged

fix: remove unecessary important declarations#751
rohanchkrabrty merged 5 commits intomainfrom
fix/CLD-2878/remove_unecessary_important_declarations

Conversation

@Shreyag02
Copy link
Copy Markdown
Contributor

@Shreyag02 Shreyag02 commented Apr 21, 2026

Description

removed the unnecessary use of !important in css in reported components

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

How Has This Been Tested?

Dev testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (.mdx files)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Related Issues

#678

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Apr 22, 2026 9:43am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@Shreyag02 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 21 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 21 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 298ea9a2-c803-424f-8566-77cb17dcb29e

📥 Commits

Reviewing files that changed from the base of the PR and between 1b2bb62 and 04b418e.

📒 Files selected for processing (1)
  • packages/raystack/components/calendar/calendar.module.css
📝 Walkthrough

Walkthrough

This pull request modifies several CSS modules to remove multiple !important flags and adjust selector specificity (notably .dropdowns > span and replacing .calendarPopover with .calendarPopover.calendarPopover), adds a trailing newline in one file, and updates token/comment color declaration in the code block theme. Many chip, input, and select-related rules had !important removed. Separately, the TypeScript BaseSelectProps interface in select-root.tsx was made exported (export interface BaseSelectProps ...).

Suggested reviewers

  • paanSinghCoder
  • rsbh
  • rohilsurana
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing unnecessary !important declarations from CSS files across multiple components.
Description check ✅ Passed The description is related to the changeset, explaining that unnecessary !important declarations were removed from CSS in reported components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@Shreyag02 Shreyag02 requested review from paanSinghCoder and rohanchkrabrty and removed request for rohanchkrabrty April 21, 2026 09:46
Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (1)
packages/raystack/components/calendar/calendar.module.css (1)

173-180: Doubled-class specificity hack works, but consider a comment.

.calendarPopover.calendarPopover intentionally doubles specificity to (0,2,0) to override the base .popover rule (0,1,0) from popover.module.css without !important. This is a known trick, but unusual enough that a future reader may "simplify" it back to a single class and silently break the override. Consider adding a brief comment explaining the intent.

Proposed refactor
+/* Doubled selector intentionally raises specificity to override base .popover styles without !important. */
 .calendarPopover.calendarPopover {
   padding: var(--rs-space-3);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/raystack/components/calendar/calendar.module.css` around lines 173 -
180, The doubled-selector .calendarPopover.calendarPopover is intentionally used
to raise specificity to override the base .popover rule from popover.module.css;
add an inline comment above the .calendarPopover.calendarPopover rule explaining
that the duplicated class is deliberate to achieve specificity (0,2,0) instead
of using !important so future maintainers don't "simplify" it back to a single
class and break the override.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/raystack/components/filter-chip/filter-chip.module.css`:
- Around line 153-157: The current selector
[class*="input-field-module_inputWrapper"] in filter-chip.module.css is fragile
because it depends on generated CSS-Module class names; instead, add a stable
class on the InputField wrapper (e.g., add a prop/classNames that applies
styles.nestedInputWrapper to the wrapper in the InputField component), then
replace the fragile selector in filter-chip.module.css with .nestedInputWrapper
and adjust usages accordingly; alternatively, import or compose the exported
inputWrapper from input-field.module.css into filter-chip.module.css or mark it
:global()—but prefer adding the explicit nestedInputWrapper class to InputField
and target that from filter-chip.module.css for a robust fix.

---

Nitpick comments:
In `@packages/raystack/components/calendar/calendar.module.css`:
- Around line 173-180: The doubled-selector .calendarPopover.calendarPopover is
intentionally used to raise specificity to override the base .popover rule from
popover.module.css; add an inline comment above the
.calendarPopover.calendarPopover rule explaining that the duplicated class is
deliberate to achieve specificity (0,2,0) instead of using !important so future
maintainers don't "simplify" it back to a single class and break the override.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d3f52e7-8eeb-478a-980d-1a11c9d81f0f

📥 Commits

Reviewing files that changed from the base of the PR and between 628f237 and 9c203e5.

📒 Files selected for processing (5)
  • packages/raystack/components/calendar/calendar.module.css
  • packages/raystack/components/code-block/code.module.css
  • packages/raystack/components/filter-chip/filter-chip.module.css
  • packages/raystack/components/search/search.module.css
  • packages/raystack/components/select/select-root.tsx

Comment thread packages/raystack/components/filter-chip/filter-chip.module.css Outdated
@rohilsurana rohilsurana changed the title Fix/cld 2878/remove unecessary important declarations fix: remove unecessary important declarations Apr 21, 2026
Comment thread packages/raystack/components/calendar/calendar.module.css
Comment thread packages/raystack/components/filter-chip/filter-chip.module.css Outdated
Comment thread packages/raystack/components/filter-chip/filter-chip.module.css Outdated
Comment thread packages/raystack/components/calendar/calendar.module.css
@rohanchkrabrty rohanchkrabrty merged commit 3997059 into main Apr 22, 2026
5 checks passed
@rohanchkrabrty rohanchkrabrty deleted the fix/CLD-2878/remove_unecessary_important_declarations branch April 22, 2026 11:10
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