Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Increase specificity to get correct style #18238

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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