Remove non-existing min-device-pixel-ratio CSS syntax

Summary:
`min-device-pixel-ratio`/`device-pixel-ratio` do not exist.

For the records,
* Standard `min-resolution` has been supported since Firefox 16 released 08/2012, Opera 12.1 released 11/2012, Chromium 29 released 07/2013, and Edge 12 released 07/2015
* Safari 15.8 released 07/2022 still requires `-webkit-min-device-pixel-ratio`
* Non-standard `min--moz-device-pixel-ratio` syntax was supported from Firefox 4 to Firefox 15 according to https://developer.mozilla.org/en-US/docs/Web/CSS/@media/-moz-device-pixel-ratio

Test Plan:
* Run `/bin/celerity sprites`, check that icons on http://phorge.localhost/auth/config/new/ still render.
* Read CSS docs; probably install ancient browser versions if you don't trust documentation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25972
This commit is contained in:
Andre Klapper 2025-04-25 11:52:48 +02:00
parent de2b536382
commit b578854017
10 changed files with 11 additions and 14 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array(
'conpherence.pkg.css' => '79a197f6',
'conpherence.pkg.js' => '020aebcf',
'core.pkg.css' => '22e722fb',
'core.pkg.css' => '64703355',
'core.pkg.js' => '086da722',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => '91ac6214',
@ -183,8 +183,8 @@ return array(
'rsrc/css/phui/workboards/phui-workboard.css' => 'e7ba21a7',
'rsrc/css/phui/workboards/phui-workcard.css' => '62056e3b',
'rsrc/css/phui/workboards/phui-workpanel.css' => 'c44f95c7',
'rsrc/css/sprite-login.css' => '07052ee0',
'rsrc/css/sprite-tokens.css' => 'f1896dc5',
'rsrc/css/sprite-login.css' => '0abdf921',
'rsrc/css/sprite-tokens.css' => '330edc9e',
'rsrc/css/syntax/syntax-default.css' => 'c0307dc6',
'rsrc/externals/d3/d3.min.js' => 'e97b4b78',
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '23f8c698',
@ -341,10 +341,10 @@ return array(
'rsrc/image/phrequent_active.png' => 'de66dc50',
'rsrc/image/phrequent_inactive.png' => '79c61baf',
'rsrc/image/resize.png' => '9cc83373',
'rsrc/image/sprite-login-X2.png' => '02896524',
'rsrc/image/sprite-login.png' => 'e0508107',
'rsrc/image/sprite-tokens-X2.png' => '21621dd9',
'rsrc/image/sprite-tokens.png' => 'bede2580',
'rsrc/image/sprite-login-X2.png' => 'e192f93d',
'rsrc/image/sprite-login.png' => '6c73e3ca',
'rsrc/image/sprite-tokens-X2.png' => '5ddc639b',
'rsrc/image/sprite-tokens.png' => '15f84535',
'rsrc/image/texture/card-gradient.png' => 'e6892cb4',
'rsrc/image/texture/dark-menu-hover.png' => '390a4fa1',
'rsrc/image/texture/dark-menu.png' => '542f699c',
@ -903,8 +903,8 @@ return array(
'project-triggers-css' => 'cd9c8bb9',
'project-view-css' => '567858b3',
'setup-issue-css' => '93231115',
'sprite-login-css' => '07052ee0',
'sprite-tokens-css' => 'f1896dc5',
'sprite-login-css' => '0abdf921',
'sprite-tokens-css' => '330edc9e',
'syntax-default-css' => 'c0307dc6',
'syntax-highlighting-css' => '548567f6',
'tokens-css' => 'ce5a50bd',

View file

@ -116,6 +116,6 @@
1,
2
],
"header": "/**\n * @provides sprite-login-css\n * @generated\n */\n\n.sprite-login {\n background-image: url(/rsrc/image/sprite-login.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (min-device-pixel-ratio: 1.5),\nonly screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (min-resolution: 1.5dppx) {\n .sprite-login {\n background-image: url(/rsrc/image/sprite-login-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"header": "/**\n * @provides sprite-login-css\n * @generated\n */\n\n.sprite-login {\n background-image: url(/rsrc/image/sprite-login.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (min-resolution: 1.5dppx) {\n .sprite-login {\n background-image: url(/rsrc/image/sprite-login-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"type": "standard"
}

View file

@ -126,6 +126,6 @@
1,
2
],
"header": "/**\n * @provides sprite-tokens-css\n * @generated\n */\n\n.sprite-tokens {\n background-image: url(/rsrc/image/sprite-tokens.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (min-device-pixel-ratio: 1.5),\nonly screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (min-resolution: 1.5dppx) {\n .sprite-tokens {\n background-image: url(/rsrc/image/sprite-tokens-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"header": "/**\n * @provides sprite-tokens-css\n * @generated\n */\n\n.sprite-tokens {\n background-image: url(/rsrc/image/sprite-tokens.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (min-resolution: 1.5dppx) {\n .sprite-tokens {\n background-image: url(/rsrc/image/sprite-tokens-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"type": "standard"
}

View file

@ -120,7 +120,6 @@ final class CeleritySpriteGenerator extends Phobject {
if ($has_retina) {
$retina_rules = <<<EOCSS
@media
only screen and (min-device-pixel-ratio: 1.5),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 1.5dppx) {
.sprite-{$name}{$extra_css} {

View file

@ -9,7 +9,6 @@
}
@media
only screen and (min-device-pixel-ratio: 1.5),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 1.5dppx) {
.sprite-login {

View file

@ -9,7 +9,6 @@
}
@media
only screen and (min-device-pixel-ratio: 1.5),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 1.5dppx) {
.sprite-tokens {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB