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 font consumption happen using CSS variables #814

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

AMoo-Miki
Copy link
Collaborator

@AMoo-Miki AMoo-Miki commented Jun 19, 2023

Description

Replace usage of $ouiFontFamily and $ouiCodeFontFamily with --oui-font-family and --oui-code-font-family CSS variables

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…i-font-family` and `--oui-code-font-family` CSS variables

Signed-off-by: Miki <miki@amazon.com>
@@ -62,7 +62,7 @@

.ouiSuggestItem__label {
@include ouiTextTruncate;
font-family: $ouiCodeFontFamily;
font-family: var(--oui-code-font-family);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any issues tagged to the PR. Trying to understand the purpose behind this change. Why are we changing from sass to css variables?

Copy link
Collaborator Author

@AMoo-Miki AMoo-Miki Jun 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS variables will allow overriding them on the frontend, without having to load a new stylesheet: faster iterations.

@AMoo-Miki AMoo-Miki merged commit a0e0bb5 into opensearch-project:main Jun 19, 2023
5 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 19, 2023
…i-font-family` and `--oui-code-font-family` CSS variables (#814)

Signed-off-by: Miki <miki@amazon.com>
(cherry picked from commit a0e0bb5)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
BSFishy pushed a commit that referenced this pull request Jun 20, 2023
…i-font-family` and `--oui-code-font-family` CSS variables (#814) (#821)

(cherry picked from commit a0e0bb5)

Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@AMoo-Miki AMoo-Miki deleted the font-to-css-var branch September 27, 2023 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants