🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@csstools/media-query-list-parser

Package Overview
Dependencies
Maintainers
3
Versions
26
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.3
latest
Source
npm
Version published
Weekly downloads
5.1M
-6.88%
Maintainers
3
Weekly downloads
 
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

css

FAQs

Package last updated on 27 May 2025

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