SponsorBlock/public/popup.css

686 lines
11 KiB
CSS
Raw Normal View History

2020-08-08 01:43:04 +02:00
:root {
2022-02-13 11:28:15 +01:00
--sb-main-font-family: "Source Sans Pro", sans-serif;
2022-05-03 03:22:25 +02:00
--sb-main-bg-color: #212121;
2022-02-13 11:28:15 +01:00
--sb-main-fg-color: #fff;
--sb-grey-bg-color: #333;
2022-05-02 04:50:58 +02:00
--sb-grey-fg-color: #999;
2022-02-13 11:28:15 +01:00
--sb-red-bg-color: #cc1717;
}
2022-05-02 04:50:58 +02:00
.grey-text {
color: var(--sb-grey-fg-color);
}
2022-05-03 03:22:25 +02:00
.white-text {
color: var(--sb-main-fg-color);
}
2022-05-02 04:50:58 +02:00
2022-02-13 11:28:15 +01:00
/*
2022-03-13 12:42:16 +01:00
* Container when popup displayed in-page
2022-02-13 11:28:15 +01:00
*/
2022-02-15 18:25:33 +01:00
#sponsorBlockPopupContainer {
2022-03-13 12:42:16 +01:00
position: relative;
2022-02-15 18:25:33 +01:00
margin-bottom: 16px;
}
/*
* Disable popup max height when displayed in-page
*/
#sponsorBlockPopupContainer #sponsorBlockPopupHTML {
max-height: none;
}
2022-03-13 12:42:16 +01:00
/*
* Disable fixed popup width when displayed in-page
*/
#sponsorBlockPopupContainer #sponsorBlockPopupBody {
width: auto;
}
/*
* Main containers
*/
2022-02-13 11:28:15 +01:00
#sponsorBlockPopupHTML {
2021-07-27 19:20:40 +02:00
color-scheme: dark;
2022-03-20 18:33:00 +01:00
max-height: 600px;
overflow-y: auto;
2020-12-22 07:20:22 +01:00
}
2022-02-13 11:28:15 +01:00
#sponsorBlockPopupBody {
margin: 0;
width: 374px;
max-width: 100%; /* NOTE: Ensures content doesn't exceed restricted popup widths in Firefox */
2022-02-13 11:28:15 +01:00
font-family: var(--sb-main-font-family);
2020-08-19 18:01:33 +02:00
font-size: 14px;
2022-02-13 11:28:15 +01:00
background-color: var(--sb-main-bg-color);
color: var(--sb-main-fg-color);
color-scheme: dark;
}
#sponsorblockPopup {
text-align: center;
}
#sponsorblockPopup a,
#sponsorblockPopup button {
cursor: pointer;
}
2022-03-13 12:03:37 +01:00
/*
2022-03-13 12:42:16 +01:00
* Disable transition on all elements until the extension has loaded
2022-03-13 12:03:37 +01:00
*/
2022-03-13 12:42:16 +01:00
.sb-preload * {
transition: none !important;
2022-03-13 12:03:37 +01:00
}
/*
* Alert indicating that Beta server is enabled
*/
#sbBetaServerWarning {
padding: 8px;
font-size: 1em;
font-weight: 700;
color: var(--sb-main-fg-color);
background-color: var(--sb-red-bg-color);
cursor: pointer;
}
2022-02-13 11:28:15 +01:00
/*
* Header logo
*/
2022-02-15 18:25:33 +01:00
.sbPopupLogo {
2020-08-16 04:09:14 +02:00
display: flex;
2022-05-02 04:50:58 +02:00
flex-direction: column;
2020-08-08 01:43:04 +02:00
align-items: center;
2022-02-13 11:28:15 +01:00
font-size: 32px;
font-weight: bold;
justify-content: center;
user-select: none;
2022-05-03 03:22:25 +02:00
padding-top: 16px;
2020-08-16 04:09:14 +02:00
}
2022-02-15 18:25:33 +01:00
.sbPopupLogo img {
2022-05-03 03:28:22 +02:00
margin: 8px;
2022-05-03 03:22:25 +02:00
}
/*
* Close popup button when displayed in-page (top-left corner)
*/
.sbCloseButton {
background: transparent;
border: 0;
padding: 8px;
cursor: pointer;
position: absolute;
top: 26px;
left: 26px;
opacity: 0.5;
}
.sbCloseButton:hover {
opacity: 1;
2022-05-02 04:50:58 +02:00
}
/*
2022-05-03 03:22:25 +02:00
* Options button (top-right corner)
2022-05-02 04:50:58 +02:00
*/
#optionsButton {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
background: none;
box-shadow: none;
border: none;
top: 26px;
right: 26px;
padding: 5px;
z-index: 69;
2022-05-03 03:22:25 +02:00
height: 32px;
width: 32px;
2022-05-02 04:50:58 +02:00
}
#optionsButton svg {
transition: transform 0.15s ease-in-out !important;
transform-origin: center center;
color: var(--sb-grey-fg-color);
}
#optionsButton:hover svg {
color: var(--sb-main-fg-color);
transform: rotate(90deg);
2022-02-13 11:28:15 +01:00
}
2022-05-02 04:50:58 +02:00
#optionsButton:active svg {
transform: scale(1.5);
}
#optionsButton:before {
content: attr(data-hover);
opacity: 0;
pointer-events: none;
width: content;
color: var(--sb-main-fg-color);
background-color: var(--sb-grey-bg-color);
2022-05-03 03:28:22 +02:00
border-radius: 16px;
padding: 4px 8px;
2022-05-02 04:50:58 +02:00
transition: .3s;
position: absolute;
z-index: 1;
left: -200%;
2022-05-03 03:28:22 +02:00
top: 4px;
2022-05-02 04:50:58 +02:00
}
#optionsButton:hover:before {
opacity: 1;
transform: translateX(-5px);
}
2022-02-13 11:28:15 +01:00
/*
* Refresh segments button
*/
#refreshSegmentsButton {
2022-02-15 18:25:33 +01:00
background: transparent;
border: 0;
2022-02-13 11:28:15 +01:00
border-radius: 50%;
display: flex;
padding: 5px;
margin: 5px auto;
align-items: center;
}
#refreshSegmentsButton:hover {
background-color: var(--sb-grey-bg-color);
}
/*
* <details> wrapper around each segment
2022-02-13 11:28:15 +01:00
*/
2022-03-16 17:30:35 +01:00
.votingButtons {
2022-05-03 03:22:25 +02:00
margin: 4px 16px;
border-radius: 8px;
2022-03-16 17:30:35 +01:00
font-family: Arial, Helvetica, sans-serif;
}
.votingButtons[open] {
padding-bottom: 5px;
}
.votingButtons:hover {
background-color: var(--sb-grey-bg-color);
}
/*
* Individual segments summaries (clickable <summary>)
*/
.segmentSummary {
2022-05-03 03:22:25 +02:00
display: flex;
justify-content: space-between;
align-items: center;
2022-02-15 18:25:33 +01:00
cursor: pointer;
font-weight: bold;
2022-05-03 03:22:25 +02:00
padding: 4px 8px;
list-style: none;
2020-12-31 20:59:12 +01:00
white-space: nowrap;
}
2022-05-03 03:22:25 +02:00
.segmentSummary > div {
text-align: left;
}
.summaryLabel {
overflow-wrap: break-word !important;
max-width: 50px !important;
white-space: normal;
}
2022-02-13 11:28:15 +01:00
/*
* Category dot in segment
*/
.sponsorTimesCategoryColorCircle {
2022-05-03 03:22:25 +02:00
margin-right: 8px;
2022-02-13 11:28:15 +01:00
}
2020-12-14 03:51:55 +01:00
.dot {
width: 10px;
2022-02-13 11:28:15 +01:00
height: 10px;
2020-12-14 03:51:55 +01:00
border-radius: 50%;
display: inline-block;
}
2022-02-13 11:28:15 +01:00
/*
* Buttons that appear under a segment on click
*/
2020-12-13 21:46:48 +01:00
.voteButton {
height: 20px;
padding: 0 5px;
cursor: pointer;
2020-08-19 17:57:46 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* "Voted!" text that appears after voting on a segment
*/
.sponsorTimesThanksForVotingText {
font-size: large;
}
2022-02-13 11:28:15 +01:00
/*
* Main controls menu
*/
2022-02-15 18:25:33 +01:00
.sbControlsMenu {
2022-05-03 03:22:25 +02:00
margin: 16px;
border-radius: 8px;
overflow: hidden;
2020-08-16 04:09:14 +02:00
display: flex;
2022-02-13 11:28:15 +01:00
justify-content: space-evenly;
2022-05-03 03:22:25 +02:00
background-color: var(--sb-grey-bg-color);
}
2022-02-15 18:25:33 +01:00
.sbControlsMenu-item {
background: transparent;
2022-02-13 11:28:15 +01:00
border: 0;
cursor: pointer;
user-select: none;
padding: 10px 15px;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
2022-05-03 03:22:25 +02:00
trasition: background-color 0.2s ease-in-out;
2020-08-16 04:09:14 +02:00
}
2022-02-15 18:25:33 +01:00
.sbControlsMenu-item:hover {
2022-02-13 11:28:15 +01:00
background-color: #444;
}
2022-02-15 18:25:33 +01:00
.sbControlsMenu-itemIcon {
2022-02-13 11:28:15 +01:00
margin-bottom: 6px;
}
2022-02-13 11:28:15 +01:00
/*
* "Skipping is enabled" toggle
*/
2020-08-16 04:09:14 +02:00
2022-02-13 11:28:15 +01:00
.toggleSwitchContainer {
2020-08-16 04:09:14 +02:00
display: flex;
2022-02-13 11:28:15 +01:00
flex-direction: column;
2020-08-16 04:09:14 +02:00
align-items: center;
}
2022-02-13 11:28:15 +01:00
.toggleSwitchContainer-switch {
2020-08-08 01:43:04 +02:00
display: flex;
2022-02-13 11:28:15 +01:00
margin-bottom: 6px;
2020-08-08 01:43:04 +02:00
}
2020-08-16 04:09:14 +02:00
2020-08-08 01:43:04 +02:00
.switchBg {
display: block;
2022-02-13 11:28:15 +01:00
width: 50px;
height: 23px;
2020-08-08 01:43:04 +02:00
border-radius: 18.5px;
}
2020-08-08 01:43:04 +02:00
.switchBg.shadow {
box-shadow: 0.75px 0.75px 10px 0px rgba(50, 50, 50, 0.5);
opacity: 1;
}
2020-08-08 01:43:04 +02:00
.switchBg.white {
position: absolute;
2022-02-13 11:28:15 +01:00
background-color: #ccc;
2020-08-08 01:43:04 +02:00
opacity: 1;
}
2020-08-08 01:43:04 +02:00
.switchBg.green {
position: absolute;
2022-02-13 11:28:15 +01:00
background-color: #00a205;
2020-08-08 01:43:04 +02:00
opacity: 0;
2022-02-13 11:28:15 +01:00
transition: opacity 0.2s ease-out;
2020-08-08 01:43:04 +02:00
}
2020-04-20 22:56:12 +02:00
2020-08-08 01:43:04 +02:00
.switchDot {
2022-02-13 11:28:15 +01:00
background-color: var(--sb-main-fg-color);
border-radius: 50%;
width: 15px;
height: 15px;
margin: 4px;
2020-08-08 01:43:04 +02:00
position: absolute;
2022-02-13 11:28:15 +01:00
box-shadow: 0.75px 0.75px 3.8px 0px rgba(50, 50, 50, 0.45);
transition: transform 0.2s ease-out;
2020-12-14 06:35:49 +01:00
}
2022-02-13 11:28:15 +01:00
#toggleSwitch:checked ~ .switchDot {
transform: translateX(27px);
2020-08-08 01:43:04 +02:00
}
2020-04-20 22:56:12 +02:00
2022-02-13 11:28:15 +01:00
#toggleSwitch:checked ~ .switchBg.green {
opacity: 1;
2020-08-08 01:43:04 +02:00
}
2020-08-16 04:09:14 +02:00
2022-02-13 11:28:15 +01:00
#toggleSwitch:checked ~ .switchBg.white {
opacity: 0;
transition: opacity 0.2s step-end;
2020-08-08 01:43:04 +02:00
}
2020-08-16 04:09:14 +02:00
2022-02-13 11:28:15 +01:00
/*
* Whitelist add/remove icon
*/
2019-07-10 18:20:29 +02:00
2022-02-13 11:28:15 +01:00
.SBWhitelistIcon > path {
fill: var(--sb-main-fg-color);
2020-04-20 21:57:07 +02:00
}
2022-02-13 11:28:15 +01:00
.SBWhitelistIcon.rotated {
transform: rotate(45deg);
2019-08-13 20:39:20 +02:00
}
2022-02-13 11:28:15 +01:00
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
2020-08-19 05:15:22 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Notice that appears when whitelisting a channel, that recommends
* enabling the "Force Channel Check Before Skipping" option
*/
2020-12-14 04:41:59 +01:00
#whitelistForceCheck {
background-color: #fff3cd;
color: #664d03;
display: block;
padding: 10px 15px;
}
#whitelistForceCheck:hover {
background-color: #f2e4b7;
2020-12-14 04:41:59 +01:00
}
2022-02-13 11:28:15 +01:00
/*
* Container around the "Segment Starts Now" and "Submit Times" buttons
*/
2020-08-19 05:15:22 +02:00
2022-02-13 11:28:15 +01:00
#mainControls {
2022-05-03 03:22:25 +02:00
margin: 16px;
padding: 8px;
border-radius: 8px;
text-align: left;
border: 2px solid var(--sb-grey-bg-color);
2022-03-19 13:13:04 +01:00
}
.sponsorStartHint {
display: block;
2022-05-03 03:22:25 +02:00
text-align: left;
}
2020-08-08 01:43:04 +02:00
2022-02-13 11:28:15 +01:00
/*
* Generic buttons used for "Segment Starts Now" and "Submit Times"
*/
2022-02-15 18:25:33 +01:00
.sbMediumButton {
2022-02-13 11:28:15 +01:00
background-color: var(--sb-red-bg-color);
2022-02-15 18:25:33 +01:00
border: 0;
2022-02-13 11:28:15 +01:00
-moz-border-radius: 28px;
-webkit-border-radius: 28px;
border-radius: 28px;
display: inline-block;
color: var(--sb-main-fg-color);
font-size: 16px;
2022-05-03 03:22:25 +02:00
padding: 8px 16px;
2022-02-13 11:28:15 +01:00
font-family: var(--sb-main-font-family);
transition: 0.01s background-color;
2020-10-15 05:23:42 +02:00
}
2022-02-15 18:25:33 +01:00
.sbMediumButton:hover,
.sbMediumButton:focus {
2022-02-13 11:28:15 +01:00
outline: none;
background-color: #ec1c1c;
2021-09-11 02:28:37 +02:00
}
2022-02-15 18:25:33 +01:00
.sbMediumButton:active {
2022-02-13 11:28:15 +01:00
position: relative;
top: 1px;
}
2020-08-08 01:43:04 +02:00
2022-02-13 11:28:15 +01:00
/*
* "Submit Times" button
*/
2020-08-16 04:09:14 +02:00
2022-02-13 11:28:15 +01:00
#submitTimes {
margin-top: 12px;
2020-08-08 01:43:04 +02:00
}
2022-02-15 18:25:33 +01:00
/*
* Heading utility class
*/
.sbHeader {
font-size: 20px;
font-weight: bold;
2022-05-03 03:22:25 +02:00
text-align: left;
margin: 0;
2022-02-15 18:25:33 +01:00
}
/*
* Side-by-side section of "Your Work"
*/
.sbYourWorkCols {
2022-05-03 03:22:25 +02:00
margin: 16px;
border-radius: 8px;
border: 2px solid var(--sb-grey-bg-color);
2022-02-15 18:25:33 +01:00
}
.sbYourWorkCols > div {
display: flex;
2022-05-03 03:22:25 +02:00
border-top: 2px solid var(--sb-grey-bg-color);
}
#usernameElement {
z-index: 2;
padding: 8px;
}
#sponsorTimesContributionsContainer {
padding: 8px;
2022-02-15 18:25:33 +01:00
}
2022-02-13 11:28:15 +01:00
/*
* <button> elements that have icons
*/
2020-09-01 14:36:22 +02:00
2022-02-13 11:28:15 +01:00
#setUsernameButton,
#copyUserID,
#submitUsername {
2022-02-15 18:25:33 +01:00
background: transparent;
border: 0;
padding: 0;
2022-02-13 11:28:15 +01:00
color: var(--sb-main-fg-color);
width: fit-content;
}
2022-02-13 11:28:15 +01:00
/*
* Prevent username from wrapping
*/
2019-07-29 05:52:32 +02:00
2022-02-13 11:28:15 +01:00
#setUsernameButton {
flex: 0 1;
margin-right: 5px;
2020-08-16 04:09:14 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Set username button
*/
2020-08-16 04:09:14 +02:00
2022-02-13 11:28:15 +01:00
#submitUsername {
2022-05-03 03:22:25 +02:00
padding-left: 16px;
}
2022-02-13 11:28:15 +01:00
/*
* Increase font size of username input and display
*/
2019-07-29 05:52:32 +02:00
2022-02-13 11:28:15 +01:00
#usernameValue,
#usernameInput,
#sponsorTimesContributionsDisplay {
font-size: 16px;
flex: 1 0;
2021-08-03 22:20:32 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Left align "Username" and "Submissions" labels
*/
2021-02-22 11:00:24 +01:00
2022-05-03 03:22:25 +02:00
#usernameElement > div > span,
2022-02-13 11:28:15 +01:00
#sponsorTimesContributionsContainer {
text-align: start;
}
2022-05-03 03:22:25 +02:00
#sponsorTimesContributionsContainer {
margin-left: 8px;
padding-left: 8px;
border-left: 2px solid var(--sb-grey-bg-color);
}
2022-02-13 11:28:15 +01:00
/*
* Enable flexbox for buttons with SVG icon
*/
2022-02-15 18:25:33 +01:00
#setUsernameContainer > button {
2020-08-08 01:43:04 +02:00
display: flex;
}
2022-02-13 11:28:15 +01:00
/*
* Improve position of "Copy User ID" button
*/
2020-08-19 05:15:22 +02:00
2021-09-01 10:22:06 +02:00
#copyUserID {
width: 100%;
2021-09-11 02:28:37 +02:00
flex: 0 1;
2021-09-01 10:22:06 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Container around username display and edit
*/
2021-09-01 10:22:06 +02:00
#setUsernameContainer {
display: flex;
}
2022-02-13 11:28:15 +01:00
/*
* Improve alignment of username and submissions
*/
#usernameElement > div,
#sponsorTimesContributionsContainer > div {
2020-08-19 05:15:22 +02:00
display: flex;
2022-05-03 03:22:25 +02:00
flex-direction: column;
justify-content: start;
/* flex-flow: column nowrap; */
/* align-items: flex-start; */
2020-08-19 05:15:22 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Truncate username display
*/
#usernameValue {
2020-08-16 04:09:14 +02:00
overflow: hidden;
text-overflow: ellipsis;
2022-05-03 03:22:25 +02:00
white-space: nowrap;
2022-03-19 12:47:34 +01:00
margin: 0 8px 0 0;
2022-05-03 03:22:25 +02:00
max-width: 130px;
2019-08-20 02:05:33 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Set username form container with "expanded" state
*/
#setUsername.SBExpanded {
2022-05-03 03:22:25 +02:00
text-align: left;
width: calc(200% - 130px);
2022-02-13 11:28:15 +01:00
}
/*
* Set username input
*/
2020-08-16 04:09:14 +02:00
#usernameInput {
2022-05-03 03:22:25 +02:00
border: none;
padding: 4px 8px;
border-radius: 4px;
width: calc(100% - 68px);
2020-12-14 05:52:38 +01:00
text-overflow: ellipsis;
2022-05-03 03:22:25 +02:00
color: var(--sb-main-fg-color);
background: var(--sb-grey-bg-color);
2020-12-14 05:52:38 +01:00
}
2022-02-13 11:28:15 +01:00
/*
* Footer
*/
2020-08-16 04:09:14 +02:00
2022-02-13 11:28:15 +01:00
#sbFooter {
2022-05-03 03:22:25 +02:00
padding: 8px 0;
2022-02-15 18:25:33 +01:00
}
#sbFooter a {
2022-05-02 04:50:58 +02:00
display: inline-block;
2022-02-15 18:25:33 +01:00
color: var(--sb-main-fg-color);
text-decoration: none;
2022-05-03 03:22:25 +02:00
background: #333;
2022-05-02 04:50:58 +02:00
cursor: pointer;
2022-05-03 03:22:25 +02:00
padding: 4px 8px;
2022-05-02 04:50:58 +02:00
border-radius: 4px;
font-weight: 500;
2022-05-02 05:07:03 +02:00
transition: background 0.3s ease !important;
2022-05-02 04:50:58 +02:00
margin: 2px 1px;
2020-08-16 04:09:14 +02:00
}
2020-12-14 06:44:21 +01:00
2022-05-02 04:50:58 +02:00
#sbFooter a:hover {
background: #444;
}
2022-02-13 11:28:15 +01:00
/*
* "Show Notice Again" button
*/
2020-12-14 06:44:21 +01:00
#showNoticeAgain {
2022-02-15 18:25:33 +01:00
background: transparent;
2022-02-13 11:28:15 +01:00
border: 1px solid #fff;
2020-12-14 06:44:21 +01:00
border-radius: 5px;
2022-02-15 18:25:33 +01:00
color: var(--sb-main-fg-color);
margin-bottom: 20px;
padding: 5px;
2020-12-14 06:44:21 +01:00
}
2022-02-13 11:28:15 +01:00
/*
2022-03-19 12:47:34 +01:00
* Generic utilities
2022-02-13 11:28:15 +01:00
*/
2022-05-02 04:50:58 +02:00
#sponsorBlockPopupBody .u-mZ {
2022-02-15 18:25:33 +01:00
margin: 0 !important;
2022-05-03 03:22:25 +02:00
position: relative;
2022-02-13 11:28:15 +01:00
}
2022-02-15 18:25:33 +01:00
#sponsorBlockPopupBody .hidden {
display: none !important;
2022-02-13 11:28:15 +01:00
}