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

fix(button): add ghost's cssvars for button #2235

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

shenjunjian
Copy link
Collaborator

@shenjunjian shenjunjian commented Oct 10, 2024

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

根据设计规范, ghost的边框 与plain完全不一样,需要新增一下ghost的相应变量值。
目前,ghost 态与plain态是平级的两个叠加状态。 它俩的类名优先级完全一样。

Summary by CodeRabbit

  • New Features

    • Added support for ghost button styles, enhancing button visual representation across themes.
    • Introduced a new loading animation for icons with the .tiny-icon-loading class.
  • Bug Fixes

    • Corrected variable name for border color in button active state styles.
  • Chores

    • Removed loading animation styles from the float button component for improved functionality clarity.
  • Style

    • Improved readability of CSS for float button styles.

Copy link

coderabbitai bot commented Oct 10, 2024

Walkthrough

The changes in this pull request involve modifications to several LESS files related to UI components. Key updates include the addition of new CSS custom properties for ghost button states in vars.less, the introduction of ghost button styles and mixins in index.less for buttons, and new styles for loading animations in reset.less. Additionally, formatting adjustments and the removal of loading animations in float-button/index.less are noted. Overall, these changes enhance the styling capabilities and maintain existing functionalities across components.

Changes

File Path Change Summary
packages/theme/src/base/reset.less Added new class .tiny-icon-loading and keyframes @keyframes rotating for loading animations. Comment added regarding default values for icons. Existing icon styles remain unchanged.
packages/theme/src/button/index.less Introduced new mixins for ghost button styles: .color-ghost-mixin(@theme) and .color-ghost-active-mixin(@theme). Updated existing mixin .color-active-mixin(@theme, @plain) to correct border color logic.
packages/theme/src/button/vars.less Added new CSS custom properties for ghost button states, including text and border colors for various themes. Comments added for clarity on ghost and plain styles interaction.
packages/theme/src/float-button/index.less Reformatted box-shadow for readability, adjusted spacing for selectors, and removed loading animation styles, including . @{css-prefix-iconfont}-loading and @keyframes rotating.

Possibly related PRs

Suggested reviewers

  • zzcr

🐰 In the meadow, changes bloom,
New styles for icons, dispelling gloom.
Ghost buttons dance in vibrant hues,
With animations, they'll amuse!
Readable code, a joyful sight,
In the world of themes, all feels right! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the bug Something isn't working label Oct 10, 2024
Copy link

[e2e-test-warn]
The component to be tested is missing.

The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug".

Please make sure you've read our contributing guide

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (3)
packages/theme/src/base/reset.less (2)

37-41: Approve loading icon styles with a minor suggestion

The addition of the loading icon styles is good and aligns with the PR objectives. The use of the @{css-prefix-iconfont} variable is a good practice for maintainability.

Consider adding a fallback for browsers that don't support animations:

 .@{css-prefix-iconfont}-loading {
   line-height: 1;
+  display: inline-block; /* Fallback for non-animated version */
   animation: rotating 2s linear infinite;
 }

This ensures that the icon is still visible and properly aligned even if the animation doesn't work.


43-51: Approve rotating animation with performance optimization suggestion

The rotating keyframes are well-defined and will create a smooth rotation animation.

For better performance, consider using the transform property with rotate instead of rotateZ:

 @keyframes rotating {
   0% {
-    transform: rotateZ(0deg);
+    transform: rotate(0deg);
   }

   100% {
-    transform: rotateZ(360deg);
+    transform: rotate(360deg);
   }
 }

This change simplifies the transform and may lead to slightly better performance, especially on mobile devices.

packages/theme/src/button/vars.less (1)

180-180: Avoid informal comments regarding design uncertainties

The comments in lines 180 and 229 mention that "maybe the designer got it wrong" (可能设计师搞错了). It's best to avoid such informal remarks in the codebase. Instead, consider rephrasing the comments to professionally indicate the issue.

Consider updating the comments as follows:

- // 没有这个边框色,可能设计师搞错了。
+ // Border color variable not defined; please confirm with the design team.
- // 没有相应的css变量,可能设计师搞错了
+ // No corresponding CSS variable; please verify with the design team.

