dotless 또는 mixins에서 변수를 호출하면 결과 CSS 파일이 비어 있습니다. 다음과 같이변수 또는 믹스 인 (함수)에서 점없는 점이 실패합니다. variable @ background-dark가 정의되지 않았습니다.
내 설정은 다음과 같습니다
- 내가
- 첫 번째 가져 오기가 변수
- 두 번째 가져 오기가 유지 mixin (방법)입니다에게 내 다른 점이없는 기반으로 CSS 파일을 모두 가져 오기 파일이
- 내가 그래서 파일
00.1.import.less
가 followi있을 것이다
을 필요로 다른 파일에 의해 이어 NG 콘텐츠 : 나는 새 탭에 결과 링크를 복사 할 때
@import "00.2.variables";
@import "00.3.methods";
@import "00.4.init";
@import "01.1.html";
는 보여줍니다
variable @background-dark is undefined on line 24 in file '/Content/00.1.import.less':
[23]: @import "11.1.p";
[24]: @import "13.1.a";
---------------^
[25]: @import "13.2.a-login";
이상한 것은 그 라인 그냥, 수입 줄 것입니다. 이 파일은 어떤 변수 나 믹스 인을 전혀 사용하지 않습니다. 다음 파일도 않습니다. 현재 변수/믹스 하나의 단일 파일을 테스트하고 있습니다. 나는 F5를 칠 경우
내가 얻을 다음 예외입니다 :
Value does not fall within the expected range.
Stack Trace:
[ArgumentException: Value does not fall within the expected range.]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Web.Hosting.IIS7WorkerRequest.SetKnownResponseHeader(Int32 index, String value, Boolean replace) +150
System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace) +219
System.Web.HttpHeaderCollection.Add(String name, String value) +23
System.Web.HttpResponse.AppendHeader(String name, String value) +189
System.Web.HttpResponseWrapper.AppendHeader(String name, String value) +16
dotless.Core.Response.CssResponse.HandleCompression() +646
dotless.Core.Response.CssResponse.WriteCss(String css) +79
dotless.Core.Loggers.AspResponseLogger.Log(String message) +50
dotless.Core.Loggers.Logger.Log(LogLevel level, String message) +80
dotless.Core.Loggers.Logger.Error(String message) +43
dotless.Core.LessEngine.TransformToCss(String source, String fileName) +562
dotless.Core.ParameterDecorator.TransformToCss(String source, String fileName) +420
dotless.Core.HandlerImpl.Execute() +152
dotless.Core.LessCssHttpHandler.ProcessRequest(HttpContext context) +123
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
예 변수 문제 : 선언
@background-dark: #404040;
사용
div#top
{
height:125px;
border-top: 2px solid #158fa6;
background:@background-dark;
}
이에 상관없이 내가 뭘 실패하지 .
어디서 잘못 알 수 있습니까?
안녕 루크, 문제 1 : 문제가되지 않습니다. 내가 뭔가 잘못하고 있다고 가정했는데, 버그가 아니라, Stack에 관한 질문을하는 것이 적절하다고 생각했습니다. 문제 2 : 1.3.0.3에서 1.3.0.5로 업데이트하여 변수 문제를 해결했습니다. 그러나 믹스 인 문제는 여전히 존재합니다. 그러나 믹스 인을 클래스에 단독으로 추가하면 작동합니다. mixin과 추가 스타일을 추가하자마자 실패합니다. – Jacques
나는 지금 무엇이 실패하고 어떻게 진행되고 있는지에 대한 자세한 내용을 필요로 할 것입니다. –
믹스 인이 실패하고 있습니다. 그래서 .radius (@tst) {}라고 불리는 믹스가 있다면 다음과 같이 사용하십시오. { .radius (10); } 작동하지만 다음을 수행하는 경우 : .use { color : red; radix (10); } 실패합니다. 다른 속성을 CSS 클래스에 추가하자 마자 실패합니다. – Jacques