Skip to content

Density #5722

Answered by asyncLiz
zZHorizonZz asked this question in Q&A
Density #5722
Sep 24, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

A full fledged density system isn't available, but many of the spacing and height tokens that density changes are available.

For example, you can set the top/bottom padding of a text field to make it more dense. Density decreases vertical space by 4px for each level. For text field, we can remove 2px from the top/bottom space at each level.

md-outlined-text-field.dense-1 {
  --md-outlined-text-field-top-space: 14px;
  --md-outlined-text-field-bottom-space: 14px;
}

md-outlined-text-field.dense-2 {
  --md-outlined-text-field-top-space: 12px;
  --md-outlined-text-field-bottom-space: 12px;
}

md-outlined-text-field.dense-3 {
  --md-outlined-text-field-top-space: 10px;
  --md-outlined-text-fi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zZHorizonZz
Comment options

Answer selected by zZHorizonZz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants