我正在使用布爾瑪軌道寶石,我想自定義它使用的一些變量,特別是字體顏色。如何在軌道中定製布爾瑪變量
按照布爾瑪文檔http://bulma.io/documentation/overview/customize/我應該做這樣的事情:
// 1. Import the initial variables
@import "../sass/utilities/initial-variables"
// 2. Set your own initial variables
// Update blue
$blue: #72d0eb
// Add pink and its invert
$pink: #ffb3b3
$pink-invert: #fff
// Add a serif family
$family-serif: "Merriweather", "Georgia", serif
// 3. Set the derived variables
// Use the new pink as the primary color
$primary: $pink
$primary-invert: $pink-invert
// Use the existing orange as the danger color
$danger: $orange
// Use the new serif family
$family-primary: $family-serif
// 4. Import the rest of Bulma
@import "../bulma"
但是我不知道如何使我使用的鐵軌寶石這項工作。
目前我application.css文件看起來像這樣:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/
@import "bulma";
工作正常。但是,如果我改變它像在布爾瑪文檔改變@import "../bulma"
到@import "bulma"
和@import "../sass/utilities/initial-variables"
到@import "sass/utilities/initial-variables"
,當我在這裏想這個問題就不再工作連例子是變量,首先進口,但我不能弄清楚如何導入它。這裏是寶石中的文件:https://github.com/joshuajansen/bulma-rails/blob/master/app/assets/stylesheets/sass/utilities/variables.sass
謝謝!
您能找到方法嗎?我有同樣的問題。 –
還沒有。我想我會嘗試在本地添加完整的bulma代碼並以此方式導入。會及時向大家發佈 – looneym