Skip to content
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
20 changes: 10 additions & 10 deletions src/material/form-field/_mdc-text-field-structure-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
@use '../core/style/vendor-prefixes';

$fallbacks: m3-form-field.get-tokens();

// TODO(b/263527625): should be removed when this is addressed on the MDC side.
// MDC sets a will-change on this element, because of the animation. This can cause
// scrolling performance degradation on pages with a lot of form fields so we reset it.
// The animation is on a `transform` which is hardware-accelerated already.
// This flag is used to re-add the `will-change` internally since removing it causes a
// lot of screenshot diffs.
$_enable-form-field-will-change-reset: true;
$_is-external-build: true;

// Mixin that can be included to override the default MDC text-field
// styles to fit our needs. See individual comments for context on why
Expand Down Expand Up @@ -45,7 +38,13 @@ $_enable-form-field-will-change-reset: true;
// clicking the label to focus the input.
pointer-events: all;

@if ($_enable-form-field-will-change-reset) {
// TODO(b/263527625): should be removed when this is addressed on the MDC side.
// MDC sets a will-change on this element, because of the animation. This can cause
// scrolling performance degradation on pages with a lot of form fields so we reset it.
// The animation is on a `transform` which is hardware-accelerated already.
// This flag is used to re-add the `will-change` internally since removing it causes a
// lot of screenshot diffs.
@if ($_is-external-build) {
will-change: auto;
}
}
Expand Down Expand Up @@ -81,7 +80,8 @@ $_enable-form-field-will-change-reset: true;
height: auto;
flex: auto;

@if ($_enable-form-field-will-change-reset) {
// TODO(b/263527625): should be removed when this is addressed on the MDC side.
@if ($_is-external-build) {
will-change: auto;
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/material/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@use './radio-common';

$fallbacks: m3-radio.get-tokens();
$_is-external-build: true;

.mat-mdc-radio-button {
-webkit-tap-highlight-color: transparent;
Expand All @@ -15,6 +16,14 @@ $fallbacks: m3-radio.get-tokens();
// user of this. Therefore we add the pointer cursor on top of MDC's styles.
label {
cursor: pointer;

// TODO(crisbeto): disable internally due to a large amount of breakages.
// Prevent the label from taking up space when it's empty.
@if ($_is-external-build) {
&:empty {
display: none;
}
}
}

.mdc-radio__background::before {
Expand Down
Loading