Skip to content

Feature Request | add font-variant / text-transform option to the global "font" type #6289

@callumfrance

Description

@callumfrance

Expected Behavior

In raw CSS, I can use the following rule to make text uppercase -

text-transform: uppercase;

I could also achieve something similar using a different rule to get "small-caps" -

font-variant: small-caps;

So it would be cool to allow this to be controlled via a setting manageable for usages of fonts (e.g. on a per-heading basis).
In src/js/themes/base.d.ts:

    font?: {
      face?: string;
      family?: string;
      height?: string;
      maxWidth?: string;
      size?: string;
      weight?: number | string;
      variant?: string; // Very epic new rule, I can now make my text "uppercase" so easily!
    };

Note: It is probably crazy to have the entire theme globally uppercase all fonts, but I am assuming this global::font specification is how the other font: {} definitions also work.

Actual Behavior

The current global::font object piece is in src/js/themes/base.d.ts is as follows:

    font?: {
      face?: string;
      family?: string;
      height?: string;
      maxWidth?: string;
      size?: string;
      weight?: number | string;
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA suggestion to add to or change behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions