Tailwindcss: Does not creating opacity classes for dark mode

Created on 11 Oct 2020  路  1Comment  路  Source: tailwindlabs/tailwindcss

Describe the problem:

tailwindcss[v1.8.12] does not creating opacity classes for dark mode

Link to a minimal reproduction:

tailwind.config.js

'use strict';

module.exports = {
  dark: 'class',
  experimental: 'all',
  future: {
    purgeLayersByDefault: true,
    removeDeprecatedGapUtilities: true,
  },
  purge: [
    './public/**/*.html',
    './src/**/*.js',
  ],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
};

one example., (dark:border-opacity-25, dark:hover:opacity-75) classes are not creating...

Most helpful comment

You'll need to enable the dark variant for those utilities, they aren't enabled by default.

Here's a playground that shows how to enable them:

https://play.tailwindcss.com/D8c47pT0ZL?file=config

>All comments

You'll need to enable the dark variant for those utilities, they aren't enabled by default.

Here's a playground that shows how to enable them:

https://play.tailwindcss.com/D8c47pT0ZL?file=config

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benface picture benface  路  3Comments

Quineone picture Quineone  路  3Comments

afuno picture afuno  路  3Comments

ghost picture ghost  路  3Comments

dbpolito picture dbpolito  路  3Comments