Skip to content

Enforce feature-CSS em-fallback rule with color and transition/animation exclusions#9471

Draft
Copilot wants to merge 6 commits into
mainfrom
copilot/add-eslint-css-rule
Draft

Enforce feature-CSS em-fallback rule with color and transition/animation exclusions#9471
Copilot wants to merge 6 commits into
mainfrom
copilot/add-eslint-css-rule

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

Test URLs

Screenshot

AI GOT NO EYES

What changed

This PR now reflects all review feedback:

  • refined-github/css-require-em-fallback is enforced as error for source/features/**/*.css.
  • The fallback in source/features/conventional-commits.css is 2.22em (replacing 1px).
  • The rule now ignores:
    • CSS comments when checking for fallback values
    • color-related variables (--color-*, *Color-*, component color channels, and --rgh-*)
    • transition/animation-related declarations (transition* and animation*)
  • source/features/extend-diff-expander.css transition fallback was reverted to valid timing values (0.2s / ease-in-out).

Validation

  • Targeted ESLint checks pass for the updated rule and affected CSS.
  • Custom rule tests pass:
    • eslint-rules/css-require-em-fallback.test.js
    • eslint-rules/css-require-fuchsia-fallback.test.js

Copilot AI requested a review from fregante May 15, 2026 14:13
Comment thread source/features/clean-conversation-headers.css Outdated
Comment thread source/features/conventional-commits.css Outdated
Copilot AI changed the title Add feature-CSS var() reporting rule with em fallback exceptions Enforce feature-CSS em-fallback rule and exclude color vars/comments May 15, 2026
Copilot AI requested a review from fregante May 15, 2026 14:52
Comment thread source/features/extend-diff-expander.css Outdated
Copilot AI changed the title Enforce feature-CSS em-fallback rule and exclude color vars/comments Enforce feature-CSS em-fallback rule with color and transition/animation exclusions May 15, 2026
Copilot AI requested a review from fregante May 15, 2026 15:04
z-index: 3;
top: calc(
var(--base-sticky-header-height, 0px) +
var(--base-sticky-header-height, 2.22em) +
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule is less straightforward to apply than the fuchsia one, it might need a number of hardcoded exceptions for non-length values

/* Cover up the content seen through the rounded corners above */
box-shadow: 0
calc((var(--sticky-padding) + var(--borderRadius-medium)) * -1) 0 0
calc((var(--sticky-padding) + var(--borderRadius-medium, 2.22em)) * -1) 0 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one won't be particularly noticeable if missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants