ExtJs-在Mixins CSS中覆盖CSS

时间:2019-03-05 04:00:58

标签: css extjs

如何为此替换CSS?基本上,我想在对焦后删除分离器的边框。我可以在自己主题的all.scss中轻松设置 border:none!important 。但这似乎并不优雅,我想知道如何适当地覆盖它,以便在构建的CSS中,以下CSS样式的边框部分将被覆盖。

 /*
 D:/Projects/gui/ext/classic/theme-base/sass/etc/mixins/css-outline.scss:40
 */ 
.x-splitter-focus:after {
     position: absolute;
     content: ' ';
     top: 0px;
     right: 0px;
     bottom: 0px;
     left: 0px;
     border: 2px solid #fff;
     pointer-events: none; }

1 个答案:

答案 0 :(得分:0)

您可以创建如下更具体的CSS规则:

<div class="withoutBorder x-splitter-focus">/div>

.x-splitter-focus:after {
     position: absolute;
     content: ' ';
     top: 0px;
     right: 0px;
     bottom: 0px;
     left: 0px;
     border: 2px solid #fff;
     pointer-events: none; 
}

.withoutBorder.x-splitter-focus:after {
     position: absolute;
     content: ' ';
     top: 0px;
     right: 0px;
     bottom: 0px;
     left: 0px;
     border: none;
     pointer-events: none; 
}

在此示例中,div没有边框,导致第二个规则css更具体,因此,所有具有x-splitter-focuswithoutBorder类的元素都没有边框