media-query
Media Queries are a way to target browsers by certain characteristics, features, and user preferences, then apply styles, or run other code based on those things. They are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse. Media queries are used for the following:
@media and@import at-rules<style>,<link>,<source>, and other HTML elements with themedia= attributeWindow.matchMedia() andEventTarget.addEventListener() methodsA media query is composed of an optional media type and any number of media feature expressions, which may optionally be combined in various ways using logical operators.
<ul> <li><strong>all:</strong> Suitable for all devices.</li> <li><strong>print:</strong> Intended for paged material and documents viewed on a screen in print preview mode.</li> <li><strong>screen:</strong> Intended primarily for screens.</li></ul><ul> <li><strong>Viewport/Page Characteristics</strong></li> <li><strong>Display Quality</strong></li> <li><strong>Color</strong></li> <li><strong>Interaction</strong></li> <li><strong>Video-prefixed:</strong> The spec references user agents, including TVs, that render video and graphics in two separate planes that each have their own characteristics. <em>(upcoming Media Queries Level 5)</em></li></ul>Here are 166 public repositories matching this topic...
Language:All
Sort:Most stars
CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
- Updated
Sep 28, 2023 - JavaScript
Powerful media queries for Styled Components or Emotion.
- Updated
Nov 5, 2025 - JavaScript
Slice media queries with ease
- Updated
Jan 6, 2023 - SCSS
A PostCSS plugin and Javascript runtime combination, which allows you to write container queries in your CSS the same way you would write media queries.
- Updated
Dec 3, 2022 - JavaScript
React made responsible - media queries backed by state machinery
- Updated
May 12, 2024 - TypeScript
💅 Helps manage media queries with styled components
- Updated
Mar 4, 2023 - JavaScript
Detect system color scheme changes on the web (Dark Mode)
- Updated
May 11, 2020 - JavaScript
Determine actual CSS media query breakpoints via JavaScript
- Updated
Apr 15, 2023 - JavaScript
Enable `media` attribute on Vue SFC styles
- Updated
Jan 7, 2023 - TypeScript
A ✨light✨ and magical Svelte component for CSS media queries🐹
- Updated
Oct 13, 2023 - TypeScript
🎠 A super media-query for styled-components. Intuitive and easy of use.
- Updated
Dec 9, 2022 - JavaScript
Easy and predictable SASS/SCSS media queries
- Updated
Jul 22, 2025 - SCSS
A fine API to manage media queries in JS with ease. It has first-class integration with VueJS.
- Updated
Jan 7, 2023 - TypeScript
Universal media queries for React Native and web
- Updated
Jul 26, 2017 - JavaScript
react use-media-query-hook
- Updated
Jan 3, 2023 - JavaScript
A handy CSS media query methods of JS
- Updated
Dec 15, 2023 - TypeScript
Humans is designed for mobile and desktop for human users. And it is vue-based implementation. To help developer to build UI quickly.
- Updated
Oct 5, 2018 - Vue
Media queries engine written in pure JS!
- Updated
Nov 9, 2021 - JavaScript
Created by Håkon Wium Lie, W3C
Released June 19, 2012
- Followers
- 8 followers
- Website
- github.com/topics/media-queries
- Wikipedia
- Wikipedia