Skip to content

Commit

Permalink
[core] Increase specificity to get correct style (#18238)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 7, 2019
1 parent 8cfe1f0 commit 6c6d8e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 5 additions & 1 deletion packages/material-ui/src/ButtonGroup/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import clsx from 'clsx';
import capitalize from '../utils/capitalize';
import { fade } from '../styles/colorManipulator';
import withStyles from '../styles/withStyles';
import '../Button'; // So we don't have any override priority issue.
import Button from '../Button';

// Force a side effect so we don't have any override priority issue.
// eslint-disable-next-line no-unused-expressions
Button.styles;

export const styles = theme => ({
/* Styles applied to the root element. */
Expand Down
3 changes: 1 addition & 2 deletions packages/material-ui/src/CardActions/CardActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import '../Button'; // So we don't have any override priority issue.

export const styles = {
/* Styles applied to the root element. */
Expand All @@ -13,7 +12,7 @@ export const styles = {
},
/* Styles applied to the root element if `disableSpacing={false}`. */
spacing: {
'& > * + *': {
'& > :not(:first-child)': {
marginLeft: 8,
},
},
Expand Down
3 changes: 1 addition & 2 deletions packages/material-ui/src/DialogActions/DialogActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import '../Button'; // So we don't have any override priority issue.

export const styles = {
/* Styles applied to the root element. */
Expand All @@ -15,7 +14,7 @@ export const styles = {
},
/* Styles applied to the root element if `disableSpacing={false}`. */
spacing: {
'& > * + *': {
'& > :not(:first-child)': {
marginLeft: 8,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import '../Button'; // So we don't have any override priority issue.

export const styles = {
/* Styles applied to the root element. */
Expand All @@ -14,7 +13,7 @@ export const styles = {
},
/* Styles applied to the root element if `disableSpacing={false}`. */
spacing: {
'& > * + *': {
'& > :not(:first-child)': {
marginLeft: 8,
},
},
Expand Down

0 comments on commit 6c6d8e0

Please sign in to comment.