首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >离子- SCSS - '[scss] )预期的‘& '[scss] {预期的错误消息

离子- SCSS - '[scss] )预期的‘& '[scss] {预期的错误消息
EN

Stack Overflow用户
提问于 2016-09-01 12:05:19
回答 1查看 2.9K关注 0票数 1

我对Ionic相当陌生,我使用的是离子2β,使用角2。现在这适用于Sass。离子在您的应用程序app/theme/app.variables.css中生成它们的默认样式,其中定义了primarysecondary等颜色。它们给您的默认scss文件如下所示:

代码语言:javascript
复制
// 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)。

--顺便说一句,黑暗结束时附加的逗号不会改变任何东西,

现在的问题是,我有两个错误。1在结肠的primary: #387ef5,上。说[scss] ) expected.

在冒号上的secondary: #32db64,上有一个,表示[scss] { expected.

EN

回答 1

Stack Overflow用户

发布于 2016-09-01 12:30:52

只需这样做:

代码语言:javascript
复制
$colors: (
  'primary':    #387ef5,
  'secondary':  #32db64,
  'danger':     #f53d3d,
  'light':      #f4f4f4,
  'dark':       #222,
  'favorite':   #69BB7B
);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39271141

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档