Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Why .typography CSS-class everywhere?

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

Page: 1
Go to End
Author Topic: 1388 Views
  • donall
    Avatar
    Community Member
    7 Posts

    Why .typography CSS-class everywhere? Link to this post

    I can´t figure out why the class .typography is used everywhere in the typography.css of the blackcandy-template. Of what reason is it there? It seems curious there is an extra class over all.

    Can anybody enlighten me?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Why .typography CSS-class everywhere? Link to this post

    typography is applied as a class in cms around the content text area box and around the main content box on the front end for sharing styles. Eg if you did not have the .typography class in the CMS the following style would apply to the whole cms - p { font-size: 120% } but by wrapping a .typography class round the style it means that we can isolate the same div on the front end + backend without effecting the whole CMS interface

  • donall
    Avatar
    Community Member
    7 Posts

    Re: Why .typography CSS-class everywhere? Link to this post

    Good, that makes sense.

    Do you know if there are any explanations or comments on the CSS anywhere? I note that both the layout.css and typography.css will affect for example text-sizes.

    Thank you.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Why .typography CSS-class everywhere? Link to this post

    If there is any documentation at all it would be on http://doc.silverstripe.com/doku.php?id=css

  • donall
    Avatar
    Community Member
    7 Posts

    Re: Why .typography CSS-class everywhere? Link to this post

    Thanks Willr, that was a good css-resource even if there wasn´t much on what the typography.css and the layout.css should contain.

    I would prefer a more strict use of these so that all things that relate to typography should be in the corresponding css-file. To me there now seem to be a mismatch between them. But I will try to figure out how these css-files relate. Naturally typography and layout will affect each other, which somewhat makes this to a matter of taste.

    In a complex CMS-system it is nice to try to get closely related parts in its own bin.

    1388 Views
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.