michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /*** Panel and outer controls ***/ michael@0: michael@0: #downloadsPanel { michael@0: margin-top: -1px; michael@0: } michael@0: michael@0: #downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent { michael@0: padding: 0; michael@0: } michael@0: michael@0: #downloadsListBox { michael@0: background: transparent; michael@0: padding: 4px; michael@0: color: inherit; michael@0: } michael@0: michael@0: #downloadsPanel:not([hasdownloads]) > #downloadsListBox { michael@0: display: none; michael@0: } michael@0: michael@0: #downloadsPanel[hasdownloads] > #emptyDownloads { michael@0: display: none; michael@0: } michael@0: michael@0: #emptyDownloads { michael@0: padding: 10px 20px; michael@0: max-width: 40ch; michael@0: } michael@0: michael@0: #downloadsFooter { michael@0: border-bottom-left-radius: 4px; michael@0: border-bottom-right-radius: 4px; michael@0: } michael@0: michael@0: #downloadsHistory { michael@0: background: transparent; michael@0: color: hsl(210,100%,75%); michael@0: cursor: pointer; michael@0: } michael@0: michael@0: #downloadsFooter { michael@0: background: #e5e5e5; michael@0: border-top: 1px solid hsla(0,0%,0%,.1); michael@0: box-shadow: 0 -1px hsla(0,0%,100%,.5) inset, 0 1px 1px hsla(0,0%,0%,.03) inset; michael@0: } michael@0: michael@0: #downloadsHistory > .button-box { michael@0: color: #808080; michael@0: margin: 1em; michael@0: } michael@0: michael@0: #downloadsPanel[keyfocus] > #downloadsFooter > #downloadsSummary:focus, michael@0: #downloadsPanel[keyfocus] > #downloadsFooter > #downloadsHistory:focus { michael@0: outline: 2px -moz-mac-focusring solid; michael@0: outline-offset: -2px; michael@0: -moz-outline-radius-bottomleft: 4px; michael@0: -moz-outline-radius-bottomright: 4px; michael@0: } michael@0: michael@0: /*** Downloads Summary and List items ***/ michael@0: michael@0: #downloadsSummary, michael@0: richlistitem[type="download"] { michael@0: height: 7em; michael@0: -moz-padding-end: 0; michael@0: color: inherit; michael@0: } michael@0: michael@0: #downloadsSummary { michael@0: padding: 8px 38px 8px 12px; michael@0: cursor: pointer; michael@0: -moz-user-focus: normal; michael@0: } michael@0: michael@0: #downloadsSummary > .downloadTypeIcon { michael@0: list-style-image: url("chrome://browser/skin/downloads/download-summary.png"); michael@0: } michael@0: michael@0: @media (min-resolution: 2dppx) { michael@0: #downloadsSummary > .downloadTypeIcon { michael@0: list-style-image: url("chrome://browser/skin/downloads/download-summary@2x.png"); michael@0: } michael@0: } michael@0: michael@0: #downloadsSummaryDescription { michael@0: color: -moz-nativehyperlinktext; michael@0: } michael@0: michael@0: richlistitem[type="download"] { michael@0: margin: 0; michael@0: border-top: 1px solid hsla(0,0%,100%,.07); michael@0: border-bottom: 1px solid hsla(0,0%,0%,.2); michael@0: background: transparent; michael@0: padding: 8px; michael@0: } michael@0: michael@0: richlistitem[type="download"]:first-child { michael@0: border-top: 1px solid transparent; michael@0: } michael@0: michael@0: richlistitem[type="download"]:last-child { michael@0: border-bottom: 1px solid transparent; michael@0: } michael@0: michael@0: .downloadTypeIcon { michael@0: -moz-margin-end: 8px; michael@0: /* Prevent flickering when changing states. */ michael@0: height: 32px; michael@0: width: 32px; michael@0: } michael@0: michael@0: .blockedIcon { michael@0: list-style-image: url("chrome://global/skin/icons/Error.png"); michael@0: } michael@0: michael@0: /* We hold .downloadTarget, .downloadProgress and .downloadDetails inside of michael@0: a vbox with class .downloadContainer. We set the font-size of the entire michael@0: container to 95% because: michael@0: michael@0: 1) This is the size that we want .downloadDetails to be michael@0: 2) The container's width is set by localizers by &downloadDetails.width;, michael@0: which is a ch unit. Since this is the value that should control the michael@0: panel width, we apply it to the outer container to constrain michael@0: .downloadTarget and .downloadProgress. michael@0: michael@0: Finally, since we want .downloadTarget's font-size to be at 100% of the michael@0: font-size of .downloadContainer's parent, we use calc to go from the michael@0: smaller font-size back to the original font-size. michael@0: */ michael@0: #downloadsSummaryDetails, michael@0: .downloadContainer { michael@0: font-size: 95%; michael@0: } michael@0: michael@0: #downloadsSummaryDescription, michael@0: .downloadTarget { michael@0: margin-bottom: 6px; michael@0: cursor: inherit; michael@0: } michael@0: michael@0: .downloadTarget { michael@0: font-size: calc(100%/0.95); michael@0: } michael@0: michael@0: #downloadsSummaryDetails, michael@0: .downloadDetails { michael@0: opacity: 0.7; michael@0: cursor: inherit; michael@0: } michael@0: michael@0: .downloadButton { michael@0: -moz-appearance: none; michael@0: min-width: 0; michael@0: min-height: 0; michael@0: margin: 3px; michael@0: border: none; michael@0: background: transparent; michael@0: padding: 5px; michael@0: list-style-image: url("chrome://browser/skin/downloads/buttons.png"); michael@0: } michael@0: michael@0: .downloadButton:focus > .button-box { michael@0: outline: 2px -moz-mac-focusring solid; michael@0: outline-offset: -2px; michael@0: } michael@0: michael@0: .downloadButton > .button-box { michael@0: padding: 0; michael@0: } michael@0: michael@0: /*** Highlighted list items ***/ michael@0: michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected], michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { michael@0: border-radius: 3px; michael@0: border-top: 1px solid hsla(0,0%,100%,.2); michael@0: border-bottom: 1px solid hsla(0,0%,0%,.4); michael@0: background-color: Highlight; michael@0: color: HighlightText; michael@0: } michael@0: michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { michael@0: cursor: pointer; michael@0: } michael@0: michael@0: /*** Button icons ***/ michael@0: michael@0: .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 16px, 16px, 0px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 32px, 16px, 16px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:hover { michael@0: -moz-image-region: rect(0px, 48px, 16px, 32px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:active { michael@0: -moz-image-region: rect(0px, 64px, 16px, 48px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] > stack > .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 80px, 16px, 64px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 96px, 16px, 80px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadCancel:hover { michael@0: -moz-image-region: rect(0px, 112px, 16px, 96px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadCancel:active { michael@0: -moz-image-region: rect(0px, 128px, 16px, 112px); michael@0: } michael@0: michael@0: .downloadButton.downloadShow { michael@0: -moz-image-region: rect(16px, 16px, 32px, 0px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox > richlistitem[type="download"][state="1"]:hover:not[selected] > stack > .downloadButton.downloadShow { michael@0: -moz-image-region: rect(16px, 32px, 32px, 16px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox > richlistitem[type="download"][state="1"]:hover:not[selected] > stack > .downloadButton.downloadShow:hover { michael@0: -moz-image-region: rect(16px, 48px, 32px, 32px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox > richlistitem[type="download"][state="1"]:hover:not[selected] > stack > .downloadButton.downloadShow:active { michael@0: -moz-image-region: rect(16px, 64px, 32px, 48px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] > stack > .downloadButton.downloadShow { michael@0: -moz-image-region: rect(16px, 80px, 32px, 64px); michael@0: } michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow, michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadShow { michael@0: -moz-image-region: rect(16px, 96px, 32px, 80px); michael@0: } michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:hover, michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadShow:hover { michael@0: -moz-image-region: rect(16px, 112px, 32px, 96px); michael@0: } michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:active, michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadShow:active { michael@0: -moz-image-region: rect(16px, 128px, 32px, 112px); michael@0: } michael@0: michael@0: .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(32px, 16px, 48px, 0px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(32px, 32px, 48px, 16px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:hover { michael@0: -moz-image-region: rect(32px, 48px, 48px, 32px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:active { michael@0: -moz-image-region: rect(32px, 64px, 48px, 48px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] > stack > .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(32px, 80px, 48px, 64px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(32px, 96px, 48px, 80px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadRetry:hover { michael@0: -moz-image-region: rect(32px, 112px, 48px, 96px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadRetry:active { michael@0: -moz-image-region: rect(32px, 128px, 48px, 112px); michael@0: } michael@0: michael@0: @media (min-resolution: 2dppx) { michael@0: .downloadButton { michael@0: list-style-image: url("chrome://browser/skin/downloads/buttons@2x.png"); michael@0: } michael@0: .downloadButton > .button-box > .button-icon { michael@0: width: 16px; michael@0: height: 16px; michael@0: } michael@0: michael@0: .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 32px, 32px, 0px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 64px, 32px, 32px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:hover { michael@0: -moz-image-region: rect(0px, 96px, 32px, 64px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadCancel:active { michael@0: -moz-image-region: rect(0px, 128px, 32px, 96px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] > stack > .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 160px, 32px, 128px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadCancel { michael@0: -moz-image-region: rect(0px, 192px, 32px, 160px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadCancel:hover { michael@0: -moz-image-region: rect(0px, 224px, 32px, 192px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadCancel:active { michael@0: -moz-image-region: rect(0px, 256px, 32px, 224px); michael@0: } michael@0: michael@0: .downloadButton.downloadShow { michael@0: -moz-image-region: rect(32px, 32px, 64px, 0px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox > richlistitem[type="download"][state="1"]:hover:not[selected] > stack > .downloadButton.downloadShow { michael@0: -moz-image-region: rect(32px, 64px, 64px, 32px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox > richlistitem[type="download"][state="1"]:hover:not[selected] > stack > .downloadButton.downloadShow:hover { michael@0: -moz-image-region: rect(32px, 96px, 64px, 64px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox > richlistitem[type="download"][state="1"]:hover:not[selected] > stack > .downloadButton.downloadShow:active { michael@0: -moz-image-region: rect(32px, 128px, 64px, 96px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] > stack > .downloadButton.downloadShow { michael@0: -moz-image-region: rect(32px, 160px, 64px, 128px); michael@0: } michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow, michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadShow { michael@0: -moz-image-region: rect(32px, 192px, 64px, 160px); michael@0: } michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:hover, michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadShow:hover { michael@0: -moz-image-region: rect(32px, 224px, 64px, 192px); michael@0: } michael@0: #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:active, michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadShow:active { michael@0: -moz-image-region: rect(32px, 256px, 64px, 224px); michael@0: } michael@0: michael@0: .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(64px, 32px, 96px, 0px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(64px, 64px, 96px, 32px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:hover { michael@0: -moz-image-region: rect(64px, 96px, 96px, 64px); michael@0: } michael@0: richlistitem[type="download"]:hover > stack > .downloadButton.downloadRetry:active { michael@0: -moz-image-region: rect(64px, 128px, 96px, 96px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"][selected] > stack > .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(64px, 160px, 96px, 128px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadRetry { michael@0: -moz-image-region: rect(64px, 192px, 96px, 160px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadRetry:hover { michael@0: -moz-image-region: rect(64px, 224px, 96px, 192px); michael@0: } michael@0: #downloadsPanel[keyfocus] > #downloadsListBox:focus > richlistitem[type="download"]:hover[selected] > stack > .downloadButton.downloadRetry:active { michael@0: -moz-image-region: rect(64px, 256px, 96px, 224px); michael@0: } michael@0: }