Skip to content

Commit 074892b

Browse files
[core] Increase specificity to get correct style
1 parent 4d260e8 commit 074892b

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

packages/material-ui/src/ButtonGroup/ButtonGroup.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import clsx from 'clsx';
44
import capitalize from '../utils/capitalize';
55
import { fade } from '../styles/colorManipulator';
66
import withStyles from '../styles/withStyles';
7-
import '../Button'; // So we don't have any override priority issue.
7+
import Button from '../Button';
8+
9+
// Force a side effect so we don't have any override priority issue.
10+
// eslint-disable-next-line no-unused-expressions
11+
Button.styles;
812

913
export const styles = theme => ({
1014
/* Styles applied to the root element. */

packages/material-ui/src/CardActions/CardActions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import clsx from 'clsx';
44
import withStyles from '../styles/withStyles';
5-
import '../Button'; // So we don't have any override priority issue.
65

76
export const styles = {
87
/* Styles applied to the root element. */
@@ -13,7 +12,7 @@ export const styles = {
1312
},
1413
/* Styles applied to the root element if `disableSpacing={false}`. */
1514
spacing: {
16-
'& > * + *': {
15+
'& > :not(:first-child)': {
1716
marginLeft: 8,
1817
},
1918
},

packages/material-ui/src/DialogActions/DialogActions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import clsx from 'clsx';
44
import withStyles from '../styles/withStyles';
5-
import '../Button'; // So we don't have any override priority issue.
65

76
export const styles = {
87
/* Styles applied to the root element. */
@@ -15,7 +14,7 @@ export const styles = {
1514
},
1615
/* Styles applied to the root element if `disableSpacing={false}`. */
1716
spacing: {
18-
'& > * + *': {
17+
'& > :not(:first-child)': {
1918
marginLeft: 8,
2019
},
2120
},

packages/material-ui/src/ExpansionPanelActions/ExpansionPanelActions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import clsx from 'clsx';
44
import withStyles from '../styles/withStyles';
5-
import '../Button'; // So we don't have any override priority issue.
65

76
export const styles = {
87
/* Styles applied to the root element. */
@@ -14,7 +13,7 @@ export const styles = {
1413
},
1514
/* Styles applied to the root element if `disableSpacing={false}`. */
1615
spacing: {
17-
'& > * + *': {
16+
'& > :not(:first-child)': {
1817
marginLeft: 8,
1918
},
2019
},

0 commit comments

Comments
 (0)