# Styling choices

### Props

* when value is a string, prefer `prop="value"` syntax
  * (vs string-within-an-object syntax `prop={'value' }`)

### Colors

* Use theme colors (vs hardcoding values)
  * `color="primary"`
  * `sx={{ color: 'primary.main' }}`&#x20;
  * `sx={{ color: (theme) => theme.palette.primary.main }}`
  * `sx={{ color: (theme) => alpha(theme.palette.background.default, 0.8) }}`
  * `sx={{ backgroundColor: (theme) => alpha(theme.palette.text.primary, 0.1) }}`

### Other

* Use [MUI's shorthand](https://mui.com/system/properties/#:~:text=theme.spacing\(value\)-,p%2C%20padding,-padding) when available
  * padding:  `p` for padding, `pl` for `padding-left`
  * margin: `m` for margin, ...
  * width: `1` instead of `100%`
* Use numbers (vs pixels) for borderRadius, margin, padding, gap, ...
  * the numbers are used as multipliers against the MUI theme's spacing value (`usually 4px`)... essentially, it will just keep things looking good and consistent throughout the app
* CSS Flexbox (`<Stack />`) or CSS Grid (`<Grid />`)&#x20;
  * use `gap` instead of `spacing`
*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pavewise.gitbook.io/pavewise-style-guide-and-more/frontend/our-systems/components/mui/styling-choices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
