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

Make KIcon label and icon font-size individually configurable #242

Closed
jonboiser opened this issue Jun 14, 2021 · 1 comment
Closed

Make KIcon label and icon font-size individually configurable #242

jonboiser opened this issue Jun 14, 2021 · 1 comment
Labels
category: library Shared code library Component: KIcon P2 - normal Priority: Nice to have TODO: needs decisions Further discussion and planning necessary type: proposal New feature or request

Comments

@jonboiser
Copy link
Contributor

jonboiser commented Jun 14, 2021

Product

Kolibri

Desired behavior

I think the primary way font-size is controllable is to give it a css font-size rule that affects the whole div. However, sometimes (often times?) designs want different sizes for the label and icon. For example:

CleanShot 2021-06-14 at 11 00 44

It would be nice if:

  1. The label size could be provided in px/rem/some other scale
  2. The icon size could be in px (and it assumes a square container)
  3. The vertical alignment can be controlled (e.g. vertical, baseline, etc.)

Current behavior

When label size = font size, the results are not harmonious or to-spec:

CleanShot 2021-06-14 at 10 57 13

(Optional) The Value Add

(Optional) Possible Tradeoffs

Add labels

Please choose the appropriate label(s) from our existing label list to ensure that your issue is properly categorized. This will help us to better understand and address your issue!

@AlexVelezLl
Copy link
Member

Closing since we can already do this by passing an icon and iconAfter slots to our KLabeledIcon, and we can cofigure its font-size with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: library Shared code library Component: KIcon P2 - normal Priority: Nice to have TODO: needs decisions Further discussion and planning necessary type: proposal New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants