diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-06-06 14:47:48 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-06-10 19:03:57 -0400 |
commit | 5dbc79d046ed63444895cf8720165b95b9906735 (patch) | |
tree | 4411f7030701dac669b566b77b4e91342e040584 /ext/css/display.css | |
parent | 15ebb483d896916553ba5d729c22be4e545cc08a (diff) |
Structured content updates (#1733)
* Add support for imageRendering
* Make crisp-edges appearance on Firefox more similar to Chrome
* Refactor
* Add background option
* Move data-image-rendering attribute
* Restructure
* Organize
* Add support for appearance
* Update test dictionary
* Update tests
Diffstat (limited to 'ext/css/display.css')
-rw-r--r-- | ext/css/display.css | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/ext/css/display.css b/ext/css/display.css index ac9dae0a..45658f19 100644 --- a/ext/css/display.css +++ b/ext/css/display.css @@ -1566,6 +1566,8 @@ button.definition-item-expansion-button:focus:focus-visible+.definition-item-con line-height: 0; font-size: calc(1em / var(--font-size-no-units)); overflow: hidden; +} +.gloss-image-link[data-background=true]>.gloss-image-container { background-color: var(--gloss-image-background-color); } .gloss-image-link { @@ -1600,6 +1602,18 @@ button.definition-item-expansion-button:focus:focus-visible+.definition-item-con text-align: center; padding: 0.25em; } +.gloss-image-background { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: var(--text-color); + + --image: none; + --icon-size: contain; + --icon-image: var(--image); +} .gloss-image { display: inline-block; vertical-align: top; @@ -1617,13 +1631,27 @@ button.definition-item-expansion-button:focus:focus-visible+.definition-item-con .gloss-image:not([src]) { display: none; } -.gloss-image[data-pixelated=true] { +.gloss-image-link[data-image-rendering=pixelated] .gloss-image, +.gloss-image-link[data-image-rendering=pixelated] .gloss-image-background { image-rendering: auto; image-rendering: -moz-crisp-edges; image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; image-rendering: crisp-edges; } +.gloss-image-link[data-image-rendering=crisp-edges] .gloss-image, +.gloss-image-link[data-image-rendering=crisp-edges] .gloss-image-background { + image-rendering: auto; + image-rendering: -moz-crisp-edges; + image-rendering: -webkit-optimize-contrast; + image-rendering: crisp-edges; +} +:root[data-browser=firefox] .gloss-image-link[data-image-rendering=crisp-edges] .gloss-image, +:root[data-browser=firefox] .gloss-image-link[data-image-rendering=crisp-edges] .gloss-image-background, +:root[data-browser=firefox-mobile] .gloss-image-link[data-image-rendering=crisp-edges] .gloss-image, +:root[data-browser=firefox-mobile] .gloss-image-link[data-image-rendering=crisp-edges] .gloss-image-background { + image-rendering: auto; +} .gloss-image-link[data-has-aspect-ratio=true] .gloss-image-aspect-ratio-sizer { display: inline-block; width: 0; @@ -1645,6 +1673,13 @@ button.definition-item-expansion-button:focus:focus-visible+.definition-item-con white-space: pre-line; } +.gloss-image-link[data-appearance=monochrome] .gloss-image { + visibility: hidden; +} +.gloss-image-link:not([data-appearance=monochrome]) .gloss-image-background { + display: none; +} + .gloss-image-link[data-size-units=em] .gloss-image-container { font-size: 1em; } |