我對Ionic相當陌生,我正在使用離子2測試版使用角度2。離子在您的應用程序app/theme/app.variables.css
中生成其默認樣式,其中primary
和secondary
等顏色被定義。他們給你的默認SCSS文件看起來是這樣的:Ionic - SCSS - '[scss])預計'&&'[scss] {預計'錯誤消息
// http://ionicframework.com/docs/v2/theming/
// Ionic Shared Functions
// --------------------------------------------------
// Makes Ionic Sass functions available to your App
@import "globals.core";
// App Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files. Setting
// variables before Ionic's Sass will use these variables rather than
// Ionic's default Sass variable values. App Shared Sass imports belong
// in the app.core.scss file and not this file. Sass variables specific
// to the mode belong in either the app.ios.scss or app.md.scss files.
// App Shared Color Variables
// --------------------------------------------------
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
// Both iOS and MD colors can be further customized if colors
// are different per mode.
$colors: (
primary: #387ef5,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
favorite: #69BB7B
);
而且,在他們的文檔提供,這是正確的密碼。 (儘管它們不包括favorite
)。
順便說一句暗年底額外的逗號不會改變任何東西
現在的問題是,我得到2個錯誤。 1在primary: #387ef5,
在冒號。話說在secondary: #32db64,
冒號[scss]) expected.
它是完整的錯誤消息 – Ivaro18
有沒有在瀏覽器中顯示但這是編輯器中的一個。也改變我的HTML有1個指令像危險和改變這個顏色變量不會改變任何東西 – Ivaro18
當我刪除主要和次要它仍然會給出相同的錯誤信息,但在接下來的兩行 – Ivaro18