Von Version < 15.10 >
bearbeitet von awa
am 19.03.2020, 15:04
Auf Version < 15.17 >
bearbeitet von awa
am 19.03.2020, 15:28
< >
Änderungskommentar: (Autosaved)

Zusammenfassung

Details

Seiteneigenschaften
Titel
... ... @@ -1,1 +1,1 @@
1 -Theme-Konfigurator-Plugin
1 +ThemeConfiguratorPlugin
Inhalt
... ... @@ -140,8 +140,66 @@
140 140  
141 141  Im {{smallcaps}}Scss{{/smallcaps}}-Tab im rechten Bereich kann eine entsprechende {{smallcaps}}Scss{{/smallcaps}}-Datei erstellt werden.
142 142  
143 -Es können dabei sogenannte [[{{smallcaps}}Scss{{/smallcaps}}-Variablen>>url:https://sass-lang.com/documentation/variables]] verwendet werden. Der Wert der Variablen wird dann pro Layout entsprechend durch den Nutzer festgelegt. {{smallcaps}}Scss{{/smallcaps}}-Variablen beginnen immer mit einem Dollarzeichen ($) und sollten nicht mit {{smallcaps}}Css{{/smallcaps}}-Variablen verwechselt werden.
143 +Es können dabei sogenannte [[{{smallcaps}}Scss{{/smallcaps}}-Variablen>>url:https://sass-lang.com/documentation/variables]] verwendet werden. Der Wert der Variablen wird dann pro Layout entsprechend durch den Nutzer festgelegt. {{smallcaps}}Scss{{/smallcaps}}-Variablen beginnen immer mit einem Dollarzeichen ($) und sollten nicht mit [[{{smallcaps}}Css{{/smallcaps}}-Variablen>>url:https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties]] verwechselt werden.
144 144  
145 +Um die [{{smallcaps}}Scss{{/smallcaps}}-Variablen für ein Layout mit Werten zu befüllen, werden die Variablen mit ihren Werten der [{{smallcaps}}Scss{{/smallcaps}}-Datei vorangestellt:
146 +
147 +{{code language="scss"}}
148 + // Generated automatically by the system
149 + $color: red;
150 + $fontSize: 16px;
151 + $fontFamily: "Liberation Sans";
152 +
153 + // Your SCSS rules and styles come here
154 + // ...
155 +{{/code}}
156 +
157 +Es empfiehlt sich, in der [{{smallcaps}}Scss{{/smallcaps}}-Datei für jede Variable einen Default-Wert zu deklarieren. Wenn dies am Anfang der Date geschieht, dann ist beim Lesen der [{{smallcaps}}Scss{{/smallcaps}}-Datei auch schnell erkennbar, welche Variablen es gibt. In dem Fall sollten die Variablen mit der //default//-Regel versehen werden, damit nicht die Werte aus dem Layout überschrieben werden:
158 +
159 +{{code language="scss"}}
160 + // Declare your variables at the beginning of the SCSS file
161 + // Not required, but good practice
162 + $color: red !default;
163 + $fontSize: 16px !default;
164 + $fontFamily: "Liberation Sans" !default;
165 +
166 + // Rules and styles come here
167 + body {
168 + color: $color;
169 + font-size: $fontSize;
170 + font-family: $fontFamily;
171 + }
172 +
173 + // ...
174 +{{/code}}
175 +
176 +Schließlich ist es auch möglich, andere {{smallcaps}}Scss{{/smallcaps}}-Dateien zu importieren:
177 +
178 +{{code language="scss"}}
179 +// You can import an SCSS file from the files of the current client
180 +@import "client/current/file.scss";
181 +
182 +// You can also import a file from another client
183 +// Select a client by its name, alias, ID, or UUID
184 +@import "client/name/demo/file.scss";
185 +@import "client/alias/demo/file.scss";
186 +@import "client/id/152/file.scss";
187 +@import "client/uuid/c33c63c7-8047-4727-bcda-8d07e2c36d4d/file.scss";
188 +
189 +// You can also import a CSS file
190 +@import "client/current/file.css";
191 +
192 +// You can also import another layout template
193 +// It is transpiled with the default variable settings before being imported
194 +@import "client/current/file.thed";
195 +
196 +// You can also import another layout
197 +// It is transpiled with the variable settings before being imported
198 +@import "client/current/file.thpc"
199 +
200 +
201 +{{/code}}
202 +
145 145  === Editorkonfiguration
146 146  
147 147  === Einstellungen zur CSS-Generierung
Copyright 2000-2025