1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00
FrankerFaceZ/styles/chat.scss
SirStendec 64f7a513a8 4.20.39
* Fixed: Playback statistics not appearing when experiencing a specific player experiment.
* Fixed: Layout issues when viewing a Watch Party with certain features enabled. Note that currently we aren't properly supporting Watch Parties due to the oddly extensive changes they make to the layout. Instead, we just disable certain features when a Watch Party is detected. This may change in the future. Closes #906. Closes #898.
* Fixed: Issue with incorrect profile priorities being followed when highlighting badges. Closes #908.
* Fixed: Issue with sending whisper messages sometimes breaking whisper UI. Closes #904
* Fixed: Chat font size overrides not working in a specific situation.
* Fixed: Incorrect tool-tips for emotes with modifiers.
2020-09-29 14:15:43 -04:00

410 lines
No EOL
6.6 KiB
SCSS

.ffz-cheer {
display: inline-block;
height: 2.8rem;
line-height: 2.8rem;
padding-left: 3rem;
margin: -.5rem .5rem;
background-position: 0;
background-repeat: no-repeat;
&:after {
font-weight: bold;
content: attr(data-amount)
}
}
.ffz-cheer-preview {
height: 11.2rem;
width: 11.2rem;
}
.ffz--inline-reasons {
max-width: 30rem;
}
.ffz--inline-actions {
vertical-align: middle;
}
.ffz--line-clamp {
display: -webkit-box;
-webkit-line-clamp: var(--ffz-lines);
-webkit-box-orient: vertical;
overflow: hidden;
}
.ffz--rich-header {
line-height: 1.4;
margin-left: -0.5rem;
margin-right: -0.5rem;
}
.ffz--overlay {
position: relative;
& > :not(.ffz--overlay__content) {
position: absolute;
z-index: 1;
background-color: var(--color-background-overlay);
color: var(--color-text-overlay);
padding: 0 0.5rem;
border-radius: 4px;
}
.ffz--overlay__content {
width: 100%;
height: 100%;
}
.ffz--overlay__bit {
max-width: calc(100% - 1rem);
&[data-side="top-left"],
&[data-side="top"],
&[data-side="top-right"] {
top: 0.5rem;
}
&[data-side="bottom-left"],
&[data-side="bottom"],
&[data-side="bottom-right"] {
bottom: 0.5rem;
}
&[data-side="top-left"],
&[data-side="left"],
&[data-side="bottom-left"] {
left: 0.5rem;
}
&[data-side="top-right"],
&[data-side="right"],
&[data-side="bottom-right"] {
right: 0.5rem;
}
&[data-side="left"], &[data-side="right"] {
top: 50%;
transform: translateY(-50%);
}
&[data-side="top"], &[data-side="bottom"] {
left: 50%;
transform: translateX(-50%);
}
&[data-side="center"] {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.ffz--rich-gallery & {
&[data-side="top-left"],
&[data-side="top"],
&[data-side="top-right"] {
top: 1rem;
}
&[data-side="bottom-left"],
&[data-side="bottom"],
&[data-side="bottom-right"] {
bottom: 1rem;
}
}
}
}
.ffz--header-image {
height: 4.8rem;
max-width: 25%;
img {
object-fit: contain;
height: 100%;
}
&.ffz--header-aspect img {
object-fit: cover;
width: 100%;
}
}
.ffz--compact-header .ffz--header-image {
height: 2.4rem;
}
.ffz--rich-gallery, .ffz--compact-header {
&:not(:first-child) {
margin-top: 0.5rem;
}
&:not(:last-child) {
margin-bottom: 0.5rem;
}
}
.ffz--corner-flag {
position: absolute;
top: 0;
right: 0;
border-color: transparent;
border-style: solid;
border-width: 0 3em 3em 0;
z-index: 100;
figure {
position: absolute;
top: 0;
right: -2.75em;
}
}
.ffz--corner-flag__warn {
border-right-color: #f33;
color: #fff;
.tw-root--theme-dark & {
border-right-color: #900;
}
}
.ffz--fields {
display: flex;
margin-top: -.5rem;
margin-left: -.5rem;
flex-flow: row wrap;
.ffz--field {
margin-top: 0.5rem;
margin-left: 0.5rem;
width: 100%;
}
.ffz--field-inline {
flex: 1;
width: unset;
min-width: 150px;
}
}
.ffz--twitter-badge {
height: 1.2rem;
width: 1.2rem;
background: url('//cdn.frankerfacez.com/static/twitter_sprites.png');
display: inline-block;
margin: 2px 0 -1px 0.5rem;
&.ffz--twitter-badge__verified {
background-position: 0 -15px;
}
&.ffz--twitter-badge__translator {
background-position: -12px -15px;
}
&.ffz--twitter-badge__protected {
background-position: -24px -15px;
width: 1.4rem;
}
}
.ffz--rich-gallery {
position: relative;
text-align: center;
max-height: 350px;
display: grid;
grid-column: 1/2;
grid-template-columns: 1fr 1fr;
column-gap: 4px;
border-radius: 4px;
overflow: hidden;
&[data-items="1"] {
display: flex;
justify-content: center;
.ffz--gallery-column {
width: 100%;
}
}
.ffz--gallery-column {
display: flex;
flex-direction: column;
overflow: hidden;
margin-top: -4px;
max-height: calc(100% + 4px);
&:only-child {
grid-column-start: 1;
grid-column-end: 3;
img, video {
object-fit:contain;
}
.ffz-aspect { img, video { object-fit: cover; } }
}
> * {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin: 0;
padding: 0;
margin-top: 4px;
}
&[data-items="2"] > * {
min-height: calc(50% - 2px);
}
&[data-items="1"] > * {
min-height: 100%;
}
img, video {
height: 100%;
width: 100%;
object-fit: cover;
}
}
}
.ffz-badge {
display: inline-block;
min-width: 1.8rem;
height: 1.8rem;
margin: 0 .3rem .2rem 0;
background-position: center;
vertical-align: middle;
&.ffz-no-invert {
filter:none !important;
}
&.ffz-full-size {
min-width: 1.8rem;
height: 1.8rem;
margin: 0 .3rem .2rem 0;
border-radius: 0;
}
}
.ffz__tooltip .ffz-i-lock {
position: absolute;
bottom: 0; right: 0;
border-radius: .2rem;
font-size: 1rem;
background-color: rgba(0,0,0,0.5);
color: #fff;
}
.chat-line__message {
position: relative;
}
.ffz--modifier-actions {
position: absolute;
top: 0;
left: 0;
padding: .5rem 0;
z-index: 1;
background: rgba(255,255,255,0.5);
.dark-theme &,
.tw-root--theme-dark & {
background: rgba(0,0,0,0.5);
}
.ffz-mod-icon {
margin: 0 .5rem;
display: none;
}
.chat-line__message:hover & .ffz-hover {
display: inline-flex;
}
}
.ffz--keys {
&[data-ctrl="true"] .ffz-modifier-1,
&[data-shift="true"] .ffz-modifier-2,
&[data-shift="true"][data-ctrl="true"] .ffz-modifier-3,
&[data-alt="true"] .ffz-modifier-4,
&[data-alt="true"][data-ctrl="true"] .ffz-modifier-5,
&[data-alt="true"][data-shift="true"] .ffz-modifier-6,
&[data-alt="true"][data-ctrl="true"][data-shift="true"] .ffz-modifier-7,
&[data-meta="true"] .ffz-modifier-8,
&[data-meta="true"][data-ctrl="true"] .ffz-modifier-9,
&[data-meta="true"][data-shift="true"] .ffz-modifier-10,
&[data-meta="true"][data-shift="true"][data-ctrl="true"] .ffz-modifier-11,
&[data-meta="true"][data-alt="true"] .ffz-modifier-12,
&[data-meta="true"][data-alt="true"][data-ctrl="true"] .ffz-modifier-13,
&[data-meta="true"][data-alt="true"][data-shift="true"] .ffz-modifier-14,
&[data-meta="true"][data-alt="true"][data-ctrl="true"][data-shift="true"] .ffz-modifier-15 {
display: inline-flex;
}
}
.ffz--modifier-actions:empty {
display: none;
}
.ffz--favorite {
position: absolute;
bottom: 0; right: 0;
font-size: 1rem;
border-radius: .5rem;
color: gold;
background-color: rgba(0,0,0,0.5);
.ffz__tooltip & {
bottom: .1rem; right: .1rem;
padding: .2rem 0;
}
}
.modified-emote {
~ .chat-line__message--emote {
position: relative;
z-index: 1
}
position: relative;
z-index: 0;
span {
position: absolute;
top: -20px; bottom: -20px; left: -20px; right: -20px;
margin: auto;
pointer-events: none;
img {
position: absolute;
pointer-events: none !important;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}