21489 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 775 Views |
-
Silly questions about css

13 April 2009 at 11:32pm Last edited: 13 April 2009 11:33pm
I noticed when view source of my website that the following appears:
<link rel="stylesheet" type="text/css" href="tutorial/css/layout.css" >
<link rel="stylesheet" type="text/css" href="tutorial/css/typography.css" >
<link rel="stylesheet" type="text/css" href="tutorial/css/form.css" ><link rel="stylesheet" type="text/css" href="http://localhost/lodge/themes/tutorial/css/layout.css?m=1239558216" >
<link rel="stylesheet" type="text/css" href="http://localhost/lodge/themes/tutorial/css/typography.css?m=1239552039" >
<link rel="stylesheet" type="text/css" href="http://localhost/lodge/themes/tutorial/css/form.css?m=1233475780" >
<link rel="stylesheet" type="text/css" href="http://localhost/lodge/sapphire/css/SilverStripeNavigator.css?m=1233195036" >I wanted to know if anyone knows whats up with the ".css?m=". Is that cached and if it is, is there a way to cache my javascript too?
Secondly when going through the template tutorials, in the default css there is the following css:
body {
width: 100%;
height: 100%;
font-size: 62.5%;
/* reset font-sizes to 1em == 10px */
}What is up with the "font-size: 62.55". Can I remove it and change my typography.css sizes because at the moment its messing up my menu and throwing the alignment off by 2px
-
Re: Silly questions about css

14 April 2009 at 2:57am Last edited: 14 April 2009 3:02am
Hello brass02
The .css?m=xxx files are being minified by SilverStripe (at least I think so). The same applies for javascript files if you add them using the Requirements::javascript('filename') method or if you use the <% require javascript('filename') %> control.
The font size of 62.5% applies to the default browser font size. This results in type that's about 11px in height. I consider that as bad styling though, since one might change his browser default font size and therefore get really tiny fonts...
I'd recommend using a fixed size for a top level element (like body) and then use relative font sizes for all other elements (using em or %).
| 775 Views | ||
|
Page:
1
|
Go to Top |


