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

feature: Configure global theme (font/colors) #10

Merged
merged 2 commits into from
Oct 21, 2023

Conversation

WillBAnders
Copy link
Member

@WillBAnders WillBAnders commented Oct 14, 2023

Resolves #6. This configures the global theme (font = Poppins, colors matching our slide decks). As best I can tell, it's not feasible to use prefers-color-scheme: light as a 'dark mode by default' feature since light is the default value (as opposed to strictly being an opt-in preference). Could be something to revisit later; for now will remove the media query but keep the CSS variable setup for future use.

image

@WillBAnders WillBAnders requested review from yonasbahre and a team October 14, 2023 20:06
@WillBAnders WillBAnders self-assigned this Oct 14, 2023
Copy link
Contributor

@angel1254mc angel1254mc left a comment

Choose a reason for hiding this comment

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

LGTM 😎 Gonna leave this as a comment if any other @ufssd/webmasters wanted to take a stab at reviewing this :D.

Comment on lines +11 to +12
--background-gradiant-light: #004278;
--background-gradiant-dark: #030304;
Copy link
Contributor

Choose a reason for hiding this comment

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

[Nit]: Really not a big deal but did you mean to write gradient instead of gradiant for these?

Copy link
Member Author

Choose a reason for hiding this comment

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

I definitely meant to write gradient, good catch!

Comment on lines +5 to +8
const font = Poppins({
weight: ["400", "700"],
subsets: ["latin"],
});
Copy link
Contributor

Choose a reason for hiding this comment

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

[Question]: Any reason why we're only importing normal and bold weights for Poppins 🤔 How do you feel about also modifying the weights in the tailwind theme to reflect this? If you think its pointless then no biggie, we can keep the tailwind theme as it is and just ensure we only use font-normal and font-bold 😎.

Copy link
Member Author

Choose a reason for hiding this comment

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

Each font-weight requires a separate font definition to use; including all of them by default is generally not recommended. It's a good callout though that we'll need to watch for uses of other font weights accidentally (made much easier by tailwind) but there are good reasons to do that anyways.

Copy link
Member Author

Choose a reason for hiding this comment

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

Re-reading the link you sent; I see your idea was to remove these from Tailwind entirely- that's a great idea and I'll definitely give that a try.

Copy link
Member Author

Choose a reason for hiding this comment

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

From discussion on Discord, we'll leave this alone as it doesn't have the desired effect:

  1. Limiting the available fontWeights doesn't protect against using them; the classes are just undefined.
  2. The config defines a global theme which isn't specific to the font - so you may have another font which supports 500 and would want access to font-medium there.
  3. We seem to be using CSS Modules instead of Tailwind anyways, so I'm inclined to stick with that anyways rather than try to customize this.

Copy link
Contributor

@angel1254mc angel1254mc left a comment

Choose a reason for hiding this comment

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

Figured I should approve this since everyone else seems to be busy on their own PRs 😄. Feel free to ping me again if you decide to purge those tailwind font-weights on this PR and need me to take a look.

@WillBAnders WillBAnders merged commit b0d3612 into master Oct 21, 2023
1 check passed
@WillBAnders WillBAnders deleted the feature/global-theme branch October 21, 2023 16:17
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.

Create shared website theme styles
2 participants