I have a static css file in my django app static directory. I have multiple views running of the same css file, since otherwise there would be A LOT of copy and pasting, but I need just a few things to be different depending on the page I'm currently on.
Is it possible to use the django conditional statements like {% if request.path == ... so on inside the static css file?
Or if not what would be a sensible alternative that would achieve the same result? Because the class header.masthead is used about 10 times in the CSS file and if I had to write a new, let's say, header.mastheadcookiepage and assign the same functionality, and do this for multiple new pages, that would be really annoying.
Maybe it's possible to somehow pass in a variable from my views into the css file as a string, and put that variable into the background image url, so that I could pull a different background image from the server depending on the current view?
Perhaps this is a stupid question and I'm approaching this problem the wrong way, but I'm quite new to web developement, so any help is appreciated!