
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
tailwindcss-device
Advanced tools
TailwindCSS plugin to add variants for input device detection using `@media` queries
TailwindCSS plugin to add variants for input device detection using @media
queries
pnpm
pnpm add -D tailwindcss-device
npm
npm i -D tailwindcss-device
yarn
yarn add -D tailwindcss-device
The plugin comes in two versions: One is CSS and meant for tailwind
There're two options for v4:
tailwind.css
file using the @import
directive, like this:@import "tailwindcss";
@import "tailwindcss-device"; /* <- This will import CSS version of the plugin */
@plugin
directive:@import "tailwindcss";
@plugin "tailwindcss-device"; /* <- This will use legacy JavaScript version */
tailwind.config.js
plugins section:import device from "tailwindcss-device"
export default {
plugins: [
device,
// ...
// or with custom prefix:
deivce({prefix: "device"})
]
}
<div class="border border-black rounded-md device-touch:rounded-lg">
<div class="hidden device-touch:block">
Hello, I'm visible on smartphones and tables!
</div>
<div class="hidden device-desktop:block">
Hello, I'm visible on computer with mouse!
</div>
<div>
.hidden {
display: none;
}
@media (pointer: coarse) {
.device-touch\:block {
display: block;
}
}
@media (pointer: fine) or (pointer: none) {
.device-desktop\:block {
display: block;
}
}
Name | Target |
---|---|
touch | Devices with touchscreen as primary input method (e.g smartphones and tablets) |
desktop | Computers with a mouse |
desktop-touch | Computers with touch input device |
desktop-any | Computers with or without touch input device |
any-pointer
media feature documentation on MDNpointer
media feature documentation on MDN1.0.0
7e703d6
Thanks @octet-stream! - Add CSS version of the plugin for Tailwindcss v4FAQs
TailwindCSS plugin to add variants for input device detection using `@media` queries
The npm package tailwindcss-device receives a total of 5 weekly downloads. As such, tailwindcss-device popularity was classified as not popular.
We found that tailwindcss-device demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.