1
我正在使用名爲typi的sass mixin庫(https://github.com/zellwk/typi),現在我該如何利用!sass map函數中的重要關鍵字,這裏是我嘗試的一個示例實現使用!重要關鍵字在Sass地圖
$i:!important;
$heading:(
null:(80px,80px $i),
large:(60px,60px $i),
small:(40px,40px $i)
);
我試圖用!內鍵值重要的關鍵字,如 空:(80px $ I,80px $ I)
每當我使用關鍵字,我得到這個錯誤編譯
「error sass/style.scss(第30行sass/typ i/scss/ty/_functions.scss:$ number:「80px!important」對於`無單位'不是數字)「
如果你使用正確的特殊性,你不應該需要一個!重要 – Keith
我同意,但也有情況,當你使用!重要太:) – devt204
你不能通' !重要的'功能。因爲它只需要一個數字,而不是一個CSS屬性值。 – 3rdthemagical