Skip to content

Commit

Permalink
[docs] Prefer using px over pixels
Browse files Browse the repository at this point in the history
Motivated by mui#22395 (comment).
  • Loading branch information
oliviertassinari committed Sep 11, 2020
1 parent 950d4fc commit 9ec9f32
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/pages/api-docs/swipeable-drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
| <span class="prop-name required">onOpen<abbr title="required">*</abbr></span> | <span class="prop-type">func</span> | | Callback fired when the component requests to be opened.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. |
| <span class="prop-name required">open<abbr title="required">*</abbr></span> | <span class="prop-type">bool</span> | | If `true`, the drawer is open. |
| <span class="prop-name">SwipeAreaProps</span> | <span class="prop-type">object</span> | | The element is used to intercept the touch events on the edge. |
| <span class="prop-name">swipeAreaWidth</span> | <span class="prop-type">number</span> | <span class="prop-default">20</span> | The width of the left most (or right most) area in pixels where the drawer can be swiped open from. |
| <span class="prop-name">swipeAreaWidth</span> | <span class="prop-type">number</span> | <span class="prop-default">20</span> | The width of the left most (or right most) area in px where the drawer can be swiped open from. |
| <span class="prop-name">transitionDuration</span> | <span class="prop-type">number<br>&#124;&nbsp;{ appear?: number, enter?: number, exit?: number }</span> | <span class="prop-default">{ enter: duration.enteringScreen, exit: duration.leavingScreen }</span> | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. |

The `ref` is forwarded to the root element.
Expand Down
8 changes: 4 additions & 4 deletions docs/src/pages/customization/breakpoints/breakpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ declare module '@material-ui/core/styles/createBreakpoints' {

#### Arguments

1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.

#### Returns

Expand All @@ -175,7 +175,7 @@ const styles = (theme) => ({

#### Arguments

1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.

#### Returns

Expand Down Expand Up @@ -227,8 +227,8 @@ const styles = (theme) => ({

#### Arguments

1. `start` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
2. `end` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
1. `start` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
2. `end` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/customization/typography/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ To be done: [#15251](https://github.com/mui-org/material-ui/issues/15251).

You might want to change the `<html>` element default font size. For instance, when using the [10px simplification](https://www.sitepoint.com/understanding-and-using-rem-units-in-css/).

> ⚠️ Changing the font size can harm accessibility ♿️. Most browsers agreed on the default size of 16 pixels, but the user can change it. For instance, someone with an impaired vision could have set their browser’s default font size to something larger.
> ⚠️ Changing the font size can harm accessibility ♿️. Most browsers agreed on the default size of 16px, but the user can change it. For instance, someone with an impaired vision could have set their browser’s default font size to something larger.
The `theme.typography.htmlFontSize` property is provided for this use case,
which tells Material-UI what the font-size on the `<html>` element is.
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/SwipeableDrawer/SwipeArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ SwipeArea.propTypes = {
*/
className: PropTypes.string,
/**
* The width of the left most (or right most) area in pixels where the
* The width of the left most (or right most) area in px where the
* drawer can be swiped open from.
*/
width: PropTypes.number.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface SwipeableDrawerProps extends Omit<DrawerProps, 'onClose' | 'ope
*/
SwipeAreaProps?: object;
/**
* The width of the left most (or right most) area in pixels where the
* The width of the left most (or right most) area in px where the
* drawer can be swiped open from.
* @default 20
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ SwipeableDrawer.propTypes = {
*/
SwipeAreaProps: PropTypes.object,
/**
* The width of the left most (or right most) area in pixels where the
* The width of the left most (or right most) area in px where the
* drawer can be swiped open from.
* @default 20
*/
Expand Down

0 comments on commit 9ec9f32

Please sign in to comment.