How best to set custom CSS?

I've read the documentation and done a search, but haven't discovered how best to specify custom CSS that tweaks a theme (Ardoise in my case) without editing the theme's own CSS file (screen.css for Ardoise).

For Gallery3, which I was using until recently, it was possible to point to a custom CSS file that was loaded so as to take precedence. This mean that when an updated version of a theme was installed, it wasn't necessary to rehack the theme's own CSS files. I note that Ardoise includes a custom.css file, but it's not clear what it does, because styling that I included in there seemed not to have any effect. So at present I've had to resort to modifying screen.css.

Comments

  • acrylian Administrator, Developer

    There is currently no simple way to do this unless you want to create a plugin. It is planned to change in the future and provide a standard way to do this.

    So you need to modify the theme used.

  • Thanks. Noted.

  • vincent3569 Member, Translator

    there is a custom.css file.
    I have designed it to customize link's color.
    as it is called after other css file, you can add your own css rules in it.

    then you have to choose custom color in admin/theme to apply your custom rules (not only for links color).

  • OK, that makes sense now. I tried to use custom.css but it had no effect, but I forgot about the admin function. Thanks.

    However it doesn't solve the problem in my OP. Which is that I don't want my custom code accidentally overwritten when I install a new theme version, since the new version will presumably have a copy of custom.css. A custom css file is best done as part of the application, IMHO.

  • acrylian Administrator, Developer

    If the custom css doesn't work, make sure that no cache plays tricks on your (browser, or if in use the static_html_cache).

    You can also create a plugin to provide a custom css.

    A custom css file is best done as part of the application, IMHO.

    As said above that is planned for the future. But as always, we can't do everything for you. And even with a custom css you might need to update things after an update. And if you need more changes than just those possible via CSS, you need to do even more work.

  • Just to clarify the current situation, in relation to the Ardoise theme, for its custom.css to work, there is an option in the Ardoise theme options to be enabled. This is what I missed.

    In relation to future developments, I'm not pushing. I'm grateful for whatever eventuates. I hope to make a few small contributions of my own, once I try to relearn github. Was not a great success last time. I think I pushed when I was supposed to be pulling and visa versa.

    A plugin for custom css has merits. I'll consider this as my knowledge base improves.

  • acrylian Administrator, Developer
    edited October 2017

    Sure, I didn't feel pushed or something. I just wanted to explain that there is a lot that would be great to have. Just that we can't do everything. Behind the scenes we also work on a major release which changes a few things so the 1.4.x releases will not get new features anymore. Otherwise we never get ready with it being a side project and way behind what we planned…

    That's why we like to encourage third party plugins for solutions.

    Yeah, GitHub takes some time to get used to. Of course you don't need to use GitHub to provide third party plugins.

  • In what other ways are plugins provided? I think I'll need to learn Github to make contributions to extensions that are already hosted up there.

  • acrylian Administrator, Developer

    I am only talking about third party plugins. If you create a third party tool it is absolutely up to you if you use a code hoster like GitHub (There are of course more than it) or none at all.

  • Let me rephrase the question. What are the common ways that third party plugins are provided other than via Github?

  • acrylian Administrator, Developer

    GitHub is useful because a lot people do have accounts and thereforecan easier contribute or report bugs etc.

    But there is no guide. You can also just put it on your website for download.

    If you made something you can announce it here and we will put it on our site's extensions section linking to where you provide it.

Sign In or Register to comment.