Antd Theme is being overridden when used in Gatsby

Viewed 188

I am currently trying to customize Antd theme by using the antd and less plugins for Gatsby. Following this thread - Change the Theme of Antd when using GatsbyJS

gatsby-config.js plugins contain

    {
      resolve: 'gatsby-plugin-antd',
      options: {
        style: true
      }
    },
    {
      resolve: `gatsby-plugin-less`,
      options: {
        javascriptEnabled: true,
        modifyVars: {
          'primary-color': '#BADA55'
        }
      }
    }

gatsby-node.js and relevant modules are filled as seen in the thread.

When I look at an element in the browser debugger, the button uses the base theme, but the specified theme is actually there (just being overridden).

enter image description here

enter image description here

1 Answers

I had the same issue and for me it was that I had somewhere in my code imported the style for antd

import "antd/dist/antd.css"

Related