Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #801833

    We just can’t figure out how to replace the layout.css and the shortcodes.css without breaking the layout.

    Scenario
    Specifically I need to get into control over the style sheets to customise the way all font-sizes and colours are handled.
    Currently I have setup a SCSS file that generates the “style.css” in the child theme. But it isn’t feasible anymore as always another element pops up which is not styled the way we need it and the code is growing stupidly large and confusing for that matter.

    Current Implementation
    Which seems to work fine for most of the CSS files, e.g.: base.css or grid.css.
    We copied the “avia_register_frontend_scripts” into our functions.php and then changed “template_url” to “child_theme_url” for all the CSS files. eg.:

    from:
    wp_enqueue_style( 'avia-base' , $template_url."/css/base.css", array(), '2', 'all' );
    to:
    wp_enqueue_style( 'avia-layout', $child_theme_url."/css/base.css", array(), '2', 'all' );

    This seems to work just fine for most CSS Files but as soon as we do it with the the “layout.css” or “shortcode.css” it does break! :(

    We also tried to add a custom function and first dequeued all styles (wp_dequeue_style) as suggested by some similar posts …
    https://kriesi.at/support/topic/editing-base-css-in-a-child-theme/
    https://kriesi.at/support/topic/best-way-to-handle-a-css-change-to-base-css/
    https://kriesi.at/support/topic/remove-native-css-framework/
    … which ultimately lead to the same problem

    So is the shortcode.css and layout.css referenced anywhere else?
    I could only find one reference in “template-builder.class.php” (themes/enfold/config-templatebuilder/avia-template-builder/php) … but a change to this did not do the trick yet. :/

    Hope you can help us with this!
    best,
    Manuel

    • This topic was modified 7 years, 6 months ago by Manuel. Reason: typo
    #801848

    Providing a link to the our website in development (the version which is broken duo loading the layout and shortcode.css from the child theme) + an image how it looked before.

    • This reply was modified 7 years, 6 months ago by Manuel. Reason: images with img tags
    #801859

    And we are on the latest Enfold Version 4.0.7

    #801941

    The served CSS files are different !?
    I got a small hint on what is going on… The CSS of those two files (maybe also others) gets manipulated somewhere in the process.
    While inspecting the website I noticed that the file size of those files is smaller and when I manually copy the original CSS back into it (in the browser) everything looks as before.

    Does anyone know why the served files differ from the ones in the theme? I’m not such a WordPress PHP crack and have no clue why and where this is happening.

    PS: it definitely starts with taking the CSS files from the child – For debugging I added “* {color: blue!important;}” to the end of the layout.css file, which does get executed.

    • This reply was modified 7 years, 6 months ago by Manuel.
    #802404

    Please, can anyone explain me what happens with those files? or why this is a bad idea, … anything?

    #802655

    Hi Manuel,

    Those are static files and unless there is a theme update, they don’t change. Is the snippet from here not working for you?

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.