Can LESS help me out?

i have a site that uses Bootstrap 3 & there’s a carousel on it. in the carousel are DIV tags that have background images & some H4 titles & short bits of P text. but now the client wants quite a few more background images. basically, to kind of randomly pick a different background image + accompanying title/paragraph of text depending on what day it is, to shove in the carousel

i’ve made the extra images but putting them into the carousel is proving a little non-straightforward. the problem is that - in the site as it currently stands - i’ve hardcoded the filenames of the background images into a custom CSS file that Bootstrap uses to render the page

& you can’t use variables in CSS files!!! [or you can’t as far as i know]

now i am aware of LESS/SASS but don’t really understand it. can this be used to work out which image will be needed on a certain day & feed that into SOMETHING (don’t know what) that automatically generates a CSS file for the day in question???

anyways, help will be appreciated if it comes

plus, i’m thinking of just including a bunch of extra static CSS files which the site can choose from (again, depending on the day) in case LESS impacts the performance of the site too much

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.