SponsorBlock/public/popup.css

632 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;
--sb-main-bg-color: #222;
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-02-13 11:28:15 +01:00
/*
* Generic utilities
2022-02-13 11:28:15 +01:00
*/
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);
}
.sbHeader {
font-size: 20px;
font-weight: bold;
text-align: left;
margin: 0;
}
#sponsorBlockPopupBody .u-mZ {
margin: 0 !important;
2022-03-13 12:42:16 +01:00
position: relative;
}
#sponsorBlockPopupBody .hidden {
display: none !important;
}
2022-03-13 12:42:16 +01:00
/*
* <button> elements that have icons
2022-03-13 12:42:16 +01:00
*/
#setUsernameButton,
#copyUserID,
#submitUsername {
color: var(--sb-main-fg-color);
background: transparent;
width: fit-content;
padding: none;
border: none;
}
2022-03-13 12:42:16 +01:00
/*
* Main containers
*/
2021-07-27 19:20:40 +02:00
#sponsorBlockPopupHTML {
color-scheme: dark;
2022-03-20 18:33:00 +01:00
max-height: 600px;
overflow-y: auto;
}
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 */
2020-08-19 18:01:33 +02:00
font-size: 14px;
font-family: var(--sb-main-font-family);
2022-02-13 11:28:15 +01:00
background-color: var(--sb-main-bg-color);
color: var(--sb-main-fg-color);
color-scheme: dark;
}
2022-02-13 11:28:15 +01:00
#sponsorblockPopup {
text-align: center;
2020-12-31 20:59:12 +01:00
}
#sponsorblockPopup a,
#sponsorblockPopup button {
cursor: pointer;
}
2022-02-15 18:25:33 +01:00
/*
* Disable transition on all elements until the extension has loaded
*/
2022-03-12 06:23:16 +01:00
.sb-preload * {
2022-02-15 18:25:33 +01:00
transition: none !important;
2020-12-22 07:20:22 +01:00
}
2022-02-15 18:25:33 +01:00
/*
* Alert indicating that Beta server is enabled
2022-02-15 18:25:33 +01:00
*/
#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-15 18:25:33 +01:00
2022-02-13 11:28:15 +01:00
/*
* Container when popup displayed in-page (content.ts)
2022-02-13 11:28:15 +01:00
*/
#sponsorBlockPopupContainer {
position: relative;
margin-bottom: 16px;
}
2022-02-13 11:28:15 +01:00
2022-08-21 12:56:31 +02:00
#sponsorBlockPopupContainer iframe {
width: 100%;
}
/*
* Disable popup max height when displayed in-page (content.ts)
*/
#sponsorBlockPopupContainer #sponsorBlockPopupHTML {
max-height: none;
2020-08-16 04:09:14 +02:00
}
/*
* Disable fixed popup width when displayed in-page (content.ts)
*/
2022-08-21 12:56:31 +02:00
#sponsorBlockPopupBody.is-embedded {
width: auto;
2022-05-03 03:22:25 +02:00
}
/*
* Close popup button when displayed in-page (top-right corner)
2022-05-03 03:22:25 +02:00
*/
2022-03-13 12:42:16 +01:00
.sbCloseButton {
background: transparent;
border: 0;
padding: 8px;
cursor: pointer;
position: absolute;
top: 5px;
right: 5px;
opacity: 0.5;
}
.sbCloseButton:hover {
opacity: 1;
2022-02-15 18:25:33 +01:00
}
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;
2020-08-08 01:43:04 +02:00
align-items: center;
2022-02-13 11:28:15 +01:00
justify-content: center;
font-weight: bold;
2022-02-13 11:28:15 +01:00
user-select: none;
2022-06-03 07:53:29 +02:00
padding: 10px 0px 0px;
font-size: 32px;
2020-12-22 07:20:22 +01:00
}
2022-02-15 18:25:33 +01:00
.sbPopupLogo img {
margin: 8px;
2022-02-13 11:28:15 +01:00
}
#refreshSegmentsButton {
display: flex;
align-items: center;
2022-06-04 08:01:12 +02:00
padding: 5px;
margin: 5px auto;
}
2022-06-07 02:41:15 +02:00
#issueReporterImportExport {
position: relative;
}
2022-06-04 08:01:12 +02:00
#refreshSegmentsButton, #issueReporterImportExport button {
2022-02-15 18:25:33 +01:00
background: transparent;
2022-02-13 11:28:15 +01:00
border-radius: 50%;
border: none;
2020-08-16 04:09:14 +02:00
}
2022-06-04 08:01:12 +02:00
#refreshSegmentsButton:hover, #issueReporterImportExport button:hover {
2022-02-13 11:28:15 +01:00
background-color: var(--sb-grey-bg-color);
}
2022-06-04 08:01:12 +02:00
#issueReporterImportExport button {
padding: 5px;
margin-right: 15px;
margin-left: 15px;
}
#issueReporterImportExport img {
width: 24px;
display: block;
}
2022-06-22 19:21:44 +02:00
#importSegmentsText {
margin-top: 7px;
}
#importSegmentsMenu button {
padding: 10px;
}
2022-02-13 11:28:15 +01:00
/*
* <details> wrapper around each segment
2022-02-13 11:28:15 +01:00
*/
2022-03-16 17:30:35 +01:00
.votingButtons {
font-family: Arial, Helvetica, sans-serif;
border-radius: 8px;
margin: 4px 16px;
2022-03-16 17:30:35 +01:00
}
.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;
align-items: center;
justify-content: space-between;
white-space: nowrap;
2022-02-15 18:25:33 +01:00
font-weight: bold;
list-style: none;
cursor: pointer;
padding: 4px 8px;
}
2022-05-03 03:22:25 +02:00
.segmentSummary > div {
text-align: left;
}
2022-09-19 05:44:14 +02:00
.segmentSummary::-webkit-details-marker {
display: none !important;
}
.segmentActive {
color: #bdfffb;
}
.segmentPassed {
color: #adadad;
}
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-08-21 12:56:31 +02:00
/*
* Category name in segment
*/
.summaryLabel {
overflow-wrap: break-word;
white-space: normal;
}
2020-12-14 03:51:55 +01:00
.sbVoteButtonsContainer {
text-align: right;
}
2020-12-14 03:51:55 +01:00
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-04-23 15:51:52 +02:00
.voteButton:hover {
opacity: 0.8;
}
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;
margin-top: 6px;
2022-05-03 03:22:25 +02:00
border-radius: 8px;
2022-02-13 11:28:15 +01:00
background-color: var(--sb-grey-bg-color);
justify-content: space-evenly;
2022-05-03 03:22:25 +02:00
overflow: hidden;
2020-08-16 04:09:14 +02:00
display: flex;
}
2022-02-15 18:25:33 +01:00
.sbControlsMenu-item {
2022-02-13 11:28:15 +01:00
display: flex;
align-items: center;
flex-direction: column;
2022-02-13 11:28:15 +01:00
justify-content: center;
background: transparent;
user-select: none;
cursor: pointer;
border: none;
flex: 1;
padding: 10px 15px;
2022-09-19 16:40:32 +02:00
transition: 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
/*
* Whitelist add/remove icon
2022-02-13 11:28:15 +01:00
*/
.SBWhitelistIcon > path {
fill: var(--sb-main-fg-color);
}
.SBWhitelistIcon.rotated {
transform: rotate(45deg);
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
2020-08-16 04:09:14 +02:00
/*
* "Skipping is enabled" toggle
*/
2022-02-13 11:28:15 +01:00
.toggleSwitchContainer {
2020-08-16 04:09:14 +02:00
display: flex;
align-items: center;
flex-direction: column;
}
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
}
.switchBg {
2022-02-13 11:28:15 +01:00
width: 50px;
height: 23px;
display: block;
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 {
opacity: 1;
2020-08-08 01:43:04 +02:00
position: absolute;
2022-02-13 11:28:15 +01:00
background-color: #ccc;
}
2020-08-08 01:43:04 +02:00
.switchBg.green {
opacity: 0;
2020-08-08 01:43:04 +02:00
position: absolute;
2022-02-13 11:28:15 +01:00
background-color: #00a205;
transition: opacity 0.2s ease-out;
2020-08-08 01:43:04 +02:00
}
.switchDot {
2022-02-13 11:28:15 +01:00
width: 15px;
margin: 4px;
height: 15px;
border-radius: 50%;
2020-08-08 01:43:04 +02:00
position: absolute;
2022-02-13 11:28:15 +01:00
transition: transform 0.2s ease-out;
background-color: var(--sb-main-fg-color);
box-shadow: 0.75px 0.75px 3.8px 0px rgba(50, 50, 50, 0.45);
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
}
2022-02-13 11:28:15 +01:00
#toggleSwitch:checked ~ .switchBg.green {
opacity: 1;
2020-08-08 01:43:04 +02:00
}
2022-02-13 11:28:15 +01:00
#toggleSwitch:checked ~ .switchBg.white {
transition: opacity 0.2s step-end;
opacity: 0;
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;
padding: 10px 15px;
display: block;
color: #664d03;
}
#whitelistForceCheck:hover {
background-color: #f2e4b7;
2020-12-14 04:41:59 +01:00
}
2022-02-13 11:28:15 +01:00
/*
* Submit box
2022-02-13 11:28:15 +01:00
*/
#mainControls {
2022-05-03 03:22:25 +02:00
margin: 16px;
2022-08-20 16:12:45 +02:00
padding: 8px 14px;
2022-05-03 03:22:25 +02:00
text-align: left;
border-radius: 8px;
2022-05-03 03:22:25 +02:00
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;
2022-08-20 16:12:45 +02:00
padding-top: 3px;
}
2020-08-08 01:43:04 +02:00
2022-02-13 11:28:15 +01:00
/*
* Generic red buttons used for "Start Segment Now", "Submit Times" etc.
2022-02-13 11:28:15 +01:00
*/
2022-02-15 18:25:33 +01:00
.sbMediumButton {
border: none;
font-size: 16px;
padding: 8px 16px;
2022-02-13 11:28:15 +01:00
border-radius: 28px;
display: inline-block;
-moz-border-radius: 28px;
-webkit-border-radius: 28px;
2022-02-13 11:28:15 +01:00
color: var(--sb-main-fg-color);
transition: 0.01s background-color;
font-family: var(--sb-main-font-family);
background-color: var(--sb-red-bg-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
background-color: #ec1c1c;
outline: none;
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;
}
2022-02-13 11:28:15 +01:00
/*
* "Submit Times" button
*/
#submitTimes {
margin-top: 12px;
2020-08-08 01:43:04 +02:00
}
2022-02-15 18:25:33 +01:00
/*
* Your Work box
2022-02-15 18:25:33 +01:00
*/
2022-08-20 16:12:45 +02:00
.sbYourWorkBox {
2022-05-03 03:22:25 +02:00
margin: 16px;
margin-bottom: 8px;
2022-05-03 03:22:25 +02:00
border-radius: 8px;
border: 2px solid var(--sb-grey-bg-color);
2020-08-16 04:09:14 +02:00
}
2022-08-20 16:12:45 +02:00
.sbYourWorkCols {
display: flex;
2022-05-03 03:22:25 +02:00
border-top: 2px solid var(--sb-grey-bg-color);
border-bottom: 2px solid var(--sb-grey-bg-color);
2019-07-29 05:52:32 +02:00
}
.sbStatsSentence {
2022-08-20 16:12:45 +02:00
padding: 6px 14px;
2021-08-03 22:20:32 +02:00
}
2022-08-20 16:12:45 +02:00
.sbExtraInfo {
2022-06-06 19:18:20 +02:00
display: inline-block;
}
2022-02-13 11:28:15 +01:00
/*
* Increase font size of username input and display
*/
#usernameValue,
2022-08-20 16:12:45 +02:00
#usernameInput {
2022-02-13 11:28:15 +01:00
font-size: 16px;
flex: 1 0;
2022-08-20 16:12:45 +02:00
}
#sponsorTimesContributionsDisplay {
font-size: 16px;
2021-02-22 11:00:24 +01:00
}
/*
* Improve alignment of username and submissions
2022-02-13 11:28:15 +01:00
*/
2022-08-20 16:12:45 +02:00
#usernameElement > p,
2022-05-03 03:22:25 +02:00
#sponsorTimesContributionsContainer {
2022-08-20 16:12:45 +02:00
text-align: left;
}
2022-02-13 11:28:15 +01:00
/*
* Username
2022-02-13 11:28:15 +01:00
*/
#usernameElement {
2022-08-20 16:12:45 +02:00
padding: 8px 14px;
min-width: 50%;
width: 100%;
2021-09-01 10:22:06 +02:00
}
#setUsernameContainer {
display: flex;
2022-06-13 19:26:33 +02:00
width: fit-content;
2021-09-01 10:22:06 +02:00
}
2022-02-15 18:25:33 +01:00
#setUsernameContainer > button {
2020-08-19 05:15:22 +02:00
display: flex;
}
#setUsernameButton {
margin-right: 5px;
2021-09-11 02:28:37 +02:00
flex: 0 1;
2021-09-01 10:22:06 +02:00
}
#submitUsername {
padding-left: 16px;
2021-09-01 10:22:06 +02:00
}
#copyUserID {
width: 100%;
flex: 0 1;
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
text-overflow: ellipsis;
2022-05-03 03:22:25 +02:00
white-space: nowrap;
overflow: hidden;
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 {
text-align: left;
2020-08-19 05:15:22 +02:00
}
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);
2022-08-20 16:12:45 +02:00
background-color: var(--sb-grey-bg-color);
2020-12-14 05:52:38 +01:00
}
2022-08-21 12:56:31 +02:00
/*
* Submissions
*/
#sponsorTimesContributionsContainer {
2022-08-20 16:12:45 +02:00
padding: 8px 14px;
border-left: 2px solid var(--sb-grey-bg-color);
2020-12-14 05:52:38 +01:00
}
2022-02-13 11:28:15 +01:00
/*
* Footer
*/
#sbFooter {
2022-05-03 03:22:25 +02:00
padding: 8px 0;
2022-02-15 18:25:33 +01:00
}
2022-02-07 00:12:58 +01:00
#sbFooter a {
transition: background 0.3s ease !important;
2020-08-16 04:09:14 +02:00
color: var(--sb-main-fg-color);
display: inline-block;
2020-08-16 04:09:14 +02:00
text-decoration: none;
border-radius: 4px;
2022-08-20 16:12:45 +02:00
background-color: #333;
2022-05-03 03:22:25 +02:00
padding: 4px 8px;
2022-05-02 04:50:58 +02:00
font-weight: 500;
margin: 2px 1px;
2020-08-16 04:09:14 +02:00
}
2022-05-02 04:50:58 +02:00
#sbFooter a:hover {
2022-08-20 16:12:45 +02:00
background-color: #444;
2020-08-16 04:09:14 +02:00
}
2020-12-14 06:44:21 +01:00
2022-06-13 19:16:47 +02:00
#sponsorTimesDonateContainer a {
color: var(--sb-main-fg-color);
text-decoration: none;
}
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;
color: var(--sb-main-fg-color);
2022-02-15 18:25:33 +01:00
margin-bottom: 20px;
2020-12-14 06:44:21 +01:00
padding: 5px;
}
#sponsorBlockPopupBody .u-mZ {
2022-02-15 18:25:33 +01:00
margin: 0 !important;
2022-02-13 11:28:15 +01:00
}
2022-02-15 18:25:33 +01:00
#sponsorBlockPopupBody .hidden {
display: none !important;
2020-12-14 06:44:21 +01:00
}
#issueReporterTabs {
margin: 5px;
}
#issueReporterTabs > span {
padding: 2px 4px;
margin: 0 3px;
cursor: pointer;
background-color: #444848;
border-radius: 10px;
}
#issueReporterTabs > span > span {
position: relative;
padding: 0.2em 0;
}
#issueReporterTabs > span > span::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0.1em;
background-color: rgb(145, 0, 0);
transition: transform 300ms;
transform: scaleX(0);
transform-origin: center;
}
#issueReporterTabs > span.sbSelected > span::after {
transform: scaleX(0.8);
}