Skip to content

refactor(multiple): clean up vendor prefixes #24585

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

Merged
merged 1 commit into from
Mar 18, 2022
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
3 changes: 1 addition & 2 deletions src/material-experimental/mdc-table/table.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use '@material/data-table/data-table' as mdc-data-table;
@use '../../material/core/style/vendor-prefixes';
@use '../mdc-helpers/mdc-helpers';
@use '../../material/table/table-flex-styles';

Expand All @@ -13,7 +12,7 @@
// Note that the table can either set this class or an inline style to make something sticky.
// We set the style as `!important` so that we get an identical specificity in both cases
// and to avoid cases where user styles have a higher specificity.
@include vendor-prefixes.position-sticky($important: true);
position: sticky !important;
}

.mat-mdc-table {
Expand Down
16 changes: 0 additions & 16 deletions src/material/core/style/_vendor-prefixes.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// stylelint-disable material/no-prefixes
@mixin user-select($value) {
-webkit-user-select: $value;
-moz-user-select: $value;
user-select: $value;
}

Expand All @@ -25,26 +24,11 @@
}
}

@mixin cursor-grab {
cursor: -webkit-grab;
cursor: grab;
}

@mixin cursor-grabbing {
cursor: -webkit-grabbing;
cursor: grabbing;
}

@mixin backface-visibility($value) {
-webkit-backface-visibility: $value;
backface-visibility: $value;
}

@mixin position-sticky($important: false) {
position: -webkit-sticky #{if($important, '!important', '')};
position: sticky #{if($important, '!important', '')};
}

@mixin private-color-adjust($value) {
-webkit-print-color-adjust: $value;
color-adjust: $value;
Expand Down
4 changes: 2 additions & 2 deletions src/material/slider/slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $focus-ring-size: 30px !default;

&:not(.mat-slider-disabled):active,
&.mat-slider-sliding:not(.mat-slider-disabled) {
@include vendor-prefixes.cursor-grabbing;
cursor: grabbing;
}
}

Expand Down Expand Up @@ -116,7 +116,7 @@ $focus-ring-size: 30px !default;

%_mat-slider-cursor {
.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) & {
@include vendor-prefixes.cursor-grab;
cursor: grab;
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/material/table/table.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use '../core/style/vendor-prefixes';
@use './table-flex-styles';

@include table-flex-styles.private-table-flex-styles();
Expand Down Expand Up @@ -54,7 +53,7 @@ th.mat-header-cell, td.mat-cell, td.mat-footer-cell {
// Note that the table can either set this class or an inline style to make something sticky.
// We set the style as `!important` so that we get an identical specificity in both cases
// and to avoid cases where user styles have a higher specificity.
@include vendor-prefixes.position-sticky($important: true);
position: sticky !important;
}

.mat-table-fixed-layout {
Expand Down