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

feat: add font variables for components in theme v2 #192

Open
MartinCupela opened this issue Sep 27, 2022 · 1 comment
Open

feat: add font variables for components in theme v2 #192

MartinCupela opened this issue Sep 27, 2022 · 1 comment

Comments

@MartinCupela
Copy link
Contributor

Motivation
Consistency + possibility to change the font easily without having to write long selectors to override the default font settings for components. It seems that font rules is one of few that does not have its component variables.

Example

In order to change the textarea font we have to do the following:

.str-chat__message-input .str-chat__message-textarea-container .str-chat__message-textarea {
    font: var(--str-chat__body-text);
}

Easier would be something like:

.str-chat {
  --str-chat__message-input-textarea-font: var(--str-chat__body-text);
}
@szuperaz
Copy link
Collaborator

If you use CSS cascade layers, you can just write .str-chat__message-textarea, but the issue makes sense regardless of that

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

No branches or pull requests

2 participants