2014-11-20 11 views
5

Running Kompas 0.12.7 (Alnilam) używam do tego błędu kilkakrotnie powtarzane:„Nie można określić przeciwnego stanowiska: do” błędu w Compass 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) 

Jest coś złego moje gradienty biorę to, ale co tu idzie nie tak i jak mogę złagodzić problem?

Odpowiedz

2

Miałem ten sam problem w moim projekcie przy użyciu kompasu 0.12.7 i bez problemu problem można rozwiązać tylko poprzez aktualizację kompasu. Ostrzeżenie problem jest spowodowany przy korzystaniu z linear-gradient wstawek o wartości pozycji z to right jak w poniższym przykładzie:

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

To byłby skompilowany do czegoś takiego (rzucanie błąd w pytaniu):

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); 
} 

Niestety, jest to nieprawidłowy kod CSS. Prawidłowy wynik powinien być następujący:

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); 
} 

Jedynym sposobem, aby to naprawić, jest aktualizacja kompasu, jak już wcześniej wspomniałem.

0

Jeśli nie możesz/nie chcesz aktualizować swojego sass, możesz usunąć tę właściwość "do".

Domyślnie Sass gradient pionowy:

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

Aby uzyskać poziomy:

@include background(linear-gradient(90deg, red, blue)); 
Powiązane problemy