Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted CSS code smell (add a formatter) #10

Open
FireIsGood opened this issue Feb 3, 2025 · 0 comments
Open

Assorted CSS code smell (add a formatter) #10

FireIsGood opened this issue Feb 3, 2025 · 0 comments

Comments

@FireIsGood
Copy link

I was checking your CSS and among other issues with general style rules (anchor tags using their inherent inline style to create a line separator, flex not actually being used as flex, button hover background color styles not providing contrast against the page background) I found that the stylesheets themselves were seemingly not formatted.

Some examples:

  • App.css 7-8 Inconsistently padded property values
  • App.css 45/302 Trailing whitespace (I would recommend getting a plugin or other highlighting feature to show these)
  • App.css 53-54 Inconsistent inline style, arguably not a good choice in general but in this case some have extra spaces
  • App.css 194 Double semicolon. Makes GitHub viewer unhappy
  • App.css 333-339424 Inconsistently indented code (0/2 indent)

Since you have more than 20 lines (arbitrary) of CSS, you should probably look into just adding something like Prettier or Biome.

I also noticed you cited ChatGPT but the code does not seem to be cited anywhere within the code base This might be part of the reason for these changes, though I haven't comprehensively checked the commit log (It is 4 am).


Oh and some UX freebies:

  • App.css 53 Don't have right padding, consider making them block level and then using the gap property. Also you don't really need the :link unless you're styling anchor tags used incorrectly (as buttons for JS) separately. If you are... uhh don't? It makes screenreaders a bit unhappy with you
  • App.css 513 Change this to just overflow-x. That will fix the horizontal scrollbar.
  • Make images display: block. That's where your mystery 4px bottom margin is if you're ever wondering. If you really need inline images, add that separately. You probably don't need inline images

yeah.

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

No branches or pull requests

1 participant