我正在從薩斯移動到手寫筆,我有很多mixin,我通過一個代碼塊,可在mixin內訪問@content
。如何將一個代碼塊傳遞到一個函數或混入在手寫筆
例如...
@mixin respond-min($width) {
// If we're outputting for a fixed media query set...
@if $fix-mqs {
// ...and if we should apply these rules...
@if $fix-mqs >= $width {
// ...output the content the user gave us.
@content;
}
}
@else {
// Otherwise, output it using a regular media query
@media all and (min-width: $width) {
@content;
}
}
}
@include respond-min($mq-group2) {
& {
border: 1px solid green;
}
}
我想上面的代碼轉換爲手寫筆,但只要被我如何傳遞一個代碼塊到手寫筆沒有出現在混入我的主要問題有這個功能。
是否有替代解決方案?
任何幫助表示讚賞。
你現在必須創建一個mixin,它作爲一個參數傳遞 – Ven