How to change the style of button

Re: How to change the style of button

by Richard Oelmann -
Number of replies: 0
Picture of Core developers Picture of Plugin developers Picture of Testers

Not really - I think any css only changes are better done in the customcss. So rather than new v existing or standard BS v customised, I would say its more a case of if its css only it goes in customcss, if its genuinely additional html and that requires some styling along with it, then include that styling with the additional html.

If you apply css within the additional html, I don't think it is cached and it also may then override desired css in another theme which styles things differently to your main theme, leaving unintended changes if the theme is changed. I also think that if css is applied through the additional html it cannot then be overridden by the customcss as even the additionalheadhtml is applied at the bottom of the <HEAD> and so after all the theme/customcss.

Personally, I would only add css to the additional html where it goes along directly with the html that is being added there and so doesn't relate to anything in the theme without the additional html - or that the html would fail or look odd without the css if it was added to a theme customcss and then a different theme was used (the additional html would still be applied then, but without the css which would have been in the theme customcss).

ie

CSS only - put it in the customcss

Additional HTML that will look 'wrong' without its css - put the css with the html in the additional html.

Average of ratings: Useful (1)