Closed Jimmi08 closed 1 year ago
@CaMer0n
Is it mandatory to use word "bootstrap" in style name to exclude core bootstrap or this is bug?
This is really important.
Thank you.
This is working solution to not load core bootstrap css on frontend, but still have BOOSTRAP defined. No exclude in stylesheet is needed.
<libraries>
<library name="bootstrap"
version="5"
scope="wysiwyg"
files="css" />
<library name="bootstrap"
version="5"
scope="front"
files="js" />
<library name="fontawesome"
version="5"
scope="front"
files="js" />
<library name="fontawesome"
version="5"
scope="wysiwyg"
files="css" />
</libraries>
example for stylesheet:
<stylesheets>
<css file="main.css"
name="Main css compiled with bootstrap"
default='true'
scope='front'
/>
<css file="assets/css/lineicons.min.css"
name="Default"
scope='wysiwyg' />
</stylesheets>
Bug Description
This settings:
is loading CDN bootstrap library
<link rel="stylesheet" media="all" property="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" />
How to Reproduce
Core bootstrap5 theme is working because using word bootstrap in stylesheets.
This works too:
This is not working:
This works:
By the way, with one style in xml, style.css is always set as themecss pref, so this doesn't work either:
Expected Behavior
Not loading bootstrap css from core
PHP
PHP 8.1
Thanks
Workaround: