Open jeffmcneill opened 5 years ago
Currently we have no easy way to copy a theme.
The easiest way that I can think of, is to use the skin:create command and then copy the contents of one theme file to the other.
Tho be aware that they have tiny changes it there themes, so some modification might be required.
I wonder if it's possible to create a "global" StackOverflow theme that would work for all websites, since they are all built on the same engine, and possibly same CSS classes. If so, this could be solved with an elaborate RegExp in the config that covers all domain, which we could create from this JSON: https://api.stackexchange.com/docs/sites#pagesize=500&filter=!SmNnfVWqow2tl*1k1P&run=true
Another way would be to create a all-stackoverflow.scss
and include it on the seperate overflow-sites, kinda like how to google sites are set up.
That would also allow for changes on a single site, if need be.
That's a good idea.
Unfortunately, that will require compiling SCSS to a thousand CSS files if we want to support all sites: 174 StackOverflow websites x 7 color themes = 1218 CSS files e.g. stackoverflow-math-iceberg.css, stackoverflow-scifi-material.css, superuser-coffee.css This will make compilation slow, and will result in a heavy project with thousands of CSS files.
I can make Darkness inject the domain the site to the HTML/BODY as a class, e.g.
drk_domain_superuser_com / drk_domain_math_stackexchange_com / drk_domain_cooking_stackexchange_com
That way, we can get away with only one "site" in the config, and the SCSS will be comprised of the generic styling for all StackOverflow websites, and the specific overrides for specific websites:
html.drk_domain_math_stackexchange_com { /* overrides here /* }
StackExchange is supported, but not other StackExchange sites (e.g., ServerFault, SuperUser, etc.) It seems that the StackExchange skin should work on all the others. Is there a simple duplication of files here to help support the others?