SponsorBlock/public/popup.css

557 lines
8.2 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;
2020-08-08 01:43:04 +02:00
--sb-main-bg-color: #222626;
2022-02-13 11:28:15 +01:00
--sb-main-fg-color: #fff;
--sb-grey-bg-color: #333;
--sb-red-bg-color: #cc1717;
}
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;
}
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;
2020-12-22 07:20:22 +01:00
}
2022-02-13 11:28:15 +01:00
#sponsorBlockPopupBody {
margin: 0;
width: 374px;
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;
}
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
}
2022-02-15 18:25:33 +01:00
/*
2022-03-13 12:42:16 +01:00
* Close popup button when displayed in-page
2022-02-15 18:25:33 +01: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
font-size: 32px;
font-weight: bold;
justify-content: center;
user-select: none;
padding: 20px 0 10px;
2020-08-16 04:09:14 +02:00
}
2022-02-15 18:25:33 +01:00
.sbPopupLogo img {
2022-02-13 11:28:15 +01:00
margin-right: 8px;
}
/*
* 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%;
2022-02-15 18:25:33 +01:00
cursor: pointer;
2022-02-13 11:28:15 +01:00
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 {
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-02-15 18:25:33 +01:00
cursor: pointer;
font-weight: bold;
2020-12-15 05:26:08 +01:00
padding: 7px;
list-style: none;
2020-12-31 20:59:12 +01:00
white-space: nowrap;
}
2022-02-13 11:28:15 +01:00
/*
* Category dot in segment
*/
.sponsorTimesCategoryColorCircle {
margin: 0 8px;
}
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-02-13 11:28:15 +01:00
background-color: var(--sb-grey-bg-color);
2020-08-16 04:09:14 +02:00
display: flex;
2022-02-13 11:28:15 +01:00
justify-content: space-evenly;
margin-top: 10px;
}
2022-02-15 18:25:33 +01:00
.sbControlsMenu-item {
2022-02-13 11:28:15 +01:00
background-color: var(--sb-grey-bg-color);
border: 0;
padding: 0;
cursor: pointer;
user-select: none;
padding: 10px 15px;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
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 {
cursor: pointer;
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 {
font-weight: bold;
text-decoration: underline;
font-size: large;
cursor: pointer;
padding: 10px 0;
}
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 {
2020-10-15 05:23:42 +02:00
flex-flow: column;
align-items: center;
2022-02-13 11:28:15 +01:00
margin-bottom: 12px;
}
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;
2022-02-15 18:25:33 +01:00
cursor: pointer;
2022-02-13 11:28:15 +01:00
color: var(--sb-main-fg-color);
font-size: 16px;
padding: 8px 37px;
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;
margin: 10px 0 5px;
}
/*
* Side-by-side section of "Your Work"
*/
.sbYourWorkCols {
display: flex;
margin: 0 20px 12px;
}
.sbYourWorkCols > div {
display: flex;
align-items: center;
width: 50%;
justify-content: center;
}
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,
#submitUsername,
#copyUserID {
2022-02-15 18:25:33 +01:00
background: transparent;
border: 0;
cursor: pointer;
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 {
padding-left: 7px;
}
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-02-13 11:28:15 +01:00
#usernameElement > div > p,
#sponsorTimesContributionsContainer {
text-align: start;
}
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;
flex-flow: column nowrap;
align-items: flex-start;
}
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;
2020-09-01 14:36:22 +02:00
max-width: 130px;
2022-02-13 11:28:15 +01:00
margin-right: 8px;
2019-08-20 02:05:33 +02:00
}
2022-02-13 11:28:15 +01:00
/*
* Set username form container with "expanded" state
*/
2020-08-19 05:15:22 +02:00
#setUsername {
2022-02-13 11:28:15 +01:00
display: flex;
2020-08-19 05:15:22 +02:00
}
2022-02-13 11:28:15 +01:00
#setUsername.SBExpanded {
width: 200%;
}
/*
* Set username input
*/
2020-08-16 04:09:14 +02:00
#usernameInput {
2022-02-13 11:28:15 +01:00
background: transparent;
padding: 2px;
border: var(--sb-main-fg-color) 1px solid;
2020-08-16 04:09:14 +02:00
color: var(--sb-main-fg-color);
2020-08-19 05:15:22 +02:00
width: calc(100% - 24px);
2020-12-14 05:52:38 +01:00
text-overflow: ellipsis;
}
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-02-15 18:25:33 +01:00
margin-top: 10px;
padding-bottom: 20px;
}
#sbFooter a {
color: var(--sb-main-fg-color);
cursor: pointer;
text-decoration: none;
2020-08-16 04:09:14 +02:00
}
2020-12-14 06:44:21 +01:00
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);
cursor: pointer;
margin-bottom: 20px;
padding: 5px;
2020-12-14 06:44:21 +01:00
}
2022-02-13 11:28:15 +01:00
/*
2022-02-15 18:25:33 +01:00
* Generic spacing classes
2022-02-13 11:28:15 +01:00
*/
2022-02-15 18:25:33 +01:00
.u-mZ {
margin: 0 !important;
2022-02-13 11:28:15 +01:00
}
/*
2022-02-15 18:25:33 +01:00
* Generic hide utility classes
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
}
2022-04-09 16:22:39 +02:00
#sbBetaServerWarning {
padding: 8px;
font-size: 1em;
font-weight: 700;
word-break: break-word;
color: var(--sb-main-fg-color);
background: var(--sb-red-bg-color);
cursor: pointer;
}