Where does the compiled CSS for the Avada WordPress theme originate?

We recently made the switch from our old Wordpress e-commerce theme to Avada, and rebuilding everything in Fusion Builder was a breeze. Tweaking with custom CSS has been straightforward as well.

However, there is one issue that I just can't figure out.

There seems to be a WooCommerce element that is being styled somewhere:

.product .entry-summary div .price{}

No matter what I try, I can't seem to override it (even tried using !important), and I can't pinpoint where the original rule is coming from.

When inspecting it with browser tools, it appears that the rule is located in
"

.../wp-content/uploads/avada-styles/avada-1069.css
".
Opening that CSS file reveals an entire section at the top stating:
"
/********* Compiled - Do not edit *********/
"

There are numerous "Avada-###.css" files in that directory,
all containing similar compiled rules.

My question is, where is this being compiled from?
Where can I find the source file to make the necessary edits?

NOTE:

I've reached out to theme-fusion support (the authors of the Avada theme) twice now without receiving any response.
It's been weeks, and I'm running out of options.

Answer №1

The /avada-1069.css file serves as the main source.

/*** Compiled - Do not edit ***/ indicates that this file is an integral part of the theme's core. Modifying it may result in changes being replaced during Avast updates, potentially causing functionality issues.

If you require modifications beyond what the theme's Custom CSS field allows, consider creating a simple child theme. The provided functions.php and styles.css code templates are sufficient:

<?php
function my_theme_enqueue_styles() {

    $parent_style = 'parent-style';

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
        wp_get_theme()->get('Version')
    );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>

and

/*
 Theme Name:   Avast Child
 Theme URI:    http://example.com/avast-child/
 Description:  My First Child Theme :)
 Author:       John Doe
 Author URI:   http://example.com
 Template:     avast
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         whatever, blah
 Text Domain:  avast-child
*/

.product .entry-summary div .price{ ... }

Changes made in the child theme's CSS file will take precedence over those in the parent theme. This ensures that your customizations remain intact even after theme updates.

Prior to proceeding, it would be beneficial to review the Specifics on CSS Specificity, which outlines the hierarchy of precedence in CSS overrides. Consider sharing both your rule code and the original rule for others to evaluate before making changes.

Answer №2

It appears that the theme is generating stylesheets dynamically, making direct editing an impractical option due to frequent changes.

If uncertain about the content of the dynamic stylesheet being loaded, the recommended WordPress approach would be to first implement a child theme and then:

  1. Include overriding styles in your child theme's style.css, or
  2. Completely remove the parent theme's stylesheet from your child theme's functions.php file and replace it with your own styles in the child theme's style.css:

(Assuming that avada-dynamic-css is the handle registered by the theme)

function yourname_unhook_parent_style() {
  wp_dequeue_style('avada-dynamic-css');
  wp_deregister_style('avada-dynamic-css');
}
add_action('wp_enqueue_scripts', 'yourname_unhook_parent_style', 20);

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Struggling with getting basic CSS to work with React's MUI framework

I've been attempting to incorporate basic CSS with MUI components. According to their website, it should be feasible. https://material-ui.com/guides/interoperability/#plain-css But unfortunately, I'm having trouble getting it to function prope ...

What is the best way to position divs side by side?

I'm having trouble aligning these divs properly. I want them to look like this: However, they either overlap each other (with .title taking up the full width of the container) or stack on top of each other. Any suggestions? .wrapper{ display: ta ...

I noticed that the Div element automatically resizes whenever I click anywhere on the page using Chrome

Encountering a problem in Chrome V18 where my gray login box resizes automatically whenever I click anywhere on the page. Any insights on what might be causing this behavior? EDIT: I've observed the error message below: event.layerX and event.laye ...

Is there a way to trigger the opening of a new file or page when a CSS animation comes to an end?

Is there a way to delay the loading of a function or page until after an animation has finished running in JavaScript, HTML, and CSS only? For instance, I'd like to run an animation first and then have a different website or content load afterwards fo ...

