CSS: chat buttons smaller when chat is open.
This commit is contained in:
parent
9b20042aad
commit
6c19f0a609
@ -18,8 +18,8 @@
|
|||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
background-color: var(--mainBackgroundColor);
|
background-color: var(--mainBackgroundColor);
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
min-height: 36px;
|
height: 36px;
|
||||||
min-width: 36px;
|
width: 36px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,6 +33,17 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.peertube-plugin-livechat-buttons-open .peertube-plugin-livechat-button {
|
||||||
|
margin: 1px;
|
||||||
|
height: 18px;
|
||||||
|
width: 18px;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.peertube-plugin-livechat-buttons-open .peertube-plugin-livechat-button-icon {
|
||||||
|
background-size: 16px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
[peertube-plugin-livechat-state="initializing"] {
|
[peertube-plugin-livechat-state="initializing"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -232,6 +232,13 @@ function register ({ registerHook, peertubeHelpers }: RegisterOptions): void {
|
|||||||
let savedMyPluginFlexGrow: string | undefined
|
let savedMyPluginFlexGrow: string | undefined
|
||||||
function hackStyles (on: boolean): void {
|
function hackStyles (on: boolean): void {
|
||||||
try {
|
try {
|
||||||
|
document.querySelectorAll('.peertube-plugin-livechat-buttons').forEach(buttons => {
|
||||||
|
if (on) {
|
||||||
|
buttons.classList.add('peertube-plugin-livechat-buttons-open')
|
||||||
|
} else {
|
||||||
|
buttons.classList.remove('peertube-plugin-livechat-buttons-open')
|
||||||
|
}
|
||||||
|
})
|
||||||
const myPluginPlaceholder: HTMLElement | null = document.querySelector('my-plugin-placeholder')
|
const myPluginPlaceholder: HTMLElement | null = document.querySelector('my-plugin-placeholder')
|
||||||
if (on) {
|
if (on) {
|
||||||
// Saving current style attributes and maximazing space for the chat
|
// Saving current style attributes and maximazing space for the chat
|
||||||
|
Loading…
x
Reference in New Issue
Block a user