Skip to content

CSS fallback values from Tailwind config extend are missing #852

Description

@claudiopedrom

Hello,

In my project (styled-components w/ Tailwind CSS), I'm using the svh unit.
As I still have to support some old browsers (Chrome 107), I'm extending the Tailwind config like this:

extend: {
  height: {
    screen: ["100vh", "100svh"],
  },
}

But I just noticed that the 100vh is never added to the final CSS. It always ends up in something like this:

.className {
  /* no 100vh value */
  height: 100svh;
}

It seems to work as expected in a "classic" Tailwind setup:

Another way to reproduce this is by adding a utility, for example:

const plugin = require('tailwindcss/plugin')

// (...)

plugins: [
  plugin(function ({ addBase, addComponents, addUtilities, theme }) {
    addUtilities({
      '.foo': {
        color: ['red', 'blue'],
      }
    })
  })
],

When tw="foo" is used, only the blue color is present.

I was not able to find any issue regarding this.
So, I'm not sure if it only happens to me or if there is something I need to change/update to make it work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions