-
Notifications
You must be signed in to change notification settings - Fork 273
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
refactor(rich-text-editor): refactor rich-text-editor style #2346
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,20 @@ | ||
.component-css-vars-rich-text-editor() { | ||
// 边框色 | ||
--ti-rich-text-editor-box-border-color: var(--ti-common-color-line-normal, #c2c2c2); | ||
// 没用(hide) | ||
--ti-rich-text-editor-box-outline-hover-color: var(--ti-common-color-line-hover, #191919); | ||
// 选中或悬浮头部图标色 | ||
--ti-rich-text-editor-button-hover: var(--ti-common-color-icon-hover, #191919); | ||
// 没用(hide) | ||
--ti-rich-text-editor-button-active: var(--ti-common-color-icon-active, #191919); | ||
// 没有效果(hide) | ||
--ti-rich-text-editor-button-disabled-text-color: var(--ti-common-color-icon-disabled, #c2c2c2); | ||
// 没用(hide) | ||
--ti-rich-text-editor-poplist-item-selected-bg-color: var(--ti-common-color-selected-background, #f5f5f5); | ||
// 没用(hide) | ||
--ti-rich-text-editor-poplist-item-selected-text-color: var(--ti-common-color-selected-text-color, #191919); | ||
--tv-RichTextEditor-border-color: var(--tv-color-border); | ||
// 富文本行号 | ||
--tv-RichTextEditor-line-height: var(--tv-line-height-number); | ||
// 图标悬浮颜色 | ||
--tv-RichTextEditor-icon-color-hover: var(--tv-color-icon-hover); | ||
// 图标禁用颜色 | ||
--tv-RichTextEditor-icon-color-disabled: var(--tv-color-icon-disabled); | ||
// 头部图标弹出下拉框背景色 | ||
--ti-rich-text-editor-options-bg-color: var(--ti-common-color-bg-white-normal, #ffffff); | ||
--tv-RichTextEditor-options-bg-color: #ffffff; | ||
// 头部图标弹出下拉框阴影 | ||
--ti-rich-text-editor-options-box-shadow: var(--ti-common-shadow-2-down, 0 2px 8px 0 #0003); | ||
--tv-RichTextEditor-options-box-shadow: var(--tv-shadow-3-down); | ||
// 头部图标弹出下拉框圆角 | ||
--ti-rich-text-editor-options-border-radius: var(--ti-common-border-radius-normal, 6px); | ||
// 没用(hide) | ||
--ti-rich-text-editor-options-item-padding: var(--ti-common-space-6, 6px) var(--ti-common-space-5x, 20px); | ||
// 头部图标弹出下拉框选项悬浮文本色 | ||
--ti-rich-text-editor-options-item-hover-color: var(--ti-common-color-icon-hover, #191919); | ||
--tv-RichTextEditor-options-border-radius: var(--tv-border-radius-md); | ||
// 头部图标弹出下拉框选项文本色 | ||
--tv-RichTextEditor-options-text-color: var(--tv-color-text); | ||
// 头部图标弹出下拉框选项悬浮背景颜色 | ||
--tv-RichTextEditor-options-item-bg-color: var(--tv-color-bg-hover); | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using a global variable for the background color.
While the new variable
--tv-RichTextEditor-options-bg-color
follows the updated naming convention, it uses a hardcoded color value "#ffffff". For better theme flexibility and consistency, consider using a global background color variable instead.Replace the hardcoded value with a global variable:
Ensure that
--tv-color-bg-normal
or a similar global variable exists in your theme system.📝 Committable suggestion