Konstanten für CSS, Beispiel 1
Originales Style-Sheet auf dem Server:
<!--#set var="backgroundSideColor" value="#fff2e1" --> <!--#set var="borderSideColor" value="#ff9100" --> <!--#set var="borderWidth" value="0.5em 1px 1px 1px" --> #main { background-color: #e9e1ff; padding: 0; border: 1px solid #4300fe; border-width: <!--#echo var="borderWidth" -->; margin: 10px 247px 10px 247px; } #left { background-color: <!--#echo var="backgroundSideColor" -->; padding: 0; border: 1px solid <!--#echo var="borderSideColor" -->; border-width: <!--#echo var="borderWidth" -->; margin: 10px; width: 225px; position: absolute; top: 0; left: 0; } #right { background-color: <!--#echo var="backgroundSideColor" -->; padding: 0; border: 1px solid <!--#echo var="borderSideColor" -->; border-width: <!--#echo var="borderWidth" -->; margin: 10px; width: 245px; position: absolute; top: 0; right: 0; }
Style-Sheet dieses Teils:
#main { background-color: #e9e1ff; padding: 0; border: 1px solid #4300fe; border-width: 0.5em 1px 1px 1px; margin: 10px 267px 10px 267px; }
Das HTML des Dokumentes:
<!DOCTYPE html PUBLIC "..." "..."> <html ... > <head> <title>...</title> <link rel="stylesheet" media="screen" type="text/css" href="constants.scss" /> </head> <body> <div id="left"> ... </div> <div id="right"> ... </div> <div id="main"> ... </div> </body> </html>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.
Vel illum dolore eu feugiat nulla facilisis at vero et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.