Jump to:

23576 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » Silly questions about css

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

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

Page: 1
Go to End
Author Topic: 903 Views
  • brass02
    Community Member
    8 Posts

    Silly questions about css Link to this post

    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

  • banal
    Community Member
    901 Posts

    Re: Silly questions about css Link to this post

    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 %).

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.