Skip to content
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

docs: Correction in STYLE-GUIDE.md #119

Merged
merged 2 commits into from
Oct 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .docs/STYLE-GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Style Guide

All our React Components are created using [Material UI](https://mui.com/material-ui/getting-started/overview/) Components. It gives us custom Themed components (see [theme.ts](../theme/theme.ts)) which gives us consistent design across the whole web app. We strictly abide by this style guide to style our components.
All our React Components are created using [Material UI](https://mui.com/material-ui/getting-started/overview/) Components. It gives us custom Themed components (see [theme.ts](../theme/theme.ts)) providing consistent design across the whole web app. We strictly abide by this style guide to style our components.

### Styling MUI Components

1. **Style any _individual_ MUI component** by using [its `sx` prop](https://mui.com/system/getting-started/the-sx-prop/) and [its `system` props](https://mui.com/system/properties/).
- We found styling with `sx` prop and `system` props more intuitive. Its used most of the times.
- We found styling with `sx` prop and `system` props more intuitive. It is used most of the time.
2. If you are **styling _multiple_ MUI components**, or giving complex stylings (e.g styling CSS grids), or adding complex animation, use [SASS modules](https://medium.com/clover-platform-blog/modular-scss-and-why-you-need-it-6bb2d8c40fd8) (You will see a lot of `.module.scss` files in the repo)
- We use SCSS styling sparingly. Use only whenever necessary.
- **Use SCSS styling scarcely**. (Use `sx` prop or `system` props of MUI components most of the times).

### Following the Color System and Font System

1. We follow material color system. Follow our [Color System Guide](./COLOR-SYSTEM.md).
2. We follow material Font Type system. Follow out [Type System Guide](./TYPE-SYSTEM.md)
1. We follow the material color system. Follow our [Color System Guide](./COLOR-SYSTEM.md).
2. We follow the material Font Type system. Follow out [Type System Guide](./TYPE-SYSTEM.md)