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

[Rating] Improve mobile support #18603

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const styles = theme => ({
cursor: 'pointer',
paddingTop: 6,
outline: '0',
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
paddingBottom: 6,
paddingLeft: 16,
Expand Down
2 changes: 2 additions & 0 deletions packages/material-ui-lab/src/Rating/Rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const styles = theme => ({
fontSize: theme.typography.pxToRem(24),
color: '#ffb400',
cursor: 'pointer',
// Remove blue highlight
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just remove this comment as it obviously causes more confusion. The statement itself already says that the highlight is removed. What color the highlight has is platform/user stylesheet dependent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 👍

WebkitTapHighlightColor: 'transparent',
'&$disabled': {
opacity: 0.5,
pointerEvents: 'none',
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Backdrop/Backdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const styles = {
top: 0,
left: 0,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
// Disable scroll capabilities.
touchAction: 'none',
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ButtonBase/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const styles = {
alignItems: 'center',
justifyContent: 'center',
position: 'relative',
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
backgroundColor: 'transparent', // Reset default value
// We disable the focus ring for mouse, touch and keyboard users.
Expand Down
5 changes: 3 additions & 2 deletions packages/material-ui/src/Chip/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export const styles = theme => {
/* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */
clickable: {
userSelect: 'none',
WebkitTapHighlightColor: 'transparent', // Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
cursor: 'pointer',
'&:hover, &:focus': {
backgroundColor: emphasize(backgroundColor, 0.08),
Expand Down Expand Up @@ -211,7 +212,7 @@ export const styles = theme => {
},
/* Styles applied to the `deleteIcon` element. */
deleteIcon: {
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
color: deleteIconColor,
height: 22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const styles = theme => ({
cursor: 'pointer',
// For correct alignment with the text.
verticalAlign: 'middle',
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
marginLeft: -11,
marginRight: 16, // used for row presentation of radio/checkbox
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const styles = theme => {
background: 'none',
height: '1.1875em', // Reset (19px), match the native input line-height
margin: 0, // Reset for Safari
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
display: 'block',
// Make the flex item shrink with Firefox
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Link/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const styles = {
/* Styles applied to the root element if `component="button"`. */
button: {
position: 'relative',
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
backgroundColor: 'transparent', // Reset default value
// We disable the focus ring for mouse, touch and keyboard users.
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Modal/SimpleBackdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const styles = {
top: 0,
left: 0,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
// Disable scroll capabilities.
touchAction: 'none',
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const styles = theme => ({
cursor: 'pointer',
touchAction: 'none',
color: theme.palette.primary.main,
// Remove grey highlight
// Remove blue highlight
WebkitTapHighlightColor: 'transparent',
'&$disabled': {
pointerEvents: 'none',
Expand Down