-
Notifications
You must be signed in to change notification settings - Fork 3
feat(alert,visual): theming with CSS variables (#DS-2679) #208
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8242d14
to
4efdcd7
Compare
Visit the preview URL for this PR (updated for commit 84d6ac9): https://koobiq-next--prs-208-fyhv77e8.web.app (expires Tue, 10 Sep 2024 09:54:11 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
artembelik
reviewed
Sep 2, 2024
artembelik
reviewed
Sep 2, 2024
artembelik
approved these changes
Sep 2, 2024
sk8knut
approved these changes
Sep 3, 2024
052a303
to
886e33e
Compare
lskramarov
approved these changes
Sep 3, 2024
pimenovoleg
reviewed
Sep 4, 2024
artembelik
reviewed
Sep 4, 2024
artembelik
reviewed
Sep 4, 2024
artembelik
reviewed
Sep 4, 2024
artembelik
reviewed
Sep 4, 2024
artembelik
reviewed
Sep 4, 2024
pimenovoleg
approved these changes
Sep 4, 2024
6a36d00
to
5b02e18
Compare
artembelik
reviewed
Sep 5, 2024
artembelik
reviewed
Sep 5, 2024
artembelik
reviewed
Sep 5, 2024
…s to match theme service
…rted changes for docs
cc5f94f
to
754c14c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Now using components is easier! We are moving towards complete component isolation, which will allow you to easily connect and use them. In addition, we have removed the need to pass tokens for assigning colors to components.
List of notable changes:
$theme
and$config
param from component theme mixins. Only css variables used. In that case, default values are expected to be initialized (via css files from@koobiq/design-tokens
or on your own)Styles for each component
CSS file structure:
Q&A
You can change colors, sizes, and fonts by setting appropriate values for the component's CSS variables.
Simply add the class
kbq-light
to the element of your HTML document for using a light theme andkbq-dark
for a dark theme.Otherwise, you don't need to add anything, css variables are connected together with the component.
What's next?
We plan to apply these improvements to all components and use semantic values for the CSS variables of components, such as var(--kbq-size-m) instead of 12px. This will make the code more readable and maintainable.
Описание на RU
Теперь использование компонентов стало проще! Мы движемся к полной изоляции компонентов, что позволит вам легко подключать и использовать их. Кроме того, мы убрали необходимость пробрасывать токены для задания цветов компонентам.$theme
и$config
из миксинов темы компонента. Использованы только переменные css.Q&A
Изменить цвета, размеры и шрифты можно задав соответствующие значения css-переменным компонента.
Просто добавьте класс
kbq-light
к элементу вашего HTML-документа для использования светлой темы иkbq-dark
для темной темы.В остальном, добавлять ничего не нужно, css-переменные подключатся вместе с компонентом.
Что планируется сделать дальше?
Мы планируем применить эти улучшения ко всем компонентам и использовать семантические значения для CSS-переменных компонентов, такие как var(--kbq-size-m) вместо 12px. Это сделает код более читаемым и поддерживаемым.