2017-08-12 16 views
2

我剛剛更新到Bootstrap 4測試版,我的顏色被損壞。看起來像他們取代了顏色變量,例如$brand-primarytheme-color("primary")。其中那些在variables.scss定義的唯一的地方是這樣的:

$theme-colors: (
    primary: $blue, 
    secondary: $gray-600, 
    success: $green, 
    info: $cyan, 
    warning: $yellow, 
    danger: $red, 
    light: $gray-100, 
    dark: $gray-800 
) !default; 

於是,我就重寫這個有:

$theme-colors: (
    primary: #F5A637 
); 

在我variables.scss文件覆蓋。然而,編譯失敗後,有什麼想法?

+0

好像你現在不得不在* bootstrap中的'$ theme-colors'定義之前覆蓋*。查看[GitHub問題](https://github.com/twbs/bootstrap/issues/22891#issuecomment-316463806)和[相應的pull請求](https://github.com/twbs/bootstrap/pull/23260)從三天前。 – Marvin

回答

0

回答我自己的問題。在最新的Bootstrap v4中,您需要編輯$ primary變量。無需再使用顏色映射。您還可以使用此工具來自定義Bootstrap的SASS變量,預覽更改並下載您自己的bootstrap.css文件版本:http://bootstrap-4-live-customizer.com/