Twitter bootstrap .tab-focus()推特引导在元素上工作,有多可能?
在Twitter引导的2.3.2版中,您可以在mixins.less中找到:Twitter bootstrap .tab-focus()推特引导在元素上工作,有多可能?,twitter-bootstrap,less,Twitter Bootstrap,Less,在Twitter引导的2.3.2版中,您可以在mixins.less中找到: // Webkit-style focus // ------------------ .tab-focus() { // Default outline: thin dotted #333; // Webkit outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } 您还可以发现这个mixin正在forms.less
// Webkit-style focus
// ------------------
.tab-focus() {
// Default
outline: thin dotted #333;
// Webkit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
您还可以发现这个mixin正在forms.less和buttons.less中使用
但是,它没有在脚手架中使用。在我发现正常链接的地方:
// Links
// -------------------------
a {
color: @linkColor;
text-decoration: none;
}
a:hover,
a:focus {
color: @linkColorHover;
text-decoration: underline;
}
但是,我发现,更改.tab-focus()
的值也会影响正常a元素(链接)的:focus
。这怎么可能??tbv中.tab-focus()
的CSS如何。2.3.2适用于我的链接?我找不到它
PS:我确实看到他们在最新版本的TB中应用了它,见下文,但问题是它在v中如何可能。2.3.2在未应用的情况下,is会影响:焦点
// Links
a {
color: @link-color;
text-decoration: none;
&:hover,
&:focus {
color: @link-hover-color;
text-decoration: underline;
}
&:focus {
.tab-focus();
}
}
如果您正在导入reset.less
,您会发现它就在那里
从引导复位
// Focus states
a:focus {
.tab-focus();
}
谢谢,由于某些原因,此文件未在我的文本编辑器中打开:-S。