Ich bin ziemlich neu zu Ionic und ich verwende die ionische 2 Beta mit eckigen 2. Jetzt funktioniert das mit Sass. Und ionic generiert ihr Standard-Styling in Ihrer Anwendung app/theme/app.variables.css
, wo die Farben primary
und secondary
usw. definiert sind. Die Standard-SCSS Datei sie Sie wie folgt aussieht:Ionic - SCSS - '[scss]) erwartet' && '[scss] {erwartete' Fehlermeldungen
// 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
);
Und, wie in ihrer docs vorgesehen, dies ist der richtige Code ist. (obwohl sie favorite
nicht einschließen).
btw das zusätzliche Komma am Ende des dunklen ändert nichts
Das Problem ist jetzt, dass ich zwei Fehler bekommen. 1 auf der primary: #387ef5,
im Doppelpunkt. Zu sagen, [scss]) expected.
und 1 auf den secondary: #32db64,
auf dem Doppelpunkt [scss] { expected.
es ist die vollständige Fehlermeldung – Ivaro18
es keine im Browser zeigt ist aber das ist die im Editor. auch ändern meine html mit 1 Direktive wie Gefahr und Ändern dieser Farbe Variable ändert nichts – Ivaro18
Und wenn ich primäre und sekundäre entfernen, wird es immer noch die gleiche Fehlermeldung, aber auf den nächsten 2 Zeilen – Ivaro18