question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[system][Box, Grid, Typography] `textTransform` prop does not work directly

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The textTransform prop is passed through to the DOM node.

Expected behavior 🤔

The docs for <Box/> says:

The Box component packages all the style functions that are exposed in @mui/system.

Similarly, the docs for <Grid/> and <Typography/> say:

As a CSS utility, the Grid component also supports all system properties. You can use them as props directly on the component.

Over on the sx prop page, it says:

The property is a superset of CSS that packages all the style functions that are exposed in @mui/system. You can specify any valid CSS using this prop.

I interpret that as meaning that any CSS prop that works via the sx prop will also work directly on Box, Grid and Typography.

However this doesn’t appear to be the case for textTransform - it works via sx, but doesn’t directly on Box/Grid/Typography.

Steps to reproduce 🕹

https://codesandbox.io/s/cocky-mayer-intql?file=/src/Demo.tsx:371-372

Context 🔦

No response

Your environment 🌎

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mnajdovacommented, Jan 11, 2022

@patspam there is a list of which CSS properties are available under the Docs’ System section. We do not support all CSS properties as first class props.

0reactions
michaldudakcommented, Dec 30, 2021

I just noticed that the same is also true for cursor, which makes me suspect a lot of others are missing too. Is it worth doing an audit of all CSS props? Or am I reading the docs wrong - are Box/Grid/Typography only supposed to contain a subset of all CSS props?

@mnajdova, you would likely know best.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[system][Box, Grid, Typography] `textTransform` prop does not ...
I interpret that as meaning that any CSS prop that works via the sx prop will also work directly on Box, Grid and...
Read more >
material-ui/system
Access the theme values directly from the component props. 🦋 Encourage UI consistency. 🌈 Write responsive style effortlessly. 🦎 Work with any theme ......
Read more >
mui/material/CHANGELOG.md - UNPKG
- The `jssPreset` object is no longer exported from `@material-ui/core/styles`. You should import it directly from `@material-ui/styles`.
Read more >
@mui/system | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Why the Grid Element Not Arranging The Typography
Here's a working example of the same on codesandbox. Here's the code. import ReactDOM from "react-dom"; import { Grid, Typography, Box, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found