Skip to content
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

Inputs: Add typography customization #8754

Merged
merged 17 commits into from
Apr 30, 2024
Merged

Conversation

danielchalmers
Copy link
Contributor

@danielchalmers danielchalmers commented Apr 19, 2024

Description

Adds Typo.input so you can control the default input typography like you can do with Typo.button, then uses that as the default for the new Typo property in MudBaseInput.

This only applies to inputs and not controls like Check Box or Switch because they use body1.

Uses the lh unit which raises browser support level but significantly simplifies the line height. To ease the maintenance burden and set expectations, I added a note to the README about staying up to date so that we aren't tied down to ancient versions. Note: Blazor only supports the latest browser versions.

Resolves #8337

I think the ideal solution might be to scale the entire input up with relative units, but this implementation fits in with our current approach.

How Has This Been Tested?

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Text Field example:

image

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@danielchalmers danielchalmers marked this pull request as draft April 19, 2024 19:11
@github-actions github-actions bot added enhancement New feature or request PR: needs review labels Apr 19, 2024
@danielchalmers
Copy link
Contributor Author

I need to know if this is on the right track and which controls I should apply this to. Check Box, Switch, etc?

@danielchalmers
Copy link
Contributor Author

@jperson2000 Would love to know what you think

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.05%. Comparing base (28bc599) to head (9236bd9).
Report is 127 commits behind head on dev.

Files Patch % Lines
...Components/ThemeProvider/MudThemeProvider.razor.cs 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8754      +/-   ##
==========================================
+ Coverage   89.82%   90.05%   +0.22%     
==========================================
  Files         412      421       +9     
  Lines       11878    12302     +424     
  Branches     2364     2438      +74     
==========================================
+ Hits        10670    11078     +408     
+ Misses        681      670      -11     
- Partials      527      554      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henon
Copy link
Collaborator

henon commented Apr 27, 2024

Will the default typography of textfields stay the same as before? In other words, is this visually breaking?

@danielchalmers
Copy link
Contributor Author

Will the default typography of textfields stay the same as before? In other words, is this visually breaking?

@henon Everything stays the same, the styles are just moved to --mud-typography-input so they can be customized through the theme provider or the new Typo property.

@danielchalmers danielchalmers marked this pull request as ready for review April 29, 2024 06:17
@henon henon merged commit 72c4cde into MudBlazor:dev Apr 30, 2024
4 checks passed
@henon
Copy link
Collaborator

henon commented Apr 30, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Input: Typography
2 participants