PhpBB3 Stylesheets Question

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

PhpBB3 Stylesheets Question

Post by TIMDM »

The site I co-admin uses a lot of custom stylesheets. In an effort to clean up and organize the code I'm attempting to move some css back into the default stylesheets that come with phpbb. However I am a little confused as to the purpose of some of them and am looking for clarification.

According to the phpbb3 support docs:

Common.css - Common styling like header, index, footer etc.

Does this mean elements that appear on multiple pages but only once per page (like a nav menu)? Or does it mean elements that appear multiple times per page on either 1 or more pages?

Content.css - Content and inner pages styling, like viewforum_body.html, viewtopic_body.html etc.

Would this file be where you would put all of the css for custom pages that don't have their own stylesheet? Also, if some content meets the criteria of the first file (common.css) what determines whether or not you put it in content.css?
User avatar
eeji
Registered User
Posts: 1461
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: PhpBB3 Stylesheets Question

Post by eeji »

common.css is used for stuff that can be found on all or most pages (header, footer, wrapper, etc) and content.css is stuff used on things like topic view, posting etc etc.

It doesn't really matter where you put things as it all gets loaded anyway, but if you have defined your own classes its easier to update styles if you keep them in their own file.
My phpBB styles: phpbbstyles.iansvivarium.com
My "board": iansvivarium.com
(yes, it's running phpBB!)
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 1065
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: PhpBB3 Stylesheets Question

Post by Hanakin »

I would highly recommend against doing this! I highly recommend overwriting the defaults in a theme.css file. This will ensure that you are 100% future proof for x.x.X releases and should make updating to x.X releases extremely easier to work with and get support for.

The names of several of the files for prosilver are extremely arbitrary and not relevant anymore. Not to mention the fact that in the new theme for the X release we are going to completely abandon this style of css management for a component named convention, i.e navbar.css or topicRow.css, etc..
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

Re: PhpBB3 Stylesheets Question

Post by TIMDM »

eeji wrote: Tue Nov 06, 2018 7:29 pm common.css is used for stuff that can be found on all or most pages (header, footer, wrapper, etc) and content.css is stuff used on things like topic view, posting etc etc.

It doesn't really matter where you put things as it all gets loaded anyway, but if you have defined your own classes its easier to update styles if you keep them in their own file.
I want to keep things organized so it's quicker/easier to find the code I need. Unfortunately I am still a bit confused. In the example you gave and in the docs the example elements listed are only found on the page once (i.e header and footer). This doesn't tell me if elements that appear on multiple pages but also multiple times on the same page should be in common.css or content.css
Hanakin wrote: Wed Nov 07, 2018 1:06 am I would highly recommend against doing this! I highly recommend overwriting the defaults in a theme.css file. This will ensure that you are 100% future proof for x.x.X releases and should make updating to x.X releases extremely easier to work with and get support for.
Unfortunately our system has been customized to the point where upgrades are not possible so this is no longer an issue. If we want to upgrade we have to look at the source code and implement the changes we want to the core files manually. It's not ideal but the alternative is rebuilding the site from scratch which is not an option at this time.
Hanakin wrote: Wed Nov 07, 2018 1:06 amThe names of several of the files for prosilver are extremely arbitrary and not relevant anymore. Not to mention the fact that in the new theme for the X release we are going to completely abandon this style of css management for a component named convention, i.e navbar.css or topicRow.css, etc..
I've actually already started doing this except I use the naming scheme bootstrap uses. But I am glad the new releases will be doing this, I really dislike the current theme structure.

EDIT: Is there any documentation regarding this new theme structure you guys are working on? I'd be really interested in learning more about the design philosophies behind it and how it will be structured.
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: PhpBB3 Stylesheets Question

Post by warmweer »

No documentation as of yet (I think), but have a look at https://blog.phpbb.com/, and also http://area51.phpbb.com/phpBB/viewforum.php?f=131
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 1065
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: PhpBB3 Stylesheets Question

Post by Hanakin »

Not true there is some docs https://area51.phpbb.com/docs/dev/devel ... index.html

But not everything is worked out yet. We are still in the early stages of prototyping
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: PhpBB3 Stylesheets Question

Post by warmweer »

Hanakin wrote: Wed Nov 07, 2018 5:53 pm Not true there is some docs https://area51.phpbb.com/docs/dev/devel ... index.html

But not everything is worked out yet. We are still in the early stages of prototyping
Ow, I thought that was for 3.2 :oops:
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: PhpBB3 Stylesheets Question

Post by canonknipser »

You can change the doc's version - check the lower left corner ;)
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
TIMDM
Registered User
Posts: 12
Joined: Mon Nov 05, 2018 10:06 pm

Re: PhpBB3 Stylesheets Question

Post by TIMDM »

Hanakin wrote: Wed Nov 07, 2018 5:53 pm Not true there is some docs https://area51.phpbb.com/docs/dev/devel ... index.html

But not everything is worked out yet. We are still in the early stages of prototyping
This is fascinating to read and will help me get over some of the slumps I have when designing a new page or cleaning up old code.
Post Reply

Return to “[3.2.x] Styles Support & Discussion”