heimrichhannot / contao-mediaquery
Contao library that sets an cookie via javascript to check browser viewport dimension in php.
Package info
github.com/heimrichhannot/contao-mediaquery
Type:contao-module
pkg:composer/heimrichhannot/contao-mediaquery
1.1.0
2020-01-16 16:06 UTC
Requires
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ^3.5.1 || ~4.1
This package is auto-updated.
Last update: 2026-02-17 05:14:32 UTC
README
Contao library that sets an cookie via javascript containing browser dimension to check browser viewport dimension in php.
Currently supported
- width/max-width/max-device-width check
- height/max-height/max-device-height check
For detailed usage check 'HeimrichHannot\MediaQuery\ViewportTest.php'.
Usage
\HeimrichHannot\MediaQuery\Viewport::matchQuery('(min-width: 800px and max-width: 1300px)');
Will return true if current browser dimension is between 800px and 1300px, otherwise false.