Angular Material - custom form field density
source link: https://gist.github.com/w3soto/ce321b62f3ad25d8e326ee8e5136a6d2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
custom form field density ยท GitHub
Instantly share code, notes, and snippets.
$base-input-font-size: 14px;
/* custom density */ mat-form-field[dense] { font-size: 10px; .mat-select, .mat-input-element, .mat-form-field-label mat-label { font-size: $base-input-font-size; } .mat-icon { font-size: calc($base-input-font-size * 1.5); // original: 150% } .mat-form-field-wrapper { padding-bottom: calc($base-input-font-size * 1.34375); // original: 1.34375em } .mat-form-field-underline { bottom: calc($base-input-font-size * 1.34375); // original: 1.34375em }
&.mat-form-field-appearance-fill { .mat-form-field-infix { padding-top: 0.5em; padding-bottom: 0.5em; } .mat-form-field-flex { padding-top: 0.7em; padding-bottom: 0.05em; } } }
/* fix icons position */ .mat-form-field-flex { align-items: center !important; gap: 0.25em; } .mat-form-field-appearance-fill mat-icon { transform: translateY(-0.125em); }
Recommend
-
83
Remove django form field validation errors manuallyRemove django form field validation errors manually Tue 06 December 2011Original post at Makina Corpus Sometimes I look fo...
-
8
Angular Material Form Controls Select (mat-select) Example by Didin J., updated on Feb 03, 2020
-
8
Angular Material Form Controls, Form Field and Input Examples by Didin J., updated on Oct 28, 2019
-
2
Tutorial How To Use Custom SVG Icons in Angular Material Angular ...
-
4
Tutorial How To Use Custom Form Validation in Angular Angular Introduction Validat...
-
4
Trying to use form field and file upload directive together in Akka-Http? Reading Time: 2 minutesIf you are reading this t...
-
2
Tutorial How To Use ControlValueAccessor to Create Custom Form Controls in Angular Angular ...
-
3
-
2
How to overlay a custom density curve on a histogram in SAS 11
-
8
How to Create Custom Cross-Form Control Validator in Angular
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK