chore(LXStudio + Percipio): update theme#3341
Conversation
|
View your CI Pipeline Execution ↗ for commit 8ddd04a ☁️ Nx Cloud last updated this comment at |
|
|
something was up w/ netlify, PR preview here Preview URL: https://69fb6509ee4c55607c5b94f5--gamut-preview.netlify.app |
| /** | ||
| * Storybook docs chrome (`parameters.docs.theme`) uses `fontBase` for MDX canvas | ||
| * typography. It must match the toolbar-selected Gamut theme’s `fontFamily.base` | ||
| * (see DocsContainer); otherwise e.g. LX Studio shows Skillsoft Text on `body` | ||
| * from Reboot but Apercu inside addon-docs div rules. | ||
| */ | ||
| export function createGamutDocsTheme( | ||
| fontBase: string = gamutTheme.fontFamily.base | ||
| ) { | ||
| return create({ | ||
| base: 'light', | ||
| brandTitle: isLocalhost ? 'Gamut Local' : 'Gamut', | ||
| brandImage: logo, | ||
| brandUrl: '/', | ||
| fontBase, |
There was a problem hiding this comment.
there was a bug with themes with different fonts inheriting Apercu, this fixes that
|
📬 Published Alpha Packages:
|
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a0373e8efabc748bb5fdf70--gamut-preview.netlify.app |
LinKCoding
left a comment
There was a problem hiding this comment.
Leaving some non-blocking comments --
the text's font weights look correct
and the button's new primary color and hover on lxstudio look good!
| brandUrl: '/', | ||
| fontBase, | ||
|
|
||
| // |
There was a problem hiding this comment.
Nit: I see that this comment is leftover from older code, but doesn't actually say anything, maybe just remove?
| ['core', coreTheme], | ||
| ['platform', platformTheme], | ||
| ['admin', adminTheme], | ||
| ['lxStudio', lxStudioTheme], |
There was a problem hiding this comment.
Should the percipio theme also be tested?
| }; | ||
|
|
||
| export const FontFamilyTable = () => { | ||
| const currentTheme = useTheme() as typeof theme; |
| .percipioActionPrimary}; // theme here refers to the current theme, which is the Percipio theme | ||
| `; | ||
| ``` | ||
|
|
||
| If you have to import the theme object from `@codecademy/gamut-styles`, you will need to import the `percipioTheme` object, as `theme` references the Core Theme. | ||
|
|
||
| ```tsx | ||
| import { css } from '@emotion/react'; | ||
| import { percipioTheme, theme } from '@codecademy/gamut-styles'; | ||
|
|
||
| const myStyles = css` | ||
| color: ${percipioTheme.colors.percipioActionPrimary}; | ||
| `; |
There was a problem hiding this comment.
percipioActionPrimary in both these code snippets should be replaced with sapphire
Overview
For LXStudio:
For Percipio theme:
For both:
Font updates (figma link):
accent: “Skillsoft Sans”
base: “Skillsoft Text”
fontWeight:
bold+titleare500,700is still available.PR Checklist
Testing Instructions
Textpage and see the correct 500 font-weight on titles + bold for both Percipio + LXStudio themePR Links and Envs