User:Andrewds1021/CategoryCSS

Description
This solution was created in response to Thread:1507300 and debugged in response to Thread:1559477.

The purpose of this script is to apply a specific stylesheet based on the category membership of the current page. The script uses MediaWiki's api.php to check if the page belongs to one of the specified categories. If so, it imports the specified associated stylesheet.