Html 引导4:我可以为禁用引导的类更改字体颜色吗?

Html 引导4:我可以为禁用引导的类更改字体颜色吗?,html,css,ruby-on-rails,bootstrap-4,disabled-input,Html,Css,Ruby On Rails,Bootstrap 4,Disabled Input,我正在运行4.4.1版的引导程序gem。我的Rails应用程序中有一个引导4导航栏。这是我的一些导航条形码 <ul class="navbar-nav ml-auto"> <!-- Hidden li included to remove active class from about link when scrolled up past about section --> <li class="hidden"> <a href="#

我正在运行4.4.1版的引导程序gem。我的Rails应用程序中有一个引导4导航栏。这是我的一些导航条形码

  <ul class="navbar-nav ml-auto">
    <!-- Hidden li included to remove active class from about link when scrolled up past about section -->
    <li class="hidden"> <a href="#top"></a> </li>
    ..........
    <li class="nav-item nav-link"><%= link_to "#{t :link_story}", story_path %></li>
    <li class="nav-item nav-link disabled"><%= link_to "#{t :link_blog}", blog_path %></li>
    <li class="nav-item nav-link disabled"><%= link_to "https://www.facebook.com/xxxxxxxx/", target: "_blank" do %><i class="fab fa-facebook-f"></i><% end %></li>
    <li class="nav-item nav-link disabled"><%= link_to "https://twitter.com/lightbecorp", target: "_blank" do %><i class="fab fa-twitter"></i><% end %></li>
  </ul>
我也尝试过以下方法,但都不奏效

.navbar-custom .disabled { color: $grayDisabled; font-weight: bold; }

.navbar-custom a { color: $linkColor; .disabled { color: $grayDisabled; font-weight: bold; } font-weight: bold; }

.navbar-custom .navbar-nav li a.disabled { color: $grayDisabled; }

.navbar-custom a.disabled { color: $grayDisabled; font-weight: bold; }
我找到的所有信息都与bootstrap3有关,在bootstrap3中,您必须编写
指针事件:无。.disabled类使用
指针事件:无

我想使用class.nav item和.nav link来保持这些项目与工作链接的样式相同,除了字体颜色

.navbar-custom { padding: 0; border-bottom: 0; letter-spacing: 1px; background: $navBackColor; text-transform: uppercase; }
.navbar-custom .navbar-brand { text-transform: capitalize;  }
.navbar-custom .navbar-brand:focus { outline: 0; }
.navbar-custom .navbar-toggler { color: #eee; font-size: 129%; border-radius: 2px; padding: 0 4px; }
.navbar-custom .navbar-toggler:hover, .navbar-custom .navbar-toggler:focus { background-color: #e75926; color: #ffffff; }
.navbar-custom .navbar-brand .navbar-toggler:focus, .navbar-custom .navbar-brand .navbar-toggler:active { outline: 0; }
.navbar-custom a { color: $linkColor; font-weight: bold; }
.navbar-custom i.fas { color: $red; font-weight: bold; }
.navbar-custom .navbar-nav li a { -webkit-transition: background .3s ease-in-out; -ms-transition: background .3s ease-in-out; -moz-transition: background .3s ease-in-out;  transition: background .3s ease-in-out; }
.navbar-custom .navbar-nav li a:hover { outline: 0; color: $linkColorHover; background-color: transparent; }
.navbar-custom .navbar-nav li a:focus, .navbar-custom .nav li a:active { outline: 0; background-color: transparent; color: $linkColorHover; }
.navbar-custom .navbar-nav li.active { outline: 0; }
.navbar-custom .navbar-nav li.active a { background-color: rgba(255,255,255,.3); }
.navbar-custom .navbar-nav li.active a:hover { color: $linkColorHover; }
.navbar-custom .navbar-nav li .disabled { color: $grayDisabled; }
我在文档中没有看到任何说明我不能更改类的字体颜色的内容


怎么做?

只需将最后一行更改为

.navbar custom.navbar nav li.disabled a{color:$grayDisabled;}