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

@csstools/media-query-list-parser

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/media-query-list-parser

Parse CSS media query lists.

  • 4.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created

What is @csstools/media-query-list-parser?

@csstools/media-query-list-parser is a utility for parsing CSS media query lists. It allows developers to analyze and manipulate media queries in a structured way, making it easier to work with responsive design rules programmatically.

What are @csstools/media-query-list-parser's main functionalities?

Parsing Media Query Lists

This feature allows you to parse a string of media queries into a structured format. The `parse` function takes a media query list string and returns an object representation of the media queries.

const { parse } = require('@csstools/media-query-list-parser');

const mediaQueryList = 'screen and (min-width: 600px), print';
const parsed = parse(mediaQueryList);
console.log(parsed);

Handling Complex Media Queries

This feature demonstrates the ability to handle more complex media queries with multiple conditions. The parser can break down and structure these complex queries for easier manipulation and analysis.

const { parse } = require('@csstools/media-query-list-parser');

const complexMediaQueryList = 'screen and (min-width: 600px) and (max-width: 1200px), print and (color)';
const parsed = parse(complexMediaQueryList);
console.log(parsed);

Other packages similar to @csstools/media-query-list-parser

Keywords

FAQs

Package last updated on 01 Nov 2024

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