11import {Meta } from ' @storybook/addon-docs' ;
22
3- <Meta title = " Branding/Overview" />
3+ <Meta title = " Branding/Overview" />
44
55# Branding
66
@@ -13,53 +13,56 @@ you should provide values for each theme individually.
1313## Basic customization
1414
1515#### Typography
16+
1617There are 2 font families, ` sans-serif ` and ` monospace ` , which can be configured via ` --g-font-family-sans `
1718and ` --g-font-family-monospace ` . Also, there are a lot of different text variants: ` body-1 ` ` body-2 ` ` caption-1 `
1819` caption-2 ` ` header-1 ` ` header-2 ` and others. Full list of variants you can find [ here] ( ?path=/story/typography--default ) .
1920Each of these variants has a specific ` font-size ` and ` line-height ` properties which can be configured via variables
2021` --g-text-{variantName}-font-size ` and ` --g-text-{variantName}-line-height ` . Root node uses ` body-1 ` variant. A ` font-weight ` property can be set
2122for each of the variant group (` body ` ` header ` ` subheader ` ` display ` ` caption ` ` code ` ) via ` --g-text-{variantGroupName}-font-weight ` variable.
22- There is one specific variable, ` --g-text-accent-font-weight ` , which can be used separately from text variant.
23-
23+ There are also accent variables for each of the variant group `--g-text-{ variantGroupName } -accent-font-weight.
2424
2525#### Accent
26+
2627To give a unique look for components you can provide several variables that controls accent color. Here is the
2728list of such variables:
28- * ` --g-color-base-brand ` - Color for background (action button, active controls)
29- * ` --g-color-base-brand-hover ` - Hover color for background
30- * ` --g-color-line-brand ` - Color for lines (active tab underline)
31- * ` --g-color-text-brand ` - Text color
32- * ` --g-color-text-brand-heavy ` - Text color over background
33- * ` --g-color-text-brand-contrast ` - Text color over brand background
34- * ` --g-color-base-selection ` - Lighter version for background (List selection, Table row selection)
35- * ` --g-color-base-selection-hover ` - Hover lighter version for background
36- * ` --g-color-text-link ` - Color for links
37- * ` --g-color-text-link-hover ` - Hover color for links
38- * ` --g-color-text-link-visited ` - Color for visited links
39- * ` --g-color-text-link-visited-hover ` - Hover color for visited links
29+
30+ - ` --g-color-base-brand ` - Color for background (action button, active controls)
31+ - ` --g-color-base-brand-hover ` - Hover color for background
32+ - ` --g-color-line-brand ` - Color for lines (active tab underline)
33+ - ` --g-color-text-brand ` - Text color
34+ - ` --g-color-text-brand-heavy ` - Text color over background
35+ - ` --g-color-text-brand-contrast ` - Text color over brand background
36+ - ` --g-color-base-selection ` - Lighter version for background (List selection, Table row selection)
37+ - ` --g-color-base-selection-hover ` - Hover lighter version for background
38+ - ` --g-color-text-link ` - Color for links
39+ - ` --g-color-text-link-hover ` - Hover color for links
40+ - ` --g-color-text-link-visited ` - Color for visited links
41+ - ` --g-color-text-link-visited-hover ` - Hover color for visited links
4042
4143#### Shape
44+
4245Controls share border radius sizes that can be configured via ` --g-border-radius-{size} ` , where size is one of xs, s, m, l or xl
4346
4447### Example
4548
4649``` css
47-
4850.g-root {
4951 --g-font-family-sans : ' Inter' , sans-serif ;
5052
53+ --g-text-body-accent-font-weight : 600 ;
54+ --g-text-caption-accent-font-weight : 600 ;
5155 --g-text-header-font-weight : 600 ;
5256 --g-text-subheader-font-weight : 600 ;
5357 --g-text-display-font-weight : 600 ;
54- --g-text-accent-font-weight : 600 ;
5558
5659 --g-color-base-brand : rgb (117 , 155 , 255 );
5760 --g-color-base-brand-hover : rgb (99 , 143 , 255 );
5861 --g-color-base-selection : rgba (82 , 130 , 255 , 0.05 );
5962 --g-color-base-selection-hover : rgba (82 , 130 , 255 , 0.1 );
6063 --g-color-line-brand : rgb (117 , 155 , 255 );
6164 --g-color-text-brand : rgb (117 , 155 , 255 );
62- --g-color-text-brand-contrast : rgb (255 , 255 , 255 );
65+ --g-color-text-brand-contrast : rgb (255 , 255 , 255 );
6366 --g-color-text-link : rgb (117 , 155 , 255 );
6467 --g-color-text-link-hover : rgb (82 , 130 , 255 );
6568}
0 commit comments