Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-custom-media

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-custom-media

PostCSS plugin to transform W3C CSS Custom Media Queries to more compatible CSS

  • 5.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9M
increased by0.23%
Maintainers
1
Weekly downloads
 
Created

What is postcss-custom-media?

The postcss-custom-media package allows you to define custom media queries in CSS, which can then be reused throughout your stylesheets. This helps in maintaining a consistent and DRY (Don't Repeat Yourself) approach to media queries.

What are postcss-custom-media's main functionalities?

Define Custom Media Queries

This feature allows you to define custom media queries using the @custom-media rule. In this example, a custom media query named --small-viewport is defined for viewports with a maximum width of 30em.

@custom-media --small-viewport (max-width: 30em);

Use Custom Media Queries

Once a custom media query is defined, it can be used in your CSS just like any other media query. In this example, the custom media query --small-viewport is used to change the text color to red for small viewports.

body { color: black; }
@media (--small-viewport) { body { color: red; } }

Other packages similar to postcss-custom-media

Keywords

FAQs

Package last updated on 03 Feb 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc