Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

claude: Prefer class and ID selectors over tag or attribute selectors.

Evy Kassirer29d7ac619da0
diff --git a/.claude/rules/css.md b/.claude/rules/css.md
index 26aa16dd610..abfb97f4d89 100644
--- a/.claude/rules/css.md
+++ b/.claude/rules/css.md
@@ -19,6 +19,8 @@ paths:
entries to understand which pages load the file. Prefer scoped
overrides (e.g., `.parent .target`) over modifying shared rules,
to avoid unintended changes to other parts of the app.
+- Use class or ID selectors, not bare tag selectors or attribute
+ selectors. If no suitable class exists, add one.
When removing a CSS dependency (e.g., Bootstrap), audit the full
property list of every rule, not just visually obvious properties like
diff --git a/.claude/rules/frontend.md b/.claude/rules/frontend.md
index 5a2c18e7ca9..ccd23748b3c 100644
--- a/.claude/rules/frontend.md
+++ b/.claude/rules/frontend.md
@@ -16,3 +16,5 @@ paths:
element exists before using it.
- Use `util.the($el)` instead of `$el[0]!` when a jQuery object should
hold exactly one element.
+- Use class or ID selectors, not bare tag selectors or attribute
+ selectors. If no suitable class exists, add one.