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

Implement text transformation (uppercase, lowercase) #38

Open
passiomatic opened this issue Nov 30, 2021 · 0 comments
Open

Implement text transformation (uppercase, lowercase) #38

passiomatic opened this issue Nov 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@passiomatic
Copy link
Owner

CSS has the ability to do text transformations: (uppercase, lowercase, etc). Does Elm UI has it? It seems not the case.

Generated Elm code

So, how do you translate lower case, uppercase in the generated Elm code? Should we pass the typed string value in the editor thru String.toUpper before rendering or CodeGen it?

Or maybe we leave the typed value untouched and we generate code that calls String.toUpper?

The UI

I guess this is best done via a pill selector Aa | AA | aa similar to Sketch (see below), mapped to a Elm type:

type FontTransform
    = Uppercase
    | Lowercase
    | None

A little digression about Small-caps

On related topic: should stuff like “small-caps”, which in Elm UI is a font feature, be in the same group of the text transformation functions? Perhaps it makes sense to a have a different place in the UI for the OpenType features.

If I look at Sketch it has a little Text Options panel (first), while Figma group everything into a Type details panel (second).

Schermata 2021-11-30 alle 17 27 08
Schermata 2021-11-30 alle 17 28 47

@passiomatic passiomatic added the enhancement New feature or request label Nov 30, 2021
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

No branches or pull requests

1 participant