Skip to content

docs(react-components): Add theming docs#23080

Merged
miroslavstastny merged 5 commits into
microsoft:masterfrom
miroslavstastny:docs/theming
Jun 6, 2022
Merged

docs(react-components): Add theming docs#23080
miroslavstastny merged 5 commits into
microsoft:masterfrom
miroslavstastny:docs/theming

Conversation

@miroslavstastny

@miroslavstastny miroslavstastny commented May 19, 2022

Copy link
Copy Markdown
Member

Add theming docs for v9.

PREVIEW

Fixes #22358

@codesandbox-ci

codesandbox-ci Bot commented May 19, 2022

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 69f4a53:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam

fabricteam commented May 19, 2022

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

🤖 This report was generated against bad6ad63ff7e2287519e7117f8a1963b623ae18e

@size-auditor

size-auditor Bot commented May 19, 2022

Copy link
Copy Markdown

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: bad6ad63ff7e2287519e7117f8a1963b623ae18e (build)

@miroslavstastny
miroslavstastny marked this pull request as ready for review May 19, 2022 14:33
@miroslavstastny
miroslavstastny requested review from a team as code owners May 19, 2022 14:33
@miroslavstastny
miroslavstastny requested a review from a team May 19, 2022 14:33
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated

Fluent UI Theme is represented by a set of tokens. Each token resolves to a single value which can be assigned to a CSS property.

You can browse all the available tokens in **Theme** section of the docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually hyperlink to other pages or other parts of the same page. You can find some examples on the docs of build time optimization of Griffel

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know. the problem is Theme is a non-linkable section, not a page :-/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just link to the most 'natural' part of that section like the color tokens ?

Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Co-authored-by: ling1726 <lingfangao@hotmail.com>

# Theming

The Fluent UI Theme is represented by a set of tokens. Each token resolves to a single value which can be assigned to a CSS property.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Fluent UI Theme is represented by a set of tokens. Each token resolves to a single value which can be assigned to a CSS property.
The Fluent UI Theme is represented by a set of tokens. Each token resolves to a single value which can be assigned to a CSS property.
```tsx
const theme = {
tokenA: 'var(--tokenA)',
// etc.
}
```

Will it be helpful to show what it actually means?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but the theme object is semantic name -> raw value, so I added an example of that. The later sections explain how that is added to DOM and consumed in styles.

Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx
Comment thread apps/public-docsite-v9/src/Concepts/Theming.stories.mdx Outdated
Co-authored-by: Oleksandr Fediashov <alexander.mcgarret@gmail.com>
@github-actions github-actions Bot added this to the June Project Cycle Q2 2022 milestone Jun 6, 2022
@miroslavstastny
miroslavstastny merged commit 635ec14 into microsoft:master Jun 6, 2022
@miroslavstastny
miroslavstastny deleted the docs/theming branch June 6, 2022 13:11
marwan38 pushed a commit to marwan38/fluentui that referenced this pull request Jun 13, 2022
* docs(react-components): Add theming docs

* Apply suggestions from code review

Co-authored-by: ling1726 <lingfangao@hotmail.com>

* Apply suggestions from code review

Co-authored-by: Oleksandr Fediashov <alexander.mcgarret@gmail.com>

* address PR comments

* remove broken import

Co-authored-by: ling1726 <lingfangao@hotmail.com>
Co-authored-by: Oleksandr Fediashov <alexander.mcgarret@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v9 docs: Theming

5 participants