This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

Media Query Tracker Mechanism

12th February 2025 at 3:44pm

New in v5.4.0 The media query tracker mechanism allows you to define custom CSS media queries to be bound to a specified info tiddler. The info tiddler will be dynamically update to reflect the current state of the media query.

Adding or modifying a tiddler tagged $:/tags/MediaQueryTracker takes effect immediately.

The media queries are always applied against the main window. This is relevant for viewport related media queries such as min-width which will always respect the main window and ignore the sizes of any external windows.

The core includes a media query tracker that is used for tracking the operating system dark/light setting. See $:/core/wiki/config/MediaQueryTrackers/DarkLightPreferred for details.