2014-11-20 10 views
5

esecuzione Bussola 0.12.7 (Alnilam) sto correndo in questo errore più volte ripetuto:"Impossibile determinare la posizione opposta di: a" errore nella bussola 0.12.7

Running "compass:dev" (compass) task 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
Cannot determine the opposite position of: to 
unchanged public/styles/sass/ie_only.scss 
unchanged public/img/icons-s6ab39d30ab.png 
overwrite public/styles/css/screen.css (2.484s) 

E 'qualcosa che non va le mie sfumature lo prendo, ma cosa sta andando male qui e come posso alleviare il problema?

risposta

2

Ho avuto lo stesso problema sul mio progetto utilizzando la bussola 0.12.7 e, in modo imprevisto, il problema può essere risolto solo aggiornando la bussola. L'avvertimento problema è causato quando si utilizza il linear-gradient mixin con un valore di posizione di to right come nel seguente esempio:

div { 
    @include background(linear-gradient(to right, red, blue)); 
} 

Questo sarebbe essere compilato a qualcosa di simile (gettando l'errore che nella tua domanda):

div { 
    background: -webkit-gradient(linear, to right, to left, color-stop(0%, #ff0000), color-stop(100%, #0000ff)); 
    background: -webkit-linear-gradient(to right, #ff0000, #0000ff); 
    background: -moz-linear-gradient(to right, #ff0000, #0000ff); 
    background: -o-linear-gradient(to right, #ff0000, #0000ff); 
    background: linear-gradient(to right, #ff0000, #0000ff); 
} 

Unfunzionalmente questo non è valido codice CSS. L'output corretto dovrebbe essere il seguente:

div { 
    background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ff0000), color-stop(100%, #0000ff)); 
    background: -moz-linear-gradient(left, #ff0000, #0000ff); 
    background: -webkit-linear-gradient(left, #ff0000, #0000ff); 
    background: linear-gradient(to right, #ff0000, #0000ff); 
} 

L'unico modo per risolverlo è l'aggiornamento della bussola, come ho detto prima.

0

Se non puoi/non vuoi aggiornare il tuo sass, puoi rimuovere quella proprietà "a".

predefinita sass gradiente verticale:

@include background(linear-gradient(red, blue)); 

Per ottenere orizzontale:

@include background(linear-gradient(90deg, red, blue)); 
Problemi correlati