4

私は奇妙な状況を発見しました。:after 疑似セレクターにバグがあるようです

次のコードを確認し、インライン コメントを参照してください。

.nav-prev a{
    left:20px;
    &:before {
        top: 75%;
        .chevron-line;
        .rotate ();
    }
    // this mixin is causing an error and it wouldn't compile
    &:after {
        top: 25%;
        .chevron-line;
        .rotate (-45deg);
    }​
}

// // this is the fix applied for the previous error
// .nav-prev a:after {
//  top: 25%;
//  .chevron-line;
//  .rotate (-45deg);
// }​

.nav-next a{
    right:20px;
    &:before{
        top: 25%;
        .chevron-line;
        .rotate ();
    }
    // strangely this one works and compile correctly
    &:after{
        top: 75%;
        .chevron-line;
        .rotate (-45deg);
    }
}

注 : コンパイルには LiveReload を使用します。

質問

構文の何が問題になっていますか? それともLESSバグですか?それともコンパイラのバグですか?

君たちありがとう。

4

1 に答える 1

3

問題のあるコードをコピーしてこのコンパイラに貼り付けると、エラーの原因となった非表示の文字が表示されます。この文字は上記の作業コードに存在しない.nav-next aため、原因である可能性があります。

.nav-prev a{
    left:20px;
    &:before {
        top: 75%;
        .chevron-line;
        .rotate ();
    }
    // this mixin is causing an error and it wouldn't compile
    &:after {
        top: 25%;
        .chevron-line;
        .rotate (-45deg);
    }​<--HIDDEN "DOT" CHARACTER SHOWING UP RIGHT HERE
}
于 2013-02-28T20:37:47.720 に答える