You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I material ui before version 5 the result of theme.spacing(n) was a number. This was useful as one could easily do mathematics on that number.
I understand that adding px would be required by the new emotion engine/syntax, however could there be a separate function that just returns the calculated spacing in pixels? IE theme.pixelSpacing(n: number): number
Should put a breakpoint (with default spacing settings) at 618 pixels.
Motivation 🔦
While some of this can be offset by letting the css engine use calc it's not everywhere possible on top of that the limitations of calc make some code much harder to read, while inlining the calculation would greatly reduce this.
Duplicates
Latest version
Summary 💡
I material ui before version 5 the result of
theme.spacing(n)
was a number. This was useful as one could easily do mathematics on that number.I understand that adding
px
would be required by the new emotion engine/syntax, however could there be a separate function that just returns the calculated spacing in pixels? IEtheme.pixelSpacing(n: number): number
Examples 🌈
Should put a breakpoint (with default spacing settings) at 618 pixels.
Motivation 🔦
While some of this can be offset by letting the css engine use
calc
it's not everywhere possible on top of that the limitations of calc make some code much harder to read, while inlining the calculation would greatly reduce this.A good example is for breakpoints in css:
This should add a breakpoint at 618 pixels.
The text was updated successfully, but these errors were encountered: