- Issue created by @tstermitz
Thanks for the work/idea Tom, I'm not sure if this is a general enough use case that needs to go into the base theme, this might rather confuse people if we add it there, it could be useful to have a workflow of how it should be done in this issue queue or a blog post
- πΊπΈUnited States tstermitz Colorado
The better title for this suggestion is that webpack.mix.js easily compiles multiple CSS files. Then the theme.library.xml file declares which one to be used. Or else an Appearance Page admin button could choose, so that the CSS template choice is in the DB, while the code base remains in git.
The Bootstrap file structure and philosophy encourages you to make a few finite changes to a variable override file. If you set up your files logically you can "re-skin" a website via some very minor changes to three or four color variables.
I have two immediate use cases.
(1) I have three websites with different colors and logos, but the code base is identical but for the theming. I'm happy with everything else: structure, page-sizes, layout, views, menus. I could maintain three completely different themes, but my life will be infinitely easier if I mange updates on one local, and do a git pull to each remote site. I become a "yeoman wordpress developer" and sell ten or fifteen websites in 15 different brand colors, that I could maintain with minimal effort.
(2) Another typical use case would be to have a landing page or site sub-section, let's say members vs anonymous. In my case I was looking for a way to brand a subsection of my website for a separate business purpose.
This led me to several modules in the domain ecosystem, but as I mentioned, they are not ready for Drupal 10. Maybe Domain Library Attach almost does what I suggested, providing an admin interface that selects Primary, Secondary or Tertiary CSS library.
(I'm not that guy, as I'm a mere "front-end" developer, and only mess occasionally with twig templates.)
- π²πΎMalaysia ckng
Agreed this is an "extension" to what the theme currently support. Only worth as a documentation.
As for wildcard support in Laravel Mix, this is still not supported.
See https://github.com/laravel-mix/laravel-mix/issues/3300, https://github.com/laravel-mix/laravel-mix/issues/982.A workaround is proposed https://github.com/laravel-mix/laravel-mix/issues/982#issuecomment-45485..., reproduced here
var fs = require('fs'); var path = require('path'); var files = fs.readdirSync('./resources/sass/pages'); for (var i=0; i<files.length; i++) { if(path.extname(files[i]) == '.scss') { mix.sass('resources/sass/pages/' + files[i], 'public/css/pages'); } }
- Status changed to Closed: won't fix
over 1 year ago 10:39am 20 April 2023 Closing this ticket as "Won't fix" but would be nice if you can document a workaround here or a blog post / etc...
but thanks