Bilibili-Evolved/utils/gui-settings/gui-settings.scss
2018-12-02 21:14:43 +08:00

633 lines
12 KiB
SCSS

.gui-settings-icon-panel
{
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
width: 24px;
z-index: 99999;
}
.gui-settings,
.gui-settings-widgets
{
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transform: translateX(-12px);
margin: 16px 0;
}
.gui-settings,
.gui-settings-widgets,
.gui-settings-header .gui-settings-close path,
.gui-settings svg path,
.gui-settings-widgets svg path
{
transition: all 0.2s;
}
.gui-settings svg path,
.gui-settings-widgets svg path
{
fill: #8884;
opacity: 0.75;
transform-origin: center !important;
transform: rotate(120deg);
}
.gui-settings:hover,
.gui-settings-widgets:hover
{
transform: translateX(0px);
}
.gui-settings:hover svg path,
.gui-settings-widgets:hover svg path
{
opacity: 1;
transform: rotate(0deg);
}
.gui-settings-panel
{
width: 100%;
height: 100%;
background: transparent;
position: fixed;
left: 0;
top: 0;
z-index: 100000;
display: flex;
opacity: 0;
transform: scale(0);
transform-origin: center;
align-items: center;
justify-content: center;
}
.gui-settings-panel.opened
{
opacity: 1;
transform: scale(1);
}
.gui-settings-box
{
width: 400px;
height: 90%;
background: white;
box-shadow: 0px 3px 20px 2px #0004;
display: flex;
flex-direction: column;
line-height: initial;
}
.gui-settings-footer,
.gui-settings-header
{
flex-grow: 0;
display: flex;
align-items: center;
flex-shrink: 0;
}
.gui-settings-footer
{
height: 80px;
justify-content: center;
position: relative;
}
.gui-settings-content
{
flex-grow: 1;
overflow: auto;
position: relative;
overscroll-behavior: contain;
}
.gui-settings-content-top-mask,
.gui-settings-content-bottom-mask
{
height: 10px;
position: sticky;
left: 0px;
width: 100%;
z-index: 10;
}
.gui-settings-content-top-mask
{
background: linear-gradient(to bottom, white, transparent);
top: 0px;
}
.gui-settings-content-bottom-mask
{
background: linear-gradient(to top, white, transparent);
bottom: 0px;
}
.gui-settings-content ul
{
padding: 0;
margin: 0;
}
.gui-settings-content ul li
{
font-size: 16px;
margin-bottom: 12px;
display: flex;
height: 24px;
transition: all .2s;
}
.gui-settings-content ul li.disabled,
.gui-settings-content ul li:not(.category).folded
{
height: 0;
margin: 0;
overflow: hidden;
}
.gui-settings-content ul li.indent-0
{
margin-left: 16px;
}
.gui-settings-content ul li.indent-1
{
margin-left: 80px;
}
.gui-settings-content ul li.indent-2
{
margin-left: 144px;
}
.gui-settings-content ul li.indent-center
{
align-items: center;
justify-content: center;
}
.gui-settings-content ul li.widgets-container
{
margin: 0;
height: auto;
width: 100%;
display: flex;
flex-wrap: wrap;
overflow: visible;
}
.gui-settings-content ul li.widgets-container>div
{
align-items: center;
justify-content: center;
min-width: 50%;
display: inline-flex;
margin-bottom: 12px;
}
.gui-settings-content ul li.category
{
padding: 8px 0;
margin-bottom: 12px;
border-top: 1px dashed #8884;
border-bottom: 1px dashed #8884;
background: white;
position: sticky;
top: 0;
z-index: 10;
cursor: pointer;
transition: all .2s ease-out;
-webkit-tap-highlight-color: transparent;
}
.gui-settings-content ul li.category.folded
{
margin-bottom: -1px;
}
span.settings-category
{
opacity: 0.8;
}
.gui-settings-title
{
flex-grow: 1;
font-size: 16px;
margin: 16px;
}
.gui-settings-close
{
width: 24px;
height: 24px;
padding: 16px;
}
.gui-settings-header .gui-settings-close
{
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.gui-settings-header .gui-settings-close:hover path
{
fill: $customStyleColor !important;
}
.gui-settings-close path
{
fill: #222;
}
.gui-settings-ok path
{
fill: transparent;
}
.gui-settings-textbox-container
{
display: flex;
justify-content: center;
align-items: center;
-webkit-tap-highlight-color: transparent;
}
.gui-settings-textbox-container span,
.gui-settings-dropdown-span
{
margin: 0 16px;
transition: all 0.2s;
}
.gui-settings-textbox-container input,
.gui-settings-dropdown input
{
border-radius: 4px;
border: none;
height: 100%;
max-width: 80px;
padding: 2px 8px;
background: #8884;
transition: all 0.2s;
font-size: 16px;
}
.gui-settings-textbox-container input:disabled,
.gui-settings-textbox-container.disabled span,
.gui-settings-textbox-container.disabled div
{
opacity: 0.5;
}
.gui-settings-checkbox-container
{
cursor: pointer;
display: flex;
width: 100%;
justify-content: start;
align-items: center;
padding: 0 16px;
-webkit-tap-highlight-color: transparent;
}
.gui-settings-checkbox-container input
{
visibility: collapse;
transition: all 0.2s;
width: 0;
}
.gui-settings-checkbox-container svg
{
width: 24px;
height: 24px;
border-radius: 4px;
margin-right: 16px;
transition: all 0.2s;
}
.gui-settings-checkbox-container svg path
{
transform: scale(0.8);
transform-origin: center;
}
.gui-settings-checkbox-container input ~ svg
{
background-color: #8884;
}
.gui-settings-checkbox-container input:checked ~ svg
{
background-color: $customStyleColor;
}
.gui-settings-checkbox-container input:checked ~ svg path
{
fill: $foreground;
}
.gui-settings-checkbox-container input:disabled ~ svg,
.gui-settings-checkbox-container input:disabled ~ span
{
opacity: 0.5;
}
button.gui-settings-button
{
padding: 6px 20px;
margin: 0 4px;
max-height: 34px;
border: none;
background: #8884;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: all 0.2s ease-out;
font-family: inherit;
-webkit-tap-highlight-color: transparent;
}
button.gui-settings-button:hover
{
opacity: .9;
}
button.gui-settings-button:active
{
opacity: .8;
}
button.gui-settings-button:focus
{
outline: none;
}
.custom-color-preview
{
width: 40px;
height: 100%;
border-radius: 4px;
background: $customStyleColor;
margin-right: 16px;
border: 1px solid #8884;
position: relative;
cursor: pointer;
box-sizing: border-box;
}
.predefined-colors
{
transition: all 0.2s;
display: flex;
opacity: 0;
background: white;
width: 168px;
height: 168px;
position: absolute;
box-shadow: 0px 3px 20px 2px #0004;
border-radius: 4px;
top: 32px;
left: -64px;
transform: scale(0);
transform-origin: top;
z-index: 9;
}
.predefined-colors.opened
{
opacity: 1;
transform: scale(1);
}
.predefined-colors-grid
{
display: grid;
grid-template-columns: auto auto auto auto;
margin: 4px;
flex-grow: 1;
}
.predefined-colors-grid-block
{
width: 32px;
height: 32px;
border-radius: 4px;
justify-self: center;
align-self: center;
cursor: pointer;
}
input[key]:focus
{
outline: none;
}
input[type=text][key]
{
height: auto;
border: none;
border-radius: 4px;
}
.gui-settings-label
{
margin: 0 16px;
font-size: 16px;
}
.hidden
{
display: none !important;
}
@supports (backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px))
{
.gui-settings-box.blur li.category
{
-webkit-backdrop-filter: blur(24px);
backdrop-filter: blur(24px);
background: #fffa;
}
}
@supports (backdrop-filter: blur(64px)) or (-webkit-backdrop-filter: blur(64px))
{
.gui-settings-box.blur
{
background: transparent;
box-shadow: none;
}
.gui-settings-box.blur .gui-settings-content,
.gui-settings-box.blur .gui-settings-header,
.gui-settings-box.blur .gui-settings-footer
{
-webkit-backdrop-filter: blur(64px);
backdrop-filter: blur(64px);
}
.gui-settings-box.blur .gui-settings-content
{
background: #fffa;
}
.gui-settings-box.blur .gui-settings-header,
.gui-settings-box.blur .gui-settings-footer
{
background: #fffa;
}
}
.gui-settings-panel.animation
{
transition: all .2s ease-out;
}
i.settings-category-arrow
{
transform-origin: center;
transition: all .2s ease-out;
transform: translateY(2.828427px) rotate(-135deg);
height: 100%;
display: inline-block;
margin-left: 12px;
}
li.category.folded i.settings-category-arrow
{
transform: translateY(-2.828427px) rotate(45deg);
}
i.settings-category-arrow::after
{
content: "";
width: 8px;
height: 8px;
background-color: transparent;
border: 2px solid;
border-color: black;
opacity: .8;
display: block;
border-left-color: transparent;
border-top-color: transparent;
border-radius: 2.4px;
}
.gui-settings-dropdown
{
position: relative;
cursor: pointer;
display: inline-block;
-webkit-tap-highlight-color: transparent;
}
.gui-settings-dropdown>ul
{
position: absolute;
top: calc(100%);
width: 100%;
cursor: pointer;
background: white;
transform-origin: top;
transform: scaleY(0);
transition: all .2s ease-out;
display: flex;
flex-direction: column;
align-items: center;
box-shadow: 0px 3px 20px 2px #0004;
border-radius: 4px;
}
.gui-settings-dropdown ul li
{
margin: 0;
padding: 8px 0;
height: auto;
width: 100%;
justify-content: center;
border-radius: 4px;
}
.gui-settings-dropdown ul li:hover
{
background: rgba(0,0,0,0.16);
}
.gui-settings-dropdown.opened>ul
{
transform: scaleY(1);
}
.gui-settings-dropdown input
{
cursor: pointer;
}
.gui-settings-dropdown::after
{
content: "";
border: 4px solid black;
position: absolute;
top: calc(50% - 6px);
box-sizing: border-box;
right: 6px;
transform-origin: center;
transform: rotate(45deg);
border-left-color: transparent;
border-top-color: transparent;
opacity: .8;
}
.gui-settings-mask
{
height: 100%;
width: 100%;
opacity: 0;
background: #000a;
position: fixed;
top: 0;
left: 0;
z-index: 100000;
pointer-events: none;
transition: all .3s cubic-bezier(0, 0.86, 0.58, 1);
}
.gui-settings-mask.opened
{
opacity: 1;
pointer-events: initial;
}
.gui-settings-widgets-box
{
height: 100%;
width: 30%;
background: white;
position: fixed;
top: 0;
left: 0;
z-index: 100000;
transform: translateX(-100%);
transition: all .3s cubic-bezier(0, 0.86, 0.58, 1);
display: flex;
flex-direction: column;
box-shadow: 4px 0px 16px 0px #0000;
}
.gui-settings-widgets-box.opened
{
transform: translateX(0);
box-shadow: 4px 0px 16px 0px #0005;
}
.gui-settings-widgets-box>.title
{
margin: 32px;
font-size: 16pt;
}
.gui-settings-widgets-box>.widgets-container
{
padding: 32px;
display: flex;
align-items: start;
justify-content: space-between;
flex-wrap: wrap;
position: relative;
}
.gui-settings-widgets-box>.widgets-container:empty::after
{
content: "当前页面没有可用的附加功能.";
font-size: 10pt;
}
.gui-settings-flat-button,
.gui-settings-flat-button a,
.gui-settings-flat-button a:hover
{
display: flex;
align-items: center;
justify-content: center;
color: inherit;
}
.gui-settings-flat-button
{
width: auto;
padding: 8px 16px;
background: #8884;
border: none;
color: black;
cursor: pointer;
transition: all .2s ease-out;
transform-origin: center;
font-size: 10pt;
}
.gui-settings-flat-button:hover
{
transform: scale(1.02);
}
.gui-settings-flat-button:active
{
transform: scale(0.98);
}
.gui-settings-flat-button:focus
{
outline: none;
}
.gui-settings-flat-button i
{
margin-right: 8px;
}
.gui-settings-widgets-box .gui-settings-flat-button
{
flex: 1 0 auto;
margin: 4px;
}
.gui-settings-widgets-box .gui-settings-flat-button:nth-child(4n-3),
.gui-settings-widgets-box .gui-settings-flat-button:nth-child(4n)
{
border-bottom: 2px solid $customStyleColor;
flex-basis: calc(60% - 8px);
}
.gui-settings-widgets-box .gui-settings-flat-button:nth-child(4n-1),
.gui-settings-widgets-box .gui-settings-flat-button:nth-child(4n-2)
{
border-bottom: 2px solid $customStyleColor;
flex-basis: calc(40% - 8px);
}