SponsorBlock/public/popup.css

553 lines
9.5 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;
}
/*
* Generic utilities
*/
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
*/
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 */
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;
}
#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
/*
* 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
/*
* 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)
*/
#sponsorBlockPopupContainer #sponsorBlockPopupBody {
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
*/
.sbCloseButton {
background: transparent;
border: 0;
padding: 8px;
2022-05-03 03:22:25 +02:00
cursor: pointer;
position: absolute;
top: 5px;
right: 5px;
2022-05-03 03:22:25 +02:00
opacity: 0.5;
}
2022-05-03 03:22:25 +02:00
.sbCloseButton:hover {
opacity: 1;
2022-05-02 04:50:58 +02:00
}
/*
* Header logo
*/
.sbPopupLogo {
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
user-select: none;
2022-06-03 07:53:29 +02:00
padding: 10px 0px 0px;
font-size: 32px;
}
.sbPopupLogo img {
margin: 8px;
}
2022-02-13 11:28:15 +01:00
/*
* Refresh segments button
*/
#refreshSegmentsButton {
display: flex;
align-items: center;
2022-02-15 18:25:33 +01:00
background: transparent;
2022-02-13 11:28:15 +01:00
border-radius: 50%;
margin: 5px auto;
border: none;
padding: 5px;
2022-02-13 11:28:15 +01:00
}
#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 {
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-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;
}
/*
* Category name in segment
*/
.summaryLabel {
overflow-wrap: break-word;
white-space: normal;
}
2020-12-14 03:51:55 +01:00
.sbVoteButtonsContainer {
text-align: right;
}
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;
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-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
/*
* 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-05-03 03:32:54 +02:00
padding: 8px 12px;
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;
}
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 {
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
*/
.sbYourWorkCols {
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);
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);
border-bottom: 2px solid var(--sb-grey-bg-color);
}
.sbStatsSentence {
padding-top: 5px;
padding-bottom: 5px;
2022-05-03 03:22:25 +02:00
}
2022-06-06 19:18:20 +02:00
.sbStatsSentence .sbExtraInfo {
display: inline-block;
}
2022-02-13 11:28:15 +01:00
/*
* Increase font size of username input and display
*/
#usernameValue,
#usernameInput,
#sponsorTimesContributionsDisplay {
font-size: 16px;
flex: 1 0;
2021-08-03 22:20:32 +02:00
}
/*
* Improve alignment of username and submissions
2022-02-13 11:28:15 +01:00
*/
#usernameElement,
#sponsorTimesContributionsContainer {
display: flex;
flex-direction: column;
justify-content: start;
}
#usernameElement > 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
/*
* Username
2022-02-13 11:28:15 +01:00
*/
#usernameElement {
padding: 8px;
}
#setUsernameContainer {
display: flex;
}
2022-02-15 18:25:33 +01:00
#setUsernameContainer > button {
2020-08-08 01:43:04 +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 {
2022-05-03 03:22:25 +02:00
width: calc(200% - 130px);
text-align: left;
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
}
/*
* Submissions
*/
#sponsorTimesContributionsContainer {
padding: 8px;
}
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
}
#sbFooter a {
transition: background 0.3s ease !important;
2022-02-15 18:25:33 +01:00
color: var(--sb-main-fg-color);
display: inline-block;
2022-02-15 18:25:33 +01:00
text-decoration: none;
border-radius: 4px;
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
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 {
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
}