diff options
Diffstat (limited to 'comm/mail/themes/shared/mail/inContentDialog.css')
-rw-r--r-- | comm/mail/themes/shared/mail/inContentDialog.css | 335 |
1 files changed, 335 insertions, 0 deletions
diff --git a/comm/mail/themes/shared/mail/inContentDialog.css b/comm/mail/themes/shared/mail/inContentDialog.css new file mode 100644 index 0000000000..de2dd459aa --- /dev/null +++ b/comm/mail/themes/shared/mail/inContentDialog.css @@ -0,0 +1,335 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, you can obtain one at http://mozilla.org/MPL/2.0/. */ + + @import url("chrome://messenger/skin/colors.css"); + +dialog { + --dialog-text-color: var(--arrowpanel-color); + --dialog-background-color: var(--arrowpanel-background); + --dialog-box-text-color: #181920; + --dialog-box-background-color: #fff; + --dialog-box-border-color: rgba(0, 0, 0, 0.3); + --dialog-box-border-hover-color: rgba(128, 128, 128, 0.8); + --dialog-button-text-color-hover: currentColor; + --dialog-button-background-color: color-mix(in srgb, currentColor 13%, transparent); + --dialog-button-background-color-hover: color-mix(in srgb, currentColor 17%, transparent); + --dialog-button-background-color-active: color-mix(in srgb, currentColor 30%, transparent); + --dialog-highlight-color: var(--in-content-primary-button-background, var(--selected-item-color)); + --dialog-highlight-text-color: var(--in-content-primary-button-text-color, var(--selected-item-text-color)); + --dialog-primary-background-hover: color-mix(in srgb, var(--dialog-highlight-color) 85%, black); + --dialog-primary-background-active: color-mix(in srgb, var(--dialog-highlight-color) 78%, black); +} + +@media (prefers-color-scheme: dark) { + dialog { + --dialog-text-color: rgb(251, 251, 254); + --dialog-background-color: #2a2a2e; + --dialog-box-text-color: #f9f9fa; + --dialog-box-background-color: #353537; + --dialog-box-border-color: hsla(0, 0%, 70%, 0.4); + --dialog-box-border-hover-color: hsla(0, 0%, 70%, 0.5); + --dialog-highlight-color: #45a1ff; + --dialog-highlight-text-color: rgb(43, 42, 51); + } +} + +@media (prefers-contrast) { + dialog { + --dialog-box-text-color: color-mix(in srgb, currentColor 41%, transparent); + --dialog-box-background-color: color-mix(in srgb, currentColor 41%, transparent); + --dialog-box-border-color: -moz-DialogText; + --dialog-box-border-hover-color: SelectedItemText; + --dialog-button-text-color-hover: SelectedItemText; + --dialog-button-background-color-hover: SelectedItem; + --dialog-button-background-color-active: SelectedItem; + border-color: WindowText !important; + } +} + +/* Global overrides */ + +dialog *[hidden] { + display: none !important; +} + +.reset-list { + margin: 0; + padding: 0; + list-style: none; +} + +/* General UI */ + +dialog { + border: 1px solid transparent; + border-radius: var(--arrowpanel-border-radius); + background-color: var(--dialog-background-color); + color: var(--dialog-text-color); + padding: 15px; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5); +} + +dialog::backdrop { + background: rgba(0, 0, 0, 0.5); +} + +dialog :focus-visible { + outline: var(--focus-outline); + outline-offset: 1px; +} + +.dialog-title { + display: flex; + align-items: center; + margin-block: 0 15px; + margin-inline: 15px; + font-size: 1.4em; + font-weight: 500; +} + +.dialog-container { + display: flex; + align-items: center; + margin-bottom: 12px; +} + +.dialog-container.vertical { + flex-direction: column; + align-items: stretch; +} + +.dialog-header-image { + -moz-context-properties: fill, stroke; + fill: color-mix(in srgb, var(--dialog-highlight-color) 20%, transparent); + stroke: var(--dialog-highlight-color); + margin-inline-end: 12px; + height: 32px; +} + +.dialog-header-image.small { + height: 16px; +} + +.dialog-description { + margin-block: 0.2em; + line-height: 1.4em; +} + +/* Warning dialog */ + +dialog.dialog-critical { + box-shadow: 0 2px 20px -8px var(--red-70); +} + +.warning-title { + display: flex; + align-items: center; + margin-top: 0; + background-color: var(--red-60); + color: var(--color-white); + border-radius: var(--button-border-radius); + padding: 6px; +} + +.warning-icon { + fill: color-mix(in srgb, var(--color-white) 20%, transparent); + stroke: var(--color-white); +} + +.insecure-section h3 { + margin-top: 0; +} + +.insecure-section-description { + font-size: 1.05rem; + line-height: 1.5em; +} + +.dialog-footnote { + margin-inline: 6px; + font-size: 1.05rem; + line-height: 1.4em; +} + +/* Typography */ + +dialog h1 { + margin-block-start: 0; + font-size: 1.17em; +} + +dialog p { + margin-block-end: 6px; + font-size: 1.1em; + line-height: 1.4em; +} + +dialog .tip-caption { + opacity: 0.8; + font-size: 1em; +} + +/* Lists */ + +dialog .radio-list { + margin-block: 12px; +} + +dialog .radio-list li { + margin-block-end: 12px; +} + +/* Radio button */ + +dialog input[type="radio"] { + appearance: none; + width: 16px; + height: 16px; + padding: 0; + border: 1px solid var(--dialog-box-border-color); + border-radius: 100%; + margin-block: 2px; + margin-inline: 0 6px; + background-color: var(--dialog-box-background-color); + background-position: center; +} + +dialog input[type="radio"]:enabled:hover { + background-color: var(--dialog-button-background-color-hover); +} + +dialog input[type="radio"]:enabled:hover:active { + background-color: var(--dialog-button-background-color-active); +} + +dialog input[type="radio"]:checked { + -moz-context-properties: fill; + fill: currentColor; + color: var(--dialog-highlight-text-color); + background-color: var(--dialog-highlight-color); + background-image: url("chrome://global/skin/icons/radio.svg"); + border-color: var(--dialog-primary-background-active); + color-adjust: exact; +} + +dialog input[type="radio"]:enabled:checked:hover { + background-color: var(--dialog-primary-background-hover); + border-color: var(--dialog-primary-background-active); +} + +/* Buttons area */ + +.vertical-buttons-container { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 3px; + margin-block-end: 9px; + padding: 0; +} + +.dialog-menu-container { + list-style-type: none; + display: flex; + align-items: center; + margin-block-end: 0; + margin-inline: 0; + padding: 2px 10px; + justify-content: end; + background-color: var(--dialog-background-color); + position: sticky; + bottom: 0; +} + +.dialog-menu-container.two-columns { + justify-content: space-between; +} + +.dialog-menu-container.menu-in-body { + margin-inline: -10px; +} + +/* Buttons */ + +dialog .button-link { + appearance: none; + background-color: transparent !important; + color: LinkText; + border-style: none; + padding: 0 3px; + margin: 0; + font-weight: 600; + cursor: pointer; + min-height: auto; +} + +dialog .button-link:hover { + text-decoration: underline; +} + +dialog button:not([disabled]):hover { + background-color: var(--dialog-button-background-color-hover); + color: var(--dialog-button-text-color-hover); +} + +dialog button:not([disabled]):hover:active { + background-color: var(--dialog-button-background-color-active); +} + +dialog button.primary { + background-color: var(--dialog-highlight-color); + color: var(--dialog-highlight-text-color) !important; +} + +dialog button.primary:not([disabled]):hover { + background-color: var(--dialog-primary-background-hover); +} + +dialog button.primary:not([disabled]):hover:active { + background-color: var(--dialog-primary-background-active); +} + +dialog button[disabled] { + opacity: 0.4; +} + +/* Loading states */ + +@keyframes loading-animation { + 0% { transform: translateX(0); } + 100% { transform: translateX(-100%); } +} + +@keyframes loading-animation-rtl { + 0% { transform: translateX(0); } + 100% { transform: translateX(100%); } +} + +span.loading-inline { + -moz-context-properties: fill; + fill: currentColor; + display: inline-block; + position: relative; + overflow: hidden; + height: 16px; + width: 16px; + color: var(--selected-item-color); + vertical-align: sub; +} + +span.loading-inline::after { + position: absolute; + content: ''; + background-image: url("chrome://messenger/skin/icons/loading.svg"); + background-position: right center; + background-repeat: no-repeat; + width: 480px; + height: 100%; + animation: loading-animation 1.05s steps(30) infinite; +} + +span.loading-inline:dir(rtl)::after { + background-position-x: left; + animation: loading-animation-rtl 1.05s steps(30) infinite; +} |