Styling Images with Gradient using CSS

Looking to create a unique effect on an image by adding a radial gradient that seamlessly fades into the background color. Despite my efforts, I haven't been able to achieve this using filters and my current code is a bit messy. Here's what I ha ...

Tips on positioning a dropdown item to the far right of the page

I need help moving the language switcher and its items to the right side of the page. I tried using ml-auto but it didn't work for me. Whenever I try to adjust the position with padding-left, all the items end up in the center of the page. Any suggest ...

I am interested in altering the font color

Hey there, I'm new to HTML and CSS and need some help changing the font color and size of my navbar. I've included my code below: HTML code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <me ...

Seeking a jQuery Carousel with a Blizzard-inspired design

Can anyone recommend a jQuery carousel that has similar features to the one found on Blizzard's homepage? I'm looking for a carousel that is centered, does not show horizontal scroll bars even if the content extends beyond the browser width, supp ...

When a condition fails, the default style in the CSS media query does not apply

Whenever the user resizes the browser, my media query for max-width kicks in to make the design responsive. But I'm facing an issue where when the user returns back to the original browser size, the design is still a little messed up and doesn't ...

Struggling to figure out the right way to make a CSS selector for the Yahoo stocks page

In my quest to accurately retrieve the number located directly beneath the title with the symbol, I am transitioning from using xpath //div[@class='title']/following::span[2]/text() to experimenting with css selectors in Jsoup. Despite trying var ...

Implement a line below the text using CSS

Does anyone know how to create a line after each h2 tag when the width of the headline varies? I have been using the :after method with this code: h2:after { position: absolute; content: ""; height: 2px; background-colo ...

What are the best ways to expand image mapping?

It can be a bit challenging, but I'll do my best to explain. I have an image that is sized at 1920 by 1080 pixels and it adjusts based on the window size. The issue arises when the image mapping doesn't adjust accordingly. The coordinates remain ...

HTML structure consisting of a 3 by 3 grid

Creating a 3x3 grid with cells that have varying heights depending on content is proving to be challenging. Except for the cells marked with red arrows, the rest of the grid has fixed height in pixels. I attempted to build a 3x3 grid using divs to experi ...

Can CSS variables replace Bootstrap 4 Sass variables?

I'm attempting to customize the default Primary Sass variable in Bootstrap 4 with a custom color using CSS variables within an Angular application. Here is what I have tried: styles.scss :root { --primary: #00695c; } $myPrimary: var(--primary); ...

Switch the Ionic Slide Box to the "does-continue" setting

Currently in the process of constructing a slide-box containing numerous items. I've borrowed the code from the example provided here for an infinite number of items, and it's performing well. However, I have a considerable yet finite amount of ...

Issue with Internet Explorer: Unable to view Drop Down menu

I'm having trouble with the menu I created not working properly in Internet Explorer. Despite being new to HTML/CSS, I followed a tutorial that I found by searching "css drop down menu" and built the menu that currently works great in Firefox, Chrome, ...

The mobile menu is not responding to the click event

Upon clicking the mobile menu hamburger button, I am experiencing a lack of response. I expected the hamburger menu to transition and display the mobile menu, but it seems that neither action is being triggered. Even though I can confirm that my javascrip ...

Precise placement of images inside a div container

Could we can tweak the div structure below to center both the image and text horizontally within the container div? Currently, the image is aligned to the left while only the title is centered. Take a look at the code snippet provided: .QHe ...

Customize your Bootstrap navbar dropdown to showcase menu items in a horizontal layout

I have been developing a new project that requires a navbar to be positioned at the center of the page, at the top. The current HTML code I am using is as follows... <div class="navbar navbar-inverse navbar-fixed-top center"> <div class="con ...

Having trouble with your Bootstrap 4 layout when incorporating forms?

Currently, I am working with Bootstrap 4 on a form and facing an issue. Despite using the grid classes, the form does not display as expected. You can view the output here: I anticipated that the 12 columns would be divided into three sections of 4 column ...