Skip to content

Add ability to ignore specific screens #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 3, 2020
Merged

Add ability to ignore specific screens #2

merged 4 commits into from
Aug 3, 2020

Conversation

vntw
Copy link
Contributor

@vntw vntw commented Jul 27, 2020

Hi, thanks for the great plugin, it works great!

I have a use case where I add a custom screen like this:

module.exports = {
  theme: {
    extend: {
      screens: {
        dark: { raw: "(prefers-color-scheme: dark)" },
        reducedMotion: { raw: "(prefers-reduced-motion: reduce)" },
      },
    },
  },
}

In these cases the only thing I'll ever see with this plugin is either screen: reducedMotion or screen: dark, doesn't matter what actual screen size the current one is (sm, md, ...).

This PR adds a configuration option to exclude specific screens:

module.exports = {
  theme: {
    extend: {
      screens: {
        dark: { raw: "(prefers-color-scheme: dark)" },
        reducedMotion: { raw: "(prefers-reduced-motion: reduce)" },
      },
    },
    debugScreens: {
      ignore: ["dark", "motionless"],
    },
  },
}

Do you think this feature is a good fit here?

Thanks!

@jorenvanhee
Copy link
Owner

Hi, I really appreciate your contribution. I do think it is a good fit and I'll take a closer look at it very soon. Thanks for putting your time into this!

@jorenvanhee jorenvanhee merged commit 0cee330 into jorenvanhee:master Aug 3, 2020
@jorenvanhee
Copy link
Owner

Thanks again! Really like it 👍

@vntw vntw deleted the ignore-screens branch August 3, 2020 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants