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

Automate the markdown generation for the CSS variables. #137

Closed
wants to merge 1 commit into from

Conversation

petyosi
Copy link
Contributor

@petyosi petyosi commented Jun 23, 2022

Needs more work.

Currently, running yarn build-docs will output an HTML table with some variables parsed. I believe we should write those to several files and have them included in the markdown. Here's what it looks like:

NameDefault ValueDescriptionUsed in
--str-chat__primary-colorvar(--str-chat__blue500)Used for emphasis, brands can inject their main color using this variableUsed in Links, buttons, avatar fallback background, etc.
--str-chat__primary-color-low-emphasisvar(--str-chat__blue300)Used for emphasis, brands can inject their main color using this variable, it has less emphasis than primary colorUsed in Selected message reaction background color
--str-chat__active-primary-colorvar(--str-chat__blue600)Used to indicate that a UI element with primary color is in an active stateUsed in Pressed buttons
--str-chat__on-primary-colorvar(--str-chat__grey50)If the primary color is used as a background, text/icons are displayed in this colorUsed in Button color, text on avatar fallback, etc.
--str-chat__background-colorvar(--str-chat__grey50)Used as a background color for the main chat UI componentsUsed in Channel list background
--str-chat__secondary-background-colorvar(--str-chat__grey50)Used as a background color for the main chat UI componentsUsed in Channel background, message list background, message input background
--str-chat__primary-surface-colorvar(--str-chat__blue100)Used as a background color to give emphasis, but less vibrant than the primary colorUsed in Background of messages sent by the current user
--str-chat__surface-colorvar(--str-chat__grey300)A neutral color used to give emphasis to different surfacesUsed in Selected channel preview background, borders
--str-chat__secondary-surface-colorvar(--str-chat__grey200)A neutral color used to give emphasis to different surfacesUsed in Background of received messages, reactions, etc.
--str-chat__text-colorvar(--str-chat__grey950)The main color used for texts/iconsUsed in Messages, channel header, channel title in the channel preview, etc.
--str-chat__text-low-emphasis-colorvar(--str-chat__grey500)Used for texts/icons that need less emphasisUsed in The latest message in the channel preview, deleted message text, default icon state, etc.
--str-chat__disabled-colorvar(--str-chat__grey400)Used for displaying disabled UI elements (typically buttons)Used in Disabled send button etc.
--str-chat__on-disabled-colorvar(--str-chat__grey50)Used for text/icon colors if disabled color is used as a background colorUsed in Text on disabled send button etc.
--str-chat__danger-colorvar(--str-chat__red400)Used for error messages, and destructive actionsUsed in Delete action label etc.
--str-chat__online-indicator-colorvar(--str-chat__green500)
--str-chat__message-highlight-colorvar(--str-chat__yellow100)
--str-chat__unread-badge-colorvar(--str-chat__red400)Used for displaying the unread badgeUsed in Background of the unread badge
--str-chat__on-unread-badge-colorvar(--str-chat__grey50)Used for text/icon colors if unread badge color is used as a background colorUsed in Text on the unread badge
--str-chat__overlay-colorrgba(252, 252, 252, 0.9)The background color used for overlaysUsed in Modal overlay color, attachment preview overlay
--str-chat__secondary-overlayrgba(0, 0, 0, 0.2)The background color used for subtle overlaysUsed in Image gallery
--str-chat__secondary-overlay-text-colorvar(--str-chat__grey50)The text/icon color used on subtle overlaysUsed in Image gallery

@petyosi petyosi changed the base branch from develop to theming2 June 23, 2022 09:09
@szuperaz
Copy link
Collaborator

szuperaz commented Jun 24, 2022

I think we can reuse some of the Angular code generation infrastructure here:

[//]: # "Start of generated content"
[//]: # "End of generated content"

Nothing fancy, but maybe this can save some time.

DONE in the other PR

@szuperaz
Copy link
Collaborator

szuperaz commented Jul 8, 2022

Other PR: #143

@szuperaz szuperaz closed this Jul 8, 2022
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

Successfully merging this pull request may close these issues.

3 participants