Also applies to: 229-229

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 69b6208 and 09e8b03.

📒 Files selected for processing (4)
  • packages/theme/src/base/reset.less (2 hunks)
  • packages/theme/src/button/index.less (2 hunks)
  • packages/theme/src/button/vars.less (7 hunks)
  • packages/theme/src/float-button/index.less (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/theme/src/float-button/index.less
🧰 Additional context used
🔇 Additional comments (11)
packages/theme/src/base/reset.less (2)

Line range hint 1-51: Summary of changes in reset.less

The changes to this file successfully introduce the loading icon styles and animation as part of the ghost button implementation. The additions are well-structured and consistent with the existing codebase. A few minor suggestions were made to improve maintainability and performance:

  1. Consider auditing and potentially deprecating unused icon styles.
  2. Add a fallback for the loading icon in non-animated contexts.
  3. Optimize the rotation animation for better performance.

These changes contribute positively to the UI framework and align well with the PR objectives.


Line range hint 16-35: Address the TODO comment regarding default icon styles

The added comment raises a valid question about the necessity of retaining these default icon styles. To improve code maintainability and reduce potential CSS bloat, consider the following steps:

  1. Audit the usage of these icon classes across the project.
  2. If they are not used or can be replaced with more modern styling approaches (e.g., CSS variables), consider deprecating and eventually removing them.
  3. If they are still needed, document the reason for keeping them to prevent future confusion.

To help with the audit, you can run the following script to check for usage of these icon classes:

This will help determine if these styles are still necessary or can be safely removed.

packages/theme/src/button/index.less (9)

88-95: [Approved] Added Ghost Button Mixin .color-ghost-mixin(@theme)

The new mixin .color-ghost-mixin(@theme) is correctly implemented to define the text and border colors for ghost buttons based on the theme. The usage of variables aligns with the existing pattern in the codebase.


99-99: [Approved] Corrected Variable Name in .color-active-mixin

The variable @border has been correctly updated to use @border: %('var(--tv-Button-border-color%a-active-%a)', @plain, @theme);, ensuring consistency with the naming conventions and proper application of border colors in the active state.


109-119: [Approved] Added Ghost Button Active State Mixin .color-ghost-active-mixin(@theme)

The new mixin .color-ghost-active-mixin(@theme) properly handles the active, focus, hover, and active class states for ghost buttons by updating the border color based on the theme. This addition enhances the button's responsiveness to user interactions.


125-133: [Approved] Integrated Ghost Button Styles into Default Theme

The ghost button styles have been correctly integrated into the default theme by adding the &.is-ghost class and applying the appropriate mixins .color-ghost-mixin(default); and .color-ghost-active-mixin(default);. This ensures consistent styling for ghost buttons in the default theme.


139-147: [Approved] Integrated Ghost Button Styles into Primary Theme

Similarly, ghost button styles have been integrated into the primary theme. The use of &.is-ghost with the respective mixins applies the correct styles for ghost buttons in the primary color scheme.


153-161: [Approved] Integrated Ghost Button Styles into Success Theme

The ghost button styles are appropriately added to the success theme, ensuring that ghost buttons reflect the success color scheme with the correct active states.


167-175: [Approved] Integrated Ghost Button Styles into Warning Theme

The addition of ghost button styles to the warning theme is correctly implemented, maintaining consistency across different button variants.


181-189: [Approved] Integrated Ghost Button Styles into Danger Theme

Ghost button styles have been properly added to the danger theme, allowing for consistent styling of ghost buttons in this variant.


195-203: [Approved] Integrated Ghost Button Styles into Info Theme

The integration of ghost button styles into the info theme is correctly done, ensuring that all button themes support the ghost variant.

Comment on lines +206 to 208
// ghost:bg 强制为透明,比禁用还高 优先级为:六级类名
&.is-ghost.is-ghost.is-ghost.is-ghost.is-ghost.is-ghost {
background-color: var(--tv-Button-bg-color-ghost);
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Refactor to Reduce Selector Specificity

The selector &.is-ghost.is-ghost.is-ghost.is-ghost.is-ghost.is-ghost uses six repetitions of .is-ghost to increase specificity. This approach can reduce maintainability and readability of the code.

Consider refactoring to reduce the specificity without relying on repeated class names. One option is to restructure the CSS to avoid the need for such high specificity or to use more specific parent selectors if applicable.

For example, you could adjust the CSS hierarchy or use a more specific attribute selector:

- &.is-ghost.is-ghost.is-ghost.is-ghost.is-ghost.is-ghost {
+ &.button-container &.is-ghost {

Or, if appropriate, introduce a modifier class that explicitly indicates the higher specificity:

&.is-ghost-high {
  background-color: var(--tv-Button-bg-color-ghost);
}

And apply this class where needed in the HTML:

<button class="tiny-button is-ghost is-ghost-high">Ghost Button</button>

This approach improves code maintainability by avoiding excessive class chaining.

--tv-Button-border-color-ghost-default: #808080; // 没有这个边框色,可能设计师搞错了。

// primary 主题时按钮幽灵文本色
--tv-Button-text-colorghostn-primary: var(--tv-color-act-primary-text);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in variable name --tv-Button-text-colorghostn-primary

There's a typo in the variable name --tv-Button-text-colorghostn-primary. It should be --tv-Button-text-color-ghost-primary to maintain consistency with the naming convention and other variable names.

Apply this diff to correct the variable name:

- --tv-Button-text-colorghostn-primary: var(--tv-color-act-primary-text);
+ --tv-Button-text-color-ghost-primary: var(--tv-color-act-primary-text);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--tv-Button-text-colorghostn-primary: var(--tv-color-act-primary-text);
--tv-Button-text-color-ghost-primary: var(--tv-color-act-primary-text);

// 默认时按钮幽灵文本色
--tv-Button-text-color-ghost-default: var(--tv-color-text-secondary);
// 默认时按钮幽灵边框色
--tv-Button-border-color-ghost-default: #808080; // 没有这个边框色,可能设计师搞错了。
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace hardcoded color #808080 with a CSS variable

The variable --tv-Button-border-color-ghost-default uses a hardcoded color #808080. For consistency and theming flexibility, consider defining and using a CSS variable for this color.

Apply this diff to replace the hardcoded color:

- --tv-Button-border-color-ghost-default: #808080; // 没有这个边框色,可能设计师搞错了。
+ --tv-Button-border-color-ghost-default: var(--tv-color-border-ghost-default); // Define this variable accordingly.

If --tv-color-border-ghost-default does not exist, please add it to the variables list or consult with the design team to determine the appropriate value.

Committable suggestion was skipped due to low confidence.

@@ -191,6 +225,8 @@
--tv-Button-bg-color-plain-active-primary: var(--tv-color-act-primary-bg-white-active);
// primary 主题时按钮激活的朴素边框色
--tv-Button-border-color-plain-active-primary: var(--tv-color-act-primary-bg-white-active); // 无边框
// primary 主题时按钮激活的幽灵边框色
--tv-Button-border-color-ghost-active-primary: #dbdbdb; // 没有相应的css变量,可能设计师搞错了
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace hardcoded color #dbdbdb with a CSS variable

The variable --tv-Button-border-color-ghost-active-primary uses a hardcoded color #dbdbdb. To maintain consistency and ease of theming, consider defining and using a CSS variable for this color.

Apply this diff to replace the hardcoded color:

- --tv-Button-border-color-ghost-active-primary: #dbdbdb; // 没有相应的css变量,可能设计师搞错了
+ --tv-Button-border-color-ghost-active-primary: var(--tv-color-border-ghost-active-primary); // Define this variable accordingly.

If --tv-color-border-ghost-active-primary does not exist, please add it to the variables or coordinate with the design team to determine the correct value.

Committable suggestion was skipped due to low confidence.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
packages/theme/src/button/vars.less (1)

Line range hint 1-324: Overall assessment: Good additions with minor improvements needed

The changes to this file significantly enhance the button styling system by adding support for ghost buttons and their various states. This improvement allows for more flexible and consistent button styling across the application. However, there are a few minor issues to address:

  1. Fix the typo in the variable name on line 183.
  2. Replace hardcoded color values with CSS variables for better maintainability and theming flexibility.
  3. Consult with the design team to clarify and potentially define new color variables for some of the hardcoded values.

Once these issues are addressed, the changes will greatly improve the button component's styling capabilities.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 09e8b03 and 4b4d9d7.

📒 Files selected for processing (1)
  • packages/theme/src/button/vars.less (7 hunks)
🧰 Additional context used
🔇 Additional comments (5)
packages/theme/src/button/vars.less (5)

172-173: LGTM: Clear explanation of ghost and plain button relationship

The comment clearly explains the relationship between ghost and plain button states, which is helpful for developers working with these styles.


228-229: LGTM: Consistent naming for ghost button active state variables

The naming convention for ghost button active state variables is consistent across all themes (primary, success, warning, danger, info). This promotes good maintainability and readability of the code.

Also applies to: 239-240, 250-251, 261-262, 272-273


Line range hint 276-281: LGTM: Comprehensive disabled state handling

The disabled state variables are well-defined and cover both regular and ghost button states. The comment explaining the high priority of the disabled state is helpful for understanding the styling hierarchy.


183-183: ⚠️ Potential issue

Fix typo in variable name

There's a typo in the variable name --tv-Button-text-colorghostn-primary. It should be --tv-Button-text-color-ghost-primary to maintain consistency with other variable names.

Apply this diff to correct the variable name:

- --tv-Button-text-colorghostn-primary: var(--tv-color-act-primary-text);
+ --tv-Button-text-color-ghost-primary: var(--tv-color-act-primary-text);

Likely invalid or redundant comment.


177-180: 🛠️ Refactor suggestion

Replace hardcoded color value with a CSS variable

The variable --tv-Button-border-color-ghost-default uses a hardcoded color #808080. For consistency and easier theming, consider using a CSS variable instead.

Apply this diff to replace the hardcoded color:

- --tv-Button-border-color-ghost-default: #808080; // 没有这个边框色,可能设计师搞错了。
+ --tv-Button-border-color-ghost-default: var(--tv-color-border-ghost-default); // Define this variable accordingly

Also, please consult with the design team to clarify the correct border color for the ghost default state.

Likely invalid or redundant comment.

Comment on lines 216 to 218
--tv-Button-border-color-plain-active-default: var(--tv-color-bg); // 朴素激活都无边框,所以等于背景色。
// 默认时按钮激活的幽灵边框色
--tv-Button-border-color-ghost-active-default: #dbdbdb; // 暂无对应变量
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace hardcoded color value with a CSS variable

The variable --tv-Button-border-color-ghost-active-default uses a hardcoded color #dbdbdb. For consistency and easier theming, consider using a CSS variable instead.

Apply this diff to replace the hardcoded color:

- --tv-Button-border-color-ghost-active-default: #dbdbdb; // 暂无对应变量
+ --tv-Button-border-color-ghost-active-default: var(--tv-color-border-ghost-active-default); // Define this variable accordingly

Please work with the design team to define an appropriate variable for this color.

Committable suggestion was skipped due to low confidence.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
packages/theme/src/base/vars.less (2)

345-346: LGTM! Consider a minor naming improvement.

The addition of these ghost button border color variables aligns well with the PR objectives. They provide specific styling for the ghost button variant, which was mentioned as a goal in the PR description.

A small suggestion for consistency:

Consider renaming these variables to match the naming pattern of other button-related variables in the file. For example:

- --tv-color-border-ghost: var(--tv-base-color-common-8);
- --tv-color-border-ghost-active: var(--tv-base-color-common-6);
+ --tv-color-act-ghost-border: var(--tv-base-color-common-8);
+ --tv-color-act-ghost-border-active: var(--tv-base-color-common-6);

This would align with other button-related variables like --tv-color-act-primary-border and --tv-color-act-primary-border-active.


345-346: Consider adding a brief comment for the new variables

The new ghost button border color variables fit well within the existing structure of the file. To maintain the high level of documentation present throughout the file:

Consider adding a brief comment explaining the purpose of these new ghost button variables. For example:

+ /* Ghost button border colors */
  --tv-color-border-ghost: var(--tv-base-color-common-8);
  --tv-color-border-ghost-active: var(--tv-base-color-common-6);

This will help maintain consistency with the rest of the file and provide clarity for other developers who may work with these variables in the future.

packages/theme/src/button/vars.less (1)

172-172: Clarify the comment regarding style priority

The comment states that ghost and plain styles are at the same level, and if they coexist, the priority cannot guarantee stability. Consider elaborating on this to guide developers on how to handle scenarios where both styles are applied simultaneously, which will help prevent potential styling conflicts.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4b4d9d7 and 0d9135e.

📒 Files selected for processing (2)
  • packages/theme/src/base/vars.less (1 hunks)
  • packages/theme/src/button/vars.less (7 hunks)
🧰 Additional context used
🔇 Additional comments (4)
packages/theme/src/base/vars.less (2)

Line range hint 1-346: Summary of changes and suggestions

The changes to this file successfully introduce the necessary variables for ghost button styling, aligning with the PR objectives. Here's a summary of the review:

  1. The new variables for ghost button border colors have been added correctly.
  2. A suggestion was made to rename the variables to match the existing naming convention for button-related variables.
  3. A verification step was proposed to ensure the new variables are being used correctly in the button component styles.
  4. A recommendation was made to add a brief comment explaining the purpose of the new ghost button variables.

Overall, these changes enhance the design system by providing specific styling options for ghost buttons, as intended. The suggestions provided aim to improve consistency and clarity within the codebase.


345-346: Verify usage in button component styles

To ensure these new variables are properly implemented:

Please run the following script to check for the usage of these new ghost button border color variables in the button component styles:

This will help confirm that the new variables are being used in the appropriate button component styles, ensuring the ghost button styling is applied as intended.

✅ Verification successful

Usage of new ghost button border color variables confirmed

The new variables --tv-color-border-ghost and --tv-color-border-ghost-active are correctly used within the button component styles:

  • packages/theme/src/button/vars.less

This ensures that the ghost button styling is applied as intended.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for the usage of new ghost button border color variables in button component styles

# Search for the new variable names in .less files
echo "Searching for --tv-color-border-ghost usage:"
rg --type less -A 5 $'--tv-color-border-ghost'

echo "Searching for --tv-color-border-ghost-active usage:"
rg --type less -A 5 $'--tv-color-border-ghost-active'

# If the suggested naming convention is adopted, also search for those
echo "Searching for --tv-color-act-ghost-border usage (if renamed):"
rg --type less -A 5 $'--tv-color-act-ghost-border'

echo "Searching for --tv-color-act-ghost-border-active usage (if renamed):"
rg --type less -A 5 $'--tv-color-act-ghost-border-active'

Length of output: 2423


Script:

#!/bin/bash
# Description: Corrected search for usage of new ghost button border color variables in button component styles

# Search for the new variable names in .less files
echo "Searching for --tv-color-border-ghost usage:"
rg --type less -A 5 -- '--tv-color-border-ghost'

echo "Searching for --tv-color-border-ghost-active usage:"
rg --type less -A 5 -- '--tv-color-border-ghost-active'

# If the suggested naming convention is adopted, also search for those
echo "Searching for --tv-color-act-ghost-border usage (if renamed):"
rg --type less -A 5 -- '--tv-color-act-ghost-border'

echo "Searching for --tv-color-act-ghost-border-active usage (if renamed):"
rg --type less -A 5 -- '--tv-color-act-ghost-border-active'

Length of output: 3308

packages/theme/src/button/vars.less (2)

183-183: Fix typo in variable name --tv-Button-text-colorghostn-primary

The typo previously mentioned is still present. The variable name --tv-Button-text-colorghostn-primary should be corrected to --tv-Button-text-color-ghost-primary to maintain consistency with the naming convention used throughout the file.


177-206: Ghost button variables are well-defined and consistent

The newly introduced CSS variables for the ghost button state are appropriately defined and consistently named. This enhancement aligns with the existing styling conventions and improves the theming capabilities for ghost buttons across different themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants