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

Typography: Allow strings in all settings #9011

Open
1 of 2 tasks
danielchalmers opened this issue May 19, 2024 · 0 comments
Open
1 of 2 tasks

Typography: Allow strings in all settings #9011

danielchalmers opened this issue May 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@danielchalmers
Copy link
Contributor

Feature request type

Other

Component name

No response

Is your feature request related to a problem?

Font Weight

FontWeight does not accept common CSS strings

/// <summary>
/// Gets or sets the font weight.
/// </summary>
public int FontWeight { get; set; }

/* <font-weight-absolute> keyword values */
font-weight: normal;
font-weight: bold;

/* <font-weight-absolute> numeric values [1,1000] */
font-weight: 100;
font-weight: 200;
font-weight: 300;
font-weight: 400; /* normal */
font-weight: 500;
font-weight: 600;
font-weight: 700; /* bold */
font-weight: 800;
font-weight: 900;

/* Keyword values relative to the parent */
font-weight: lighter;
font-weight: bolder;

/* Global values */
font-weight: inherit;
font-weight: initial;
font-weight: revert;
font-weight: revert-layer;
font-weight: unset;

https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight

Line Height

LineHeight does not accept common CSS strings

/// <summary>
/// Gets or sets the line height.
/// </summary>
public double LineHeight { get; set; }

/* Keyword value */
line-height: normal;

/* Unitless values: use this number multiplied
by the element's font size */
line-height: 3.5;

/* <length> values */
line-height: 3em;

/* <percentage> values */
line-height: 34%;

/* Global values */
line-height: inherit;
line-height: initial;
line-height: revert;
line-height: revert-layer;
line-height: unset;

https://developer.mozilla.org/en-US/docs/Web/CSS/line-height

Describe the solution you'd like

They should be strings so we can use all units of measurement and even predefined terms like inherit, unset, bold, normal.

Have you seen this feature anywhere else?

No response

Describe alternatives you've considered

No response

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
@danielchalmers danielchalmers added the enhancement New feature or request label May 19, 2024
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
Status: No status
Development

No branches or pull requests

1 participant