Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Silly questions about css


Go to End


2 Posts   1539 Views

Avatar
brass02

Community Member, 8 Posts

13 April 2009 at 11:32pm

Edited: 13/04/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

Avatar
bummzack

Community Member, 904 Posts

14 April 2009 at 2:57am

Edited: 14/04/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 %).