Skip to content

chore: remove inline styling & use clsx consistently#331

Merged
olijeffers0n merged 13 commits into
PaperMC:mainfrom
granny:chore/more-clsx
Apr 6, 2024
Merged

chore: remove inline styling & use clsx consistently#331
olijeffers0n merged 13 commits into
PaperMC:mainfrom
granny:chore/more-clsx

Conversation

@granny
Copy link
Copy Markdown
Contributor

@granny granny commented Mar 30, 2024

This PR removes all instances of inline styling. Ternary operator calls in className have been replaced with the clsx() helper method for improved readability.

  1. Inline styles calling the margin[...] properties have been updated to use Docusaurus' margin-[...]--sm and margin-[...]--md classes for consistent margin sizes.
  2. Inline styles have been merged into pre-existing classes wherever possible.

Only visual inconsistency should be the Icons that originally had 8 pixel margins and the slider markers in the script generator.

Comment thread src/components/Config.tsx Outdated
Comment thread src/components/Config.tsx Outdated
Comment thread src/components/Config.tsx Outdated
@granny
Copy link
Copy Markdown
Contributor Author

granny commented Mar 30, 2024

A dropdown-item-selected class has also been added to this PR

@granny
Copy link
Copy Markdown
Contributor Author

granny commented Mar 30, 2024

The internal styles added to the slider markers has been replaced with flexbox styling. It's now more accurate than how it was before.

Any leftover internal styling and TODOs have now been removed.

Copy link
Copy Markdown
Member

@olijeffers0n olijeffers0n left a comment

Choose a reason for hiding this comment

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

image
image

First is the PR, Second is Prod. The Config Pages have changed slightly with respect to margins and highlight colours not being active.

@granny
Copy link
Copy Markdown
Contributor Author

granny commented Apr 5, 2024

  1. Selected config options should now properly highlight like before.
  2. The margin indenting being off is technically on purpose since docusaurus' built-in margin-bottom--sm class is not 10px, but something closer to 8px. With margin-bottom--xs being closer to 4px and margin-bottom--md being closer to 16px.

@olijeffers0n
Copy link
Copy Markdown
Member

Looks generally good, I’ll review properly soon

@olijeffers0n olijeffers0n self-requested a review April 5, 2024 09:43
@olijeffers0n olijeffers0n merged commit 704d5bd into PaperMC:main Apr 6, 2024
@granny granny deleted the chore/more-clsx branch May 3, 2024 08:00
sowelipililimute pushed a commit to sowelipililimute/docs that referenced this pull request Sep 7, 2025
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.

4 participants