Skip to content

动态修改variables.scss主题样式改不了hover 样式 #2040

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

Closed
BetwayM opened this issue May 9, 2019 · 3 comments
Closed

动态修改variables.scss主题样式改不了hover 样式 #2040

BetwayM opened this issue May 9, 2019 · 3 comments

Comments

@BetwayM
Copy link

BetwayM commented May 9, 2019

Bug report(问题描述)

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:
@BetwayM
Copy link
Author

BetwayM commented May 9, 2019

找到sidebar.scss,去掉颜色设置后面的!important,不然改不了侧边栏展开的背景和hover
// menu hover
.submenu-title-noDropdown,
.el-submenu__title {
&:hover {
background-color: $menuHover;
}
}

.is-active > .el-submenu__title {
  color: $subMenuActiveText;
}

& .nest-menu .el-submenu > .el-submenu__title,
& .el-submenu .el-menu-item {
  min-width: $sideBarWidth;
  background-color: $subMenuBg;

  &:hover {
    background-color: $subMenuHover;
  }
}

@liudao008
Copy link

我取消!important后,所有颜色都变成$menuBg的颜色。是我的改变variables.scss的方法实现有问题吗。方便看下您的demo是怎么实现的吗

@PanJiaChen
Copy link
Owner

没能重现。有问题,请新开issue,详细描述问题。

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

No branches or pull requests

3 participants