1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Enable some Stylelint color-related rules to slightly reduce file sizes

- Use a consistent format for all alpha-values (this rule didn't require any code changes); see https://stylelint.io/user-guide/rules/alpha-value-notation
 - Use modern and slightly shorter color notation, since [according to MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#browser_compatibility) that should be supported "everywhere" nowadays; see https://stylelint.io/user-guide/rules/color-function-notation/
 - Use "short" hexadecimal colors whenever possible; see https://stylelint.io/user-guide/rules/color-hex-length/
 - Help avoid adding broken hexadecimal colors (this rule didn't require any code changes); see https://stylelint.io/user-guide/rules/color-no-invalid-hex/
This commit is contained in:
Jonas Jenwald 2023-10-05 17:43:56 +02:00
parent a60f90ae94
commit 4277205d78
13 changed files with 177 additions and 173 deletions

View file

@ -37,8 +37,8 @@
.fileAttachmentAnnotation:not(.hasFillAlpha)
.popupTriggerArea {
opacity: 0.2;
background: rgba(255, 255, 0, 1);
box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
background: rgb(255 255 0 / 1);
box-shadow: 0 2px 10px rgb(255 255 0 / 1);
}
.annotationLayer .fileAttachmentAnnotation.hasFillAlpha {
outline: 2px solid yellow;
@ -49,7 +49,7 @@
}
.annotationLayer .linkAnnotation.hasBorder {
background-color: rgba(255, 255, 0, 0.2);
background-color: rgb(255 255 0 / 0.2);
}
.annotationLayer .popupTriggerArea::after {

View file

@ -26,8 +26,8 @@
position: absolute;
white-space: pre;
transform-origin: 0% 0%;
border: solid 1px rgba(255, 0, 0, 0.5);
background-color: rgba(255, 255, 32, 0.1);
border: solid 1px rgb(255 0 0 / 0.5);
background-color: rgb(255 255 32 / 0.1);
box-sizing: border-box;
}

View file

@ -15,6 +15,6 @@
.xfaLink {
opacity: 0.2;
background: rgba(255, 255, 0, 1);
box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
background: rgb(255 255 0 / 1);
box-shadow: 0 2px 10px rgb(255 255 0 / 1);
}