Closed andybroomfield closed 1 year ago
I think this is an important point as I have just run into this myself with localgov_theme_croydon.
As an example, I have made some amends to the directory facet display within the base localgov_theme. These changes are not seen in localgov_theme_croydon because it is now a separate entity.
Looking in the source I see only one stylesheet being imported which is <link rel="stylesheet" media="all" href="/themes/contrib/localgov_croydon-master/assets/css/lib/main.css" />
.
I actually expected the 'base' theme to be ever-present - with the child theme containing only overrides and bespoke changes and additions.
In the code i would expect to see:
<link rel="stylesheet" media="all" href="/themes/contrib/localgov_theme/assets/css/lib/main.css" />
<link rel="stylesheet" media="all" href="/themes/contrib/localgov_croydon-master/assets/css/lib/main.css" />
A drawback to this is that if something is changed within localgov_theme then it changes on every council child theme and opens them up to potential issues.
@cjstevens78 Its possible to keep the localgov_styles, just remove the following from the child theme.info
# Switch off Localgov theme styles.
libraries-override:
localgov_theme/global:
css:
theme:
assets/css/font-face.css: false
assets/css/lib/main.css: false
However since the assets folder is copied to the theme, the new styles may (in fact almost certianlly will unless they are unique) override any change in the parent anyway.
How do we picture other councils picking up localgov_theme and making their own? Would they just want to change some colours and fonts? In which case it makes less sense that they recomplile the whole SASS, let Localgov_theme handle that. However we will need a way for the custom colours and fonts that generates a stylesheet that overrides all the places custom colours and fonts are used, as well as any custom styles they want to add. But this would mean that they wouldn't copy the entire assets folder for the sass, they would just have sass files to add in the overridden styles.
I think we should look at how Bootstrap Barrio theme handles this, as thats the mainstream Drupal bootstrap theme that allows customisations. I think that includes a starterkit theme and also a theme tha includes colour module support so these things can be changed in the UI.
Closing as deprecated and this has been resolved in localgov_base
When generating a child theme (see #76) the current recommendation is to copy the entire
assets
folder. This means that the full set of styles will now be provided by the child theme, ignoring any updates and fixes to styles in localgov_theme unless the authors of the child theme incorporate the new styles by re-coping the updated assets folder.Is that the correct / desired approach? If so we need to document how themers will update their library.