Closed (fixed)
Project:
ZURB Foundation
Version:
8.x-6.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Feb 2017 at 14:49 UTC
Updated:
16 Jun 2023 at 16:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
serg2 commentedI have changed this from a support request to bug as it does happen and back in #2070285: Always disable base theme CSS and JS it was made clear that the base theme css should be disable when the sub-theme is being used.
Comment #3
pektinasen commentedThere is a setting in your theme settings under "Styles and Scripts" to disable it.
Alternatively you can add this to your info.yml
Comment #4
hongpong commentedAfter bower is removed ( #2895755: Remove Bower and use npm instead ) I think we should look at adjusting this and improving the documentation.
Comment #5
hongpong commentedComment #6
serg2 commentedSo the there are there base files which (by default) get pulled into the subtheme:
1) foundation.min.css
2) zurb_foundation.css
3) motion-ui.css
Ticking "Disable Base Theme CSS" in /admin/appearance/settings/sub-theme stops all three being loaded.
Both foundation.min.css and motion-ui (mui classes) are already part of the subtheme so produce duplicates.
Zurb_foundation.css is not present and contains " Contains all Drupal-specific SASS for this theme." We have a currently empty "_drupal.scss" in /STARTER/scss/base so it make sense to place this in here. Once that is done
Once that is added we can add STARTER.settings.yml in STARTER/config/install containing
This should fix this up and make it work as originally intended and be off by default.
@HongPong if you think this is the correctly way to handle without breaking existing them give me the nod and I will create a patch.
Comment #7
hongpong commentedI think yes the disable_base_css true, should be added to starter config install. Are you saying that all of zurb_foundation.css would be added to _drupal.scss ? Thank you for poking around in this, I know it needs help.
Comment #8
serg2 commentedre #7, yes.
Below is the zurb_foundation.scss which should be copied into _drupal.scss . As you can see almost all of it is fixes which need to be re-evaluated. We should copy across for now(to fix and close this issue) and then open issues to see if/how to remove and distribute in the future. Those who want to inherit CSS from the base theme will be unaffected.
Comment #9
serg2 commentedTodo:
I think this will be a sufficient fix for now.
Comment #10
serg2 commentedI opened and created a patch at #2912011: Duplicate 'all Drupal-specific SASS' in Starter SCSS which copies the zurb_foundation.scss into the Starter theme.
Once that is in we can disable the importing of the base (css and js) theme by default, which we can do here.
Comment #11
serg2 commentedThe Drupal specific CSS fixes are now in STARTER CSS as per #2912001: Undefined index content warning during serialize / normalize of link tag so we can go ahead and disable the importing by default. We need to check the JS import too.
Comment #12
sim_1Comment #14
sim_1Ok, I've added a MR that uses the install config to turn off those settings by default when installing a new subtheme.
Comment #15
shyam_bhatt@sim I have checked the "merge request !10" working fine. The files are updated in the "STARTER/config/install" path. Now once you create the subtheme the CSS and JS will not be built by default.
After applying the patch below files will be added and work fine.
Comment #16
sim_1Great, thanks for helping with this! Merged.
Comment #17
shyam_bhatt@sim_1 Can you please give credit for Reviewing/Testing the patch?
Comment #18
sim_1Shoot, I thought I did! This is what I had in the commit message, did this not work?
Let me know how I can do it correctly and I absolutely will change it if I can.
Comment #19
shyam_bhatt@sim_1 Please check https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett... link
Comment #21
sim_1