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

Styles code improvements, Header component, + Logo component #52

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

emi420
Copy link
Collaborator

@emi420 emi420 commented Aug 21, 2024

In this PR I've added some changes to how we use styles.

Also I've worked on the Header component and added a new Logo component.

CSS global variables, Shoelace Classes prefix and design tokens

All color variables were moved to a single hot.css file, so we don't create and repeat more global CSS variables. An ideal solution I think would be to have variables named with the prefix --hot- instead of --sl-l, but this is something that Shoelace doesn't support.

This is different for classes, where I added the hot- prefix for the UnoCSS config, now all classes are prefixed, like hot-font-sans.

I've changed all inline styling and hardcoded values (ex: font-size: 2rem) to classes. This was not possible for Shoelace icons, but in that case I used the CSS variable for font-size.

Header component

I've cleaned the code and also moved all styles and its variants to a new styles.ts file. I'm still exploring the possibility of having all styles in CSS files and use the @apply directive, but this is not possible yet.

Logo component

A new Logo component was added, using SVG files instead of bitmaps.

@spwoodcock spwoodcock merged commit 1921e4e into main Aug 22, 2024
1 of 2 checks passed
@emi420 emi420 deleted the feature/styles branch September 9, 2024 14:35
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.

2 participants