Announcement

Collapse
No announcement yet.

Best practice for custom CSS - Custom CSS editor or style.css?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best practice for custom CSS - Custom CSS editor or style.css?

    As mentioned in my introduction post, I am a newbee trying to migrate a wordpress site from an existing theme to Dynamik. I have already already custom CCS classes defined for additional, non-wordpress, non-theme related page elements (for instance speech bubbles).

    I do not yet fully grasp the concept of the Custom CSS editor. It seems that I can only ADD CSS code and not view or modify existing code. How does this work behind the scenes? Does everytime I make change actually add additional CSS or is this maintained in a database? The style.css of Dynamik is empty. So changes are not added there.

    And do I do with the extra CSS classes I mentioned above? I am used to add these in the style.css of a child theme of the parent wordpress theme. Should I still do that or is it considered best practice to add them via the Custom CSS editor. If the latter, how can I maintain them?

    As a matter of fact, I have the same question for functions.php. I have currently some code in there. Do I copy that to the functions.php of Dynamik or am I supposed to add it via Dynamik Custom functions?

    Thanks for the patience to answer these newbee questions.....

    Joost

  • #2
    Dynamik is based on Genesis, it´s a childtheme. Genesis is a "framework" which means it works a bit different than other basic WP themes, same goes for Dynamik.

    Important: With Genesis and Dynamik, you´ll never want to edit core files. Your edits there would be gone with the next update and could likely break things.
    Changes you do in Dynamik dashboard (CSS, JS, PHP) will be stored in the uploads folder and kept separate from the Dynamik core files in the theme folder, which makes them update-safe.
    So: Always add your edits using Dynamik dashboard (Dynamik Custom functions, CSS builder and/or skin files) and you´ll stay safe. You will also maintain your changes there unless you decide to create a custom childtheme in the end (in this case, you´d edit it´s files manually after that or use Extender, another product of CobaltApps).

    The files that Dynamik generates will pull - for example - CSS from the core files (Genesis/Dynamik) and add your CSS to it automatically. Which means you don´t have to open any core file to edit and add code at the bottom like you used to. Dynamik will manage that for you.
    Last edited by SiGa; 01-06-2017, 12:10 PM.

    Comment


    • #3
      Thanks Siga,

      By now I'm getting a bit more familiar with Dynamik and have browsed further in the directory structure. Some further clarifying question.

      1) I understand with 'core files' you mean anything in the wp-content/themes/dynamik-gen directory, correct? Is it safe to use an editor of choice to edit the files in the wp-content/uploads/dynamik-gen directory?

      2) I notice that Dynamik offers (at least) two options to add CSS. One in the dynamik custom module. Edits seem to be stored in dynamik-custom.css. The other options is to use the CSS button on the skin thumbnail under the 'skins' option in the dynamik design module. Edits there seem to be stored in the style.css of the respective skin. What is considered to be practice? Where do I add what? Especially in view of future export of the theme from the current development site to the live site. Of course I understand that anything skin-specific should go directly with the skin itself. But are there other considerations?

      BTW, currently I'm still focusing on CSS only but I assume that the considerations are the same for PHP and JS

      Thanks in advance!

      Joost

      Comment


      • #4
        1) No, this won´t work for that file but you´ll find a way to include your own CSS files in the Docs and as far as I know, this is possible with the skin CSS file (you might want to search forum threads as I remember this has been discussed before).

        2) Difference:
        - What you put into the tabs in Dynamik Custom will take effect globally, for any skin. It will NOT get exported with a skin (but you can export separately via Dynamik Settings).
        - What you put into skin files will be true for only this skin. It will also get exported with that skin. That way you can create totally different designs (or colors) you can easily swap with a click.
        Last edited by SiGa; 01-13-2017, 12:24 PM.

        Comment

        Working...
        X