yarn material-ui 1.0.0-beta.42

latest releases: 0.20.2, 0.20.1, 1.0.0-beta.47...
6 years ago
Apr 16, 2018

Big thanks to the 15 contributors who made this release possible.

Here are some highlights ✨:

  • A better CSS override story (#10961) @oliviertassinari
  • Strongly typed React.CSSProperties TypeScript definitions (#11007) @pelotom
  • And many more bug fixes and documentation improvements.

Breaking change

This breaking change is important. It might be the most painful to recover from before stable v1 (May 17th 2018).
We have changed the CSS specificity rule to solve #10771 at scale.

It's inspired by the Bootstrap approach to writing CSS. It follows two rules:

  1. A variant has one level of specificity.
    For instance, the color and variant properties are considered a variant.
    The lower the style specificity is, the simpler you can override it.
  2. We increase the specificity for a variant modifier.
    We already have to do it for the pseudo-classes (:hover, :focus, etc.).
    It allows much more control at the cost of more boilerplate.
    Hopefully, it's more intuitive.

Example:

const styles = {
-  checked: {
-    color: green[500],
+  root: {
+    color: green[600],
+    '&$checked': {
+      color: green[500],
+    },
   },
+  checked: {},
};

<Checkbox
  classes={{
+   root: classes.root,
    checked: classes.checked,
  }}
/>

Component Fixes / Enhancements

Docs

Core

Don't miss a new material-ui release

NewReleases is sending notifications on new releases.