form-field: expose typography variables for customization
Would it be possible to allow setting the $infix-padding variable when customizing theme via the @mat-core mat-core mixin ?
I would also like to see this feature so I have written a more detailed feature request. If this is something deemed worth adding I will also contribute to the PR if desired. Thanks for the consideration.
Overview of the Issue
Sass maps are used to set many theming variables in Material. Material uses the $config map passed to mixins to get values, or computes local mixin variables based on values from the config. Other Sass variables are declared as defaults but can be changed at compilation time. Padding is often based on the relative unit em which directly relates to font size of that element. There is no way to change this ratio without CSS overrides.

Motivation for or Use Case
Form elements. Sometimes a UI designer decides that a form filed or dropdown needs to be "tighter" than usual. This is achievable by writing CSS overrides to change the padding of the dropdown or form field but it would feel more maintainable to create a material theme that's configured to have a smaller ratio between font size and padding.

Suggest a Fix
Replace hard coded variables related to infix with a variable pulled from the config Sass map or use a ternary like if statement to null check the config map and use the previously hard coded em value as a fallback.
Hello! Our components follow the Material Design specification as closely as possible. We recently started working on density as described per Material Design spec. That should allow developers to increase density (i.e. reducing spacing) for components such as the form-field.
In general though, I agree that it would make sense to have these variables at top-level at least, so that they can be overridden. Marking this as feature request w/ P5.
This should also be fixed / more customizable with the upcoming MDC-based form-field implementation.
Closing this issue since MDC based components are now the default components and the legacy ones have been removed. These values can be adjusted by updating the CSS variable. Current work is ongoing to make these overrides easier as well.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.