docs: update branding example#2575
Conversation
|
Visual regression report✅ No changes.
Baselines come from the |
e713885 to
ced0fb5
Compare
4f5eb03 to
c75c014
Compare
matyasf
left a comment
There was a problem hiding this comment.
Looks good. Can you also port the same examples to new-theme-overrides.md too?
1c6da87 to
01baa9e
Compare
c75c014 to
50a4f82
Compare
| The new theming system exposes the equivalents of the legacy Canvas `ic-brand-*` variables under `semantics.color.institutional.*`. Overriding these has the same broad effect as Canvas's [Theme Editor](https://community.canvaslms.com/t5/Admin-Guide/How-do-I-create-a-theme-for-an-account-using-the-Theme-Editor/ta-p/242) — the Button family, `SideNavBar`, `Link`, `Billboard`, and several other components consume them automatically. | ||
|
|
||
| | Legacy variable | New semantic token | | ||
| | --------------------------------------------------- | --------------------------------------- | | ||
| | `ic-brand-primary` | `brandPrimary` | | ||
| | `ic-brand-font-color-dark` | `brandFontColorDark` | | ||
| | `ic-link-color` | `linkColor` | | ||
| | `ic-brand-button--primary-bgd` | `brandButtonPrimaryBgd` | | ||
| | `ic-brand-button--primary-text` | `brandButtonPrimaryText` | | ||
| | `ic-brand-global-nav-bgd` | `brandGlobalNavBgd` | | ||
| | `ic-global-nav-link-hover` | `globalNavLinkHover` | | ||
| | `ic-brand-global-nav-menu-item__text-color` | `brandGlobalNavMenuItemTextColor` | | ||
| | `ic-brand-global-nav-menu-item__text-color--active` | `brandGlobalNavMenuItemTextColorActive` | |
There was a problem hiding this comment.
hmm this should be mentioned in the upgrade guide too!
| type: example | ||
| --- | ||
| const Example = () => { | ||
| const [brandPrimary, setBrandPrimary] = useState(canvas['ic-brand-primary']) |
There was a problem hiding this comment.
I dont understand this code, shouldnt we here be reading brandPrimary?
| </Flex.Item> | ||
| </Flex> | ||
| <hr style={{width:'100%', margin:'2rem 0 1rem'}}/> | ||
| <InstUISettingsProvider theme={canvas}> |
There was a problem hiding this comment.
AFAIK we should not hardcode Canvas here (and in other examples). The point here is to show, that branding overrides work in the new canvas and light theme
| ``` | ||
|
|
||
| ### 15. Branding (user customizable theming) | ||
|
|
There was a problem hiding this comment.
I would also mention here, that its only possible to override in the legacy canvas and the light theme. Branding is coming soon to the dark theme, and it will never be avaialbe in the high contrast theme(s) because their point is to always have high contrast
INSTUI-4993
Summary
Update Legacy theme overrides doc page Branding section.
Co-Authored-By: 🤖 Claude