Frage

in Aptanastudio 3 . the CSS formatter formats like this :

H1 {
 color: white;
 background: teal;
 FONT-FAMILY: arial, helvetica, lucida-sans, sans-serif;
 FONT-SIZE: 18pt;
 FONT-STYLE: normal;
 FONT-VARIANT: normal
}

I´m trying to edit it to write the code like this (all in one line) :

H1 { color: white; background: teal; FONT-FAMILY: arial, helvetica, lucida-sans, sans-serif; FONT-SIZE: 18pt; FONT-STYLE: normal; FONT-VARIANT: normal}

under the CSS formatter options, i can edit the spaces between commas, semikolon, e.t.c. .. but i cant find how to edit the code to look the way i want it.

War es hilfreich?

Lösung

When you type H1 {} instead of hitting enter when it auto completes the curly braces just start typing your rules out. Also don't rely on (or use) the auto formatter. With rare exceptions (Aptana not being one of them, I love Aptana for web applications and use it every day) auto formatters for code will not do exactly what you want them to.

I strongly advise against writing your css the way you desire. The first way is much easier to read. Also most hosting solutions and even a lot of frameworks (like Rails for example) will minify your code for you. And even if your's doesn't you can minify it yourself pretty easily.

When developing: 'readability = maintainability' which is always of greater value then a few saved bytes here and there.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top