Search code examples
csswordpressmaterialize

Change Materialize primary color on WordPress


I included the Materialize library in WordPress.

function materialize_styles() {
wp_enqueue_script( 'materialize-js','https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/js/materialize.min.js', array(), '1.0', false);
wp_enqueue_style( 'materialize','https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css', array(), '1.0', false );
}

I am getting the default pinkish color to all my elements as a result. Is there a way to change the default color scheme without having to download the SASS files.

I am looking for a CSS way if possible.

Thank you all.


Solution

  • I'm working with materialize too, you need to create a CSS, SCSS or SASS file which overwrites original style of Materialize...

    In *.css you need to write for exemple:

    .dropdown-content li>a {
         color: #EE6E73 !important;
    

    rembember !important at the end, it's necessary to replace original style