-
Notifications
You must be signed in to change notification settings - Fork 1
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
Devx1435 Design tokens + improve card styles #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing! So happy to see so many fewer manual hex codes and hard-coded things here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on pulling the HomePageCards and HomeHeaderText out of HomePage!
main: '#FF5630', | ||
light: '#FF8F73', | ||
main: tokens.iconsColorDanger, | ||
light: tokens.supportSurfaceColorDanger, | ||
dark: '#DE350B', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there dark tokens that can be used here and the following code blocks vs the hex codes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MonicaG Thanks!
Unfortunately, there aren't dark tokens for success/info/error, at least based on the figma document. There is a dark red "dangerButton.hover" token that could be used for "error.dark", but I opted to leave the those colors as is.
I can bring this up with Tyler Krys. Less hex codes sounds good to me!
Design tokens + Improved card styling
I added the design tokens package and integrated the tokens into the theme.
In most cases the switch to tokens is rather subtle. However, the tokens have a high contrast focus, promoting accessibility. This is most noticeable with icon coloring; icons are significantly darker. Additionally, focused user input fields such as search bars and drop downs also have a brighter border color.
I styled the homepage cards to resemble what we see on the BC gov Homepage
In an effort to appear more "brand" consistent with other bc gov sites, I also added some of the button and header styles.
Although the card styles are mostly a flat white style, the /create cards still have some light decoration. This is because the /create page has a white background, and the cards didn't offer much visual separation.
codewise
I pulled the HomePage cards out into their own component. I think logically separating these simplifies the organization of the codebase, since the rest of the HomePage will likely remain static, and the new HomePageCards component is in a better place to potentially transition into more dynamic content.
Preview branch here