0

I've made a module with a custom page. On this page I have a list of around 20 checkboxes, each followed by a single word for identification. I would like to display this with CSS in multiple columns.

All resources I could find says that to edit CSS, I should: - Create a new theme - Use that theme to override the CSS I need

However, this seems a bit excessive just to style a single element. The effect should look like:

<ul style="column-width:20em;">

Which does everything I need. Now, I've learned that inline CSS is not done, and I understand perfectly why. However, creating a new theme sounds a bit like using a howitzer to kill a bug.

Should I:
Just inline the CSS ?
Put some CSS files into my non-theme module, referring just to the ID of the element ?
Create an entire new theme to style this single element of my module ?

Or is there another solution for a case like that that I could not find ?

  • you don't have to create a new theme for this, you can add single css for your module, check this answer – Piyush Feb 13 '18 at 8:52
  • Jacco even speed suggestion sites like gtmetrix and Google insight allows small css to be inline rather than creating a new css file for small css codes. – Sunil Verma Feb 13 '18 at 9:35
  • So far, feel mostly like leaving it inline. It's not a site I expect will see any mobile use (a company's private area, accessible only by representatives of other companies who are logged in), so there's no need to adept the css for that situation. And I don't expect there to be any other place where I'd need the CSS, so duplication isn't an issue either. – Gloweye Feb 13 '18 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.