Skip to content

Conversation

@obenland
Copy link
Member

Summary

  • Fix all CSS lint errors across the codebase
  • Add CSS/SCSS linting to pre-commit hook for changed files
  • Review and refine stylelint-disable usage with explanatory comments

Changes

CSS fixes:

  • Merge duplicate selectors in admin, embed, and feed styles
  • Fix specificity ordering issues by restructuring selectors
  • Add targeted stylelint-disable comments where intentional (mutually exclusive style variations, separated focus states)
  • Shorten comments exceeding line length limits

Pre-commit hook:

  • Add CSS/SCSS linting with auto-fix for changed files

Test Plan

  • npm run lint:css passes
  • npm run build succeeds
  • Pre-commit hook runs CSS linting on staged CSS/SCSS files

- Apply auto-fixable CSS lint fixes across stylesheets
- Add Stylelint to pre-commit hook for changed CSS/SCSS files
- Remaining errors are structural issues requiring manual fixes
- Restructure extra-fields/style.scss to minimize disables
- Restructure followers/style.scss to fix specificity ordering
- Replace file-level disables with targeted disables where possible
- Add explanatory comments for all remaining disables
- Fix duplicate selector in feed/style.scss
@obenland obenland added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Dec 17, 2025
@obenland obenland self-assigned this Dec 17, 2025
@obenland obenland requested a review from a team December 17, 2025 16:56
@github-actions github-actions bot added [Block] Federated reply Respond to posts, notes, videos, and other content on the fediverse. [Block] Follow Me [Block] Followers [Block] Reactions [Block] Remote Reply aka "Reply on the Fediverse", in the comment list [Feature] Reactions [Focus] Editor Changes to the ActivityPub experience in the block editor [Status] In Progress [Feature] Reader labels Dec 17, 2025
@obenland obenland marked this pull request as ready for review December 17, 2025 22:26
Copilot AI review requested due to automatic review settings December 17, 2025 22:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request comprehensively addresses CSS linting issues across the entire codebase and integrates CSS/SCSS linting into the pre-commit hook workflow. The changes focus on formatting consistency, standardizing CSS conventions, and properly documenting intentional stylelint rule exceptions.

Key Changes

  • Standardized quote usage (single → double quotes) in @use/@import statements
  • Normalized color values (currentColor → currentcolor, #ffffff → #fff)
  • Converted font-weight keywords to numeric values (normal → 400, bold → 700)
  • Restructured selectors to resolve specificity ordering issues
  • Added explanatory comments for stylelint-disable directives
  • Integrated CSS/SCSS linting with auto-fix into pre-commit hook

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/shared/modal/style.scss Added blank lines between rule blocks, updated header comment
src/reply/editor.scss Changed quotes to double, fixed indentation from spaces to tabs
src/remote-reply/style.scss Added blank lines after selector declarations
src/reactions/style.scss Changed currentColor to currentcolor, restructured box-shadow, added explanatory stylelint-disable comments
src/followers/style.scss Moved .external-link-icon definition, separated :hover/:focus selectors, added stylelint-disable comments, condensed var() fallbacks
src/follow-me/style.scss Added comprehensive file-level stylelint-disable comment explaining mutually exclusive style variations, shortened inline comments
src/extra-fields/style.scss Restructured file to fix specificity issues by moving wrapper rules after style variations, added stylelint-disable comment
src/app/styles/design-tokens.scss Added blank line, fixed indentation
src/app/style.scss Changed quotes to double, removed .scss extension from @use
src/app/routes/feed/style.scss Moved h2/div styles into parent selector to merge duplicate selectors, changed font-weight keyword to numeric
src/app/components/themed-surface/style.scss Shortened hex color from #ffffff to #fff
src/app/components/site-icon/style.scss Changed currentColor to currentcolor
src/app/components/site-hub/style.scss Shortened hex colors, split multi-line box-shadow, added blank line, added stylelint-disable comment with explanation
src/app/components/sidebar/style.scss Added file-level stylelint-disable comment, shortened hex colors, added blank line
src/app/components/popular-tags/style.scss Shortened hex colors
src/app/components/layout/style.scss Shortened comment, added blank line
src/app/components/fields/avatar/style.scss Added blank line
src/app/components/actor-switcher/style.scss Shortened hex color
build/* Regenerated build files reflecting source changes
assets/css/activitypub-welcome.css Moved .activitypub-step-completed rules to resolve specificity, changed font-weight to numeric, added stylelint-disable comment, added blank lines
assets/css/activitypub-post-preview.css Reordered selectors to fix specificity issues, changed font-weight to numeric
assets/css/activitypub-embed.css Merged duplicate .ap-preview selectors, changed display from inline-block to block for images, reordered layout variants, added blank lines
assets/css/activitypub-admin.css Decimal spacing normalization, hex color shortening, font-weight numeric values, reordered selectors, added stylelint-disable comments, added blank lines, changed ::before pseudo-element syntax
.githooks/pre-commit Added CSS/SCSS linting with auto-fix for staged files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Address PR feedback: icon fonts should not have generic fallbacks since
they would display random characters instead of icons if the font fails
to load.
- Remove sans-serif fallback from dashicons icon font (icon fonts should
  not have generic fallbacks as they would display random characters)
- Optimize pre-commit hook to get git diff once and filter by file type,
  reducing redundant git calls as more file type checks are added
@obenland obenland merged commit 85f6ba3 into trunk Dec 18, 2025
4 checks passed
@obenland obenland deleted the fix/css-lint branch December 18, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Federated reply Respond to posts, notes, videos, and other content on the fediverse. [Block] Follow Me [Block] Followers [Block] Reactions [Block] Remote Reply aka "Reply on the Fediverse", in the comment list [Feature] Reactions [Feature] Reader [Focus] Editor Changes to the ActivityPub experience in the block editor Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants