Skip to content

MVP for a sub-theme is simply the .info file? / Clarifications on what's needed for inheritance #255

@FizCS3

Description

@FizCS3

I was reading this doc to help me create my first sub-theme:
https://docs.backdropcms.org/documentation/creating-sub-themes

I created the file [docroot]/themes/mybasis/mybasis.info with simply these lines:

type = theme
name = MyBasis
description = The default front-end theme for Backdrop CMS, which can make a great base theme.
backdrop = 1.x
base theme = basis
version = BACKDROP_VERSION

When I enable the MyBasis subtheme, it seems to work just fine. I didn't include any style sheets here, yet. That leads me to believe that the above is the minimum viable product for a sub-theme. Of course, further customization to come, but this at least works.

HOWEVER, at the beginning of the doc page's Add your own style section, it says emphatically:

All style sheets defined in the parent theme will be inherited, as long as you declare at least one stylesheet in your sub-theme's .info file. You must declare at least one stylesheet in your sub-theme for any of the parent theme's stylesheets to be inherited.

But, nothing looks out of whack in my sub-theme. Display is the same as the parent, and can change and save the colors via the UI fine...
When I instead use the Devel Subthemer module to help create the subtheme, its UI doesn't make such a big deal about needing stylesheets, and it just casually gives a suggestion of css/custom.css like it is a nice idea but not needed:
Image
Perhaps that section text is outdated?

Also...
At the end of the Override javascript if needed section, it says:

You will also need to create the script.js file; if you simply wish to disable the imported scripts, you can create an empty file.

It doesn't seem like I really need to create this script.js file?

And...
At the end of the doc, it mentions:
"Color.module support within the color directory is not inherited." and "Theme-settings.php are not inherited, unless you copy the settings declarations from the parent theme's .info file." ... but I didn't copy over either one and they seem to have been inherited?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions