visual-framework / vf-wp

WordPress theme and plugins for Visual Framework integration
3 stars 6 forks source link

"EBI VF 1.3 Global Header" no longer needs VF 1.x CSS #403

Open khawkins98 opened 4 years ago

khawkins98 commented 4 years ago

Enabling the "EBI VF 1.3 Global Header" container also loads the https://dev.ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/css/ebi-global.css

This CSS is no longer required for the global header to work, it should be moved to an optional include. Either as a separate optional plugin or component option to enable "EBI VF 1.3 CSS".

This would also have the added benefit of avoiding conflicts between the VF 1.x and VF 2.0 CSS.

dbushell commented 4 years ago

Hey Ken,

It seems like the footer plugin loads the EBI assets (EBI VF 1.3 Global Footer):

is it safe to remove all three of these includes?

I could add them behind an optional include – will that actually be used anywhere?

dbushell commented 4 years ago

After testing it seems the EBI Header does not need ebi-global.css but it does need script.js and fonts.css. The EBI Footer container still needs all three. Presumably the Header/Footer are always used in combo?

For now I'll try and avoid it loading if the plugins are enabled but not actually used on the page.

khawkins98 commented 4 years ago

Just a quick link on how this can work without the the 1.x CSS, which would reduce a lot the 1.x vs. 2.0 clashes.

https://codepen.io/khawkins98/pen/JjXwoKL

If it's not that clear, I can pickup on this next week.


VF component: https://visual-framework.github.io/vf-core/components/ebi-header-footer/

dbushell commented 4 years ago

I'll catch up with you on this next week. I've updated the plugin for now to only load the assets where the header/footer is actually used.