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.

Customising the CMS /

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

Why .typography CSS-class everywhere?


Go to End


5 Posts   2087 Views

Avatar
donall

Community Member, 7 Posts

11 September 2009 at 9:12pm

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?

Avatar
Willr

Forum Moderator, 5523 Posts

11 September 2009 at 10:25pm

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

Avatar
donall

Community Member, 7 Posts

14 September 2009 at 6:42am

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.

Avatar
Willr

Forum Moderator, 5523 Posts

14 September 2009 at 8:51am

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

Avatar
donall

Community Member, 7 Posts

14 September 2009 at 8:16pm

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.