2014-11-20 5 views
5

나침반 0.12.7 (알 니람) 나는 여러 번 반복이 오류로 실행 해요 실행에 :는 "반대 위치를 확인할 수 없습니다 :에"오류 나침반 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) 

그것은 뭔가 잘못이다 내 그라디언트를 가져 가는데 여기에 어떤 문제가 있으며 어떻게 문제를 완화 할 수 있습니까?

답변

2

내 프로젝트에서 나침반 0.12.7을 사용하여 동일한 문제가 발생했지만 unforuately 문제는 나침반을 업데이트해야 해결할 수 있습니다.

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

이는 (귀하의 질문에 오류를 던지는)이 같은 컴파일 될 것이다 :

다음 예에서와 같이 to right의 위치 값으로 linear-gradient 믹스 인을 사용하는 경우이 문제 경고가 발생합니다
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); 
} 

Unforunately 이것은 잘못된 CSS 코드입니다. 올바른 출력은 다음과 같아야합니다.

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

수정하는 유일한 방법은 이전에 말했던 것처럼 나침반을 업데이트하는 것입니다.

0

새시를 업데이트하고 싶지 않거나 업데이트하지 않으려면 해당 "to"속성을 제거 할 수 있습니다.

기본 말대꾸 기울기가 수직 :

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

수평 얻으려면 :

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