PHPBB3-12719

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

PHPBB3-12719

Post by sajaki » Sun Sep 18, 2016 12:08 pm

hello,
i'm looking at css changes in 3.2 and found a new file 'base.css'.
what is this file for ?
It was added following PHPBB3-12719 which mentions "SUIT CSS".

User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 788
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: PHPBB3-12719

Post by hanakin » Sun Sep 18, 2016 5:25 pm

This file is a layer that sits under normalize which more appropriately and selectively sets some base styles for better control and consistency

https://area51.phpbb.com/phpBB/viewtopi ... 81&t=45545

https://github.com/suitcss/base/blob/ma ... b/base.css

sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

Re: PHPBB3-12719

Post by sajaki » Sun Sep 18, 2016 7:25 pm

so, "base.css" is a CSS Reset, i.e. a set of CSS rules that resets the styling of all HTML elements to a consistent baseline ? but you say "selectively" ?

Do daughter styles need to implement base.css again ? or is this not recommended ?

User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 788
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: PHPBB3-12719

Post by hanakin » Sun Sep 18, 2016 11:12 pm

yes and no....

Normalize.css is the reset which is selective read the following for more info on normalize
http://nicolasgallagher.com/about-normalize-css/

but while normalize focuses on tailor adjustments there are some small things that are convenient that do not fit into the scope of normalize so a second layer is added afterwards.

to quote Nicolas Gallagher on it

"Its a thin layer on top of normalize.css that provides a starting point more suitable for web applications."

by daughter do you mean child?

Not sure I know what you mean by implement again?


How CSS works in a nutshell....

You can think of all the css as layers

This will be more clear and make more sense in future themes hopefully but thats another story...

Basically all your files should be broken up into three primary layers Core, Theme, Utilities like so
  • CORE LAYER (Every Theme should use these files and never need to change them)
    • normalize.css
    • base.css
  • THEME LAYER (Really the only thing that should ever need to be altered)
    • common.css
    • links.css
    • content.css
    • buttons.css
    • cp.css
    • forms.css
    • icons.css
    • colours.css
    • responsive.css
  • UTILITIES LAYER (Should not really need to alter these but might in rare occasions but try not to)
    • utilities.css
    • tweaks.css
hopefully this helps

sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

Re: PHPBB3-12719

Post by sajaki » Mon Sep 19, 2016 7:07 am

epic answer, thank you very much. :)

Post Reply