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: nav外观配置问题修复 #6699

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

wanglinfang2014
Copy link
Collaborator

@wanglinfang2014 wanglinfang2014 commented Apr 24, 2023

What

🤖 Generated by Copilot at 4d13203

This pull request improves the menu and nav components in the amis-ui package, by simplifying and standardizing their styles, and by adding more props for customization and filtering. It also moves the _menu.scss file to a more appropriate location and adjusts some style values.

🤖 Generated by Copilot at 4d13203

We are the masters of the menu
We wield the power of the style
We purge the code of the redundant
We make the nav a work of art

Why

How

🤖 Generated by Copilot at 4d13203

  • Change the fill color of the svg icons in the menu items to use the currentColor value, which inherits the color from the parent element, for consistency in different themes and states. (link, link, link, link, link)
  • Remove the redundant height and line-height properties of the menu items, sub items, sub menu titles, and tooltip wraps, as they are already set by the line-height of the nav item or the nav item horizontal, which are defined in the _nav.scss file. (link, link, link, link, link, link, link, link, link, link)
  • Remove the unused menu dark ancestor font color on active variable, as the menu item color on active is now determined by the layout font color on active variable. (link)
  • Set the cursor and font-weight of the nav menu item to inherit from the parent element, to avoid overriding the default styles of the rc-menu component. (link)
  • Change the background color of the nav menu horizontal item selected indicator to use the menu light font color on active variable, for consistency with the text color on active in the light theme. (link)
  • Remove the border-bottom of the nav menu horizontal item and the nav menu item selected in the dark and light themes, as they are not needed. The border-bottom is already handled by the selected indicator, which is a pseudo-element with absolute position and height of 2px. (link, link)
  • Move the _menu.scss file from the scss/components folder to the scss folder, as it is not a component-specific style file, but a general style file for the menu feature. Add the line-height of the nav item and the nav item horizontal to the _menu.scss file, as they are common styles for the menu and nav components. (link)

@github-actions github-actions bot added the fix label Apr 24, 2023
@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@lurunze1226 lurunze1226 merged commit a1aa0c7 into baidu:master Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants