Skip to content

define a PWA specific screen modifier like md: except pwa: #10194

Answered by wongjn
ax0n-pr1me asked this question in Help
Discussion options

You must be logged in to vote

You'd look at a plugin to add pwa as a variant, something like:

const plugin = require('tailwindcss/plugin')

module.exports = {
  // …
  plugins: [
    plugin(function({ addVariant }) {
      addVariant('pwa', '@media all and (display-mode: browser)');
    }),
  ],
};

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@ax0n-pr1me
Comment options

@falko100
Comment options

@wongjn
Comment options

wongjn Apr 2, 2023
Collaborator

Answer selected by ax0n-pr1me
Comment options

You must be logged in to vote
2 replies
@wongjn
Comment options

wongjn May 21, 2025
Collaborator

@timarnoldev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants