Skip to content
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

Add print variant #5885

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Add print variant #5885

merged 1 commit into from
Oct 27, 2021

Conversation

reinink
Copy link
Member

@reinink reinink commented Oct 26, 2021

This PR adds a new print variant, which allows to add styles specifically targeted for print media. For example:

<nav class="print:hidden">
  <!-- Hide menu when printing -->
</nav>

<h1 class="text-blue-700 print:text-black">
  <!-- Make text black when printing -->
</h1>

This will generate the following CSS:

@media print {
  .print\:hidden {
    display: none;
  }
}

@media print {
  .print\:text-black {
    color: black;
  }
}

Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
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.

None yet

1 participant