tôi có những điều sau mixinSass mixin với nếu khác
@mixin arrows($arrowdirection:"left", $arrowsize:"5px", $arrowcolor:$navbgblue) {
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
@if $arrowdirection == "right" {
border-top: $arrowsize + px;
border-bottom: $arrowsize + px;
border-left: $arrowsize + px $arrowcolor;
} @else if $arrowdirection == "left" {
border-top: $arrowsize + px;
border-bottom: $arrowsize + px;
border-right:$arrowsize + px $arrowcolor;
} @else if $arrowdirection == "up" {
border-bottom: $arrowsize + px $arrowcolor;
border-left: $arrowsize + px;
border-right: $arrowsize + px;
} @else if $arrowdirection == "down" {
border-left: $arrowsize + px;
border-right: $arrowsize + px;
border-top: $arrowsize + px $arrowcolor;
}
}
mà đối với một số (không rõ ràng nghi ngờ) lý do từ chối làm việc nếu tôi sử dụng một trong hai mặc định hoặc vượt qua một cái gì đó trong
.test{
@include arrows("left", "5px", "blue");
}
tôi chỉ nhận được CSS
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
vì vậy nếu/khác của tôi bằng cách nào đó không khởi động. tại sao xin vui lòng?
đừng quên chọn câu trả lời, hãy ghi nhớ câu hỏi gốc đã được trả lời. – cimmanon