Elliot
Elliot

Reputation: 1616

Is it possible to create utilities in Tailwind for specific screens?

Having followed the guidance on how to create print-specific modifiers, is it possible to use that to create or modify components for that screen?

For example, I have

    .card {
        @apply rounded shadow bg-white p-3;
    }

I'm thinking of something like the following, but this isn't it - what should I be doing?

    .card:print {
        @apply rounded border border-black bg-white p-3;
    }

Upvotes: 0

Views: 989

Answers (1)

Enrique Chavez
Enrique Chavez

Reputation: 1429

You should use media queries for this

@media print {
    .card {
        @apply rounded border border-black bg-white p-3;
    }
}

Upvotes: 2

Related Questions