Use .conversejs instead of .converse-root

as the class that designates standalone Converse components.
This commit is contained in:
JC Brand 2021-05-06 12:21:35 +02:00
parent dd609c1cec
commit fdc81fa4ea
33 changed files with 57 additions and 57 deletions

View File

@ -2,7 +2,7 @@
@import "bootstrap/scss/variables"; @import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins"; @import "bootstrap/scss/mixins";
.converse-root { .conversejs {
@import "bootstrap/scss/modal"; @import "bootstrap/scss/modal";
#converse-modals { #converse-modals {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
#controlbox { #controlbox {
.bookmarks-toggle, .bookmarks-toggle .fa { .bookmarks-toggle, .bookmarks-toggle .fa {
color: var(--groupchats-header-color) !important; color: var(--groupchats-header-color) !important;
@ -9,7 +9,7 @@
} }
} }
.converse-root.fullscreen { .conversejs.fullscreen {
#controlbox { #controlbox {
#chatrooms { #chatrooms {
.bookmarks-list { .bookmarks-list {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
converse-chats { converse-chats {
&.converse-chatboxes { &.converse-chatboxes {
z-index: 1031; // One more than bootstrap navbar z-index: 1031; // One more than bootstrap navbar

View File

@ -3,7 +3,7 @@
@import "bootstrap/scss/mixins"; @import "bootstrap/scss/mixins";
@import "shared/styles/_variables.scss"; @import "shared/styles/_variables.scss";
.converse-root { .conversejs {
.chatbox { .chatbox {
.bottom-panel { .bottom-panel {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
.chatbox { .chatbox {
.chat-head { .chat-head {
display: flex; display: flex;

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
.chatbox { .chatbox {
text-align: left; text-align: left;
margin: 0 var(--chat-gutter); margin: 0 var(--chat-gutter);

View File

@ -8,7 +8,7 @@
/* ******************* Overlay and embedded styles *************************** */ /* ******************* Overlay and embedded styles *************************** */
.converse-root { .conversejs {
converse-chats.converse-embedded, converse-chats.converse-embedded,
converse-chats.converse-overlayed { converse-chats.converse-overlayed {
.controlbox-head { .controlbox-head {
@ -80,7 +80,7 @@
} }
@include media-breakpoint-down(sm) { @include media-breakpoint-down(sm) {
.converse-root.converse-overlayed { .conversejs.converse-overlayed {
> .row { > .row {
flex-direction: column; flex-direction: column;
&.no-gutters { &.no-gutters {
@ -91,7 +91,7 @@
} }
.converse-root { .conversejs {
converse-chats.converse-embedded, converse-chats.converse-embedded,
converse-chats.converse-fullscreen { converse-chats.converse-fullscreen {
.flyout { .flyout {
@ -176,7 +176,7 @@
/* ******************* Fullpage styles *************************** */ /* ******************* Fullpage styles *************************** */
.converse-root { .conversejs {
converse-chats.converse-fullscreen { converse-chats.converse-fullscreen {
.chatbox-btn { .chatbox-btn {
font-size: var(--fullpage-chatbox-button-size); font-size: var(--fullpage-chatbox-button-size);
@ -216,7 +216,7 @@
@include media-breakpoint-down(sm) { @include media-breakpoint-down(sm) {
.converse-root { .conversejs {
converse-chats:not(.converse-embedded) { converse-chats:not(.converse-embedded) {
> .row { > .row {
flex-direction: row-reverse; flex-direction: row-reverse;

View File

@ -4,7 +4,7 @@
@import "shared/styles/_variables.scss"; @import "shared/styles/_variables.scss";
@import "shared/styles/_mixins.scss"; @import "shared/styles/_mixins.scss";
.converse-root { .conversejs {
.oauth-providers { .oauth-providers {
text-align: center; text-align: center;
.oauth-provider { .oauth-provider {
@ -387,7 +387,7 @@
} }
} }
.converse-root { .conversejs {
converse-chats { converse-chats {
&.converse-overlayed { &.converse-overlayed {
@ -612,7 +612,7 @@
@include media-breakpoint-down(sm) { @include media-breakpoint-down(sm) {
.converse-root { .conversejs {
left: 0; left: 0;
right: 0; right: 0;
padding-left: env(safe-area-inset-left); padding-left: env(safe-area-inset-left);

View File

@ -2,7 +2,7 @@
@import "bootstrap/scss/variables"; @import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins"; @import "bootstrap/scss/mixins";
.converse-root-bg { .conversejs-bg {
.subdued { .subdued {
opacity: 0.35; opacity: 0.35;
} }

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
.chat-head-headline { .chat-head-headline {
background-color: var(--headline-head-color); background-color: var(--headline-head-color);
} }
@ -31,7 +31,7 @@
} }
} }
.converse-root { .conversejs {
converse-chats { converse-chats {
&.converse-fullscreen { &.converse-fullscreen {
.chatbox.headlines { .chatbox.headlines {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
converse-chats { converse-chats {
&.converse-overlayed { &.converse-overlayed {
converse-minimized-chats { converse-minimized-chats {

View File

@ -13,8 +13,8 @@ converse-muc-destroyed {
height: 100%; height: 100%;
} }
.converse-root.converse-embedded, .conversejs.converse-embedded,
.converse-root { .conversejs {
.badge--muc { .badge--muc {
background-color: var(--groupchats-header-color); background-color: var(--groupchats-header-color);
} }
@ -30,7 +30,7 @@ converse-muc-destroyed {
/* ******************* Overlay styles *************************** */ /* ******************* Overlay styles *************************** */
.converse-root { .conversejs {
converse-chats { converse-chats {
&.converse-overlayed { &.converse-overlayed {
.chatbox { .chatbox {
@ -162,7 +162,7 @@ converse-muc-destroyed {
@include media-breakpoint-down(sm) { @include media-breakpoint-down(sm) {
.converse-root { .conversejs {
converse-chats.converse-mobile, converse-chats.converse-mobile,
converse-chats.converse-overlayed, converse-chats.converse-overlayed,
converse-chats.converse-fullscreen { converse-chats.converse-fullscreen {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
converse-muc.chatroom { converse-muc.chatroom {
converse-muc-bottom-panel { converse-muc-bottom-panel {
display: contents; display: contents;

View File

@ -3,7 +3,7 @@ converse-muc-config-form {
overflow: auto; overflow: auto;
} }
.converse-root { .conversejs {
.chatroom { .chatroom {
.box-flyout { .box-flyout {
.muc-form-container { .muc-form-container {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
converse-muc.chatroom { converse-muc.chatroom {
.chat-head-chatroom { .chat-head-chatroom {
color: var(--chatroom-head-color); color: var(--chatroom-head-color);

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
converse-muc.chatroom { converse-muc.chatroom {
.box-flyout { .box-flyout {
.occupants { .occupants {

View File

@ -4,7 +4,7 @@
@import "plugins/chatview/styles/chatbox.scss"; @import "plugins/chatview/styles/chatbox.scss";
@import "./muc-forms.scss"; @import "./muc-forms.scss";
.converse-root { .conversejs {
.chatroom { .chatroom {
width: var(--chatroom-width); width: var(--chatroom-width);
@media screen and (max-height: $mobile-landscape-height){ @media screen and (max-height: $mobile-landscape-height){

View File

@ -19,7 +19,7 @@ describe("The <converse-muc> component", function () {
await u.waitUntil(() => (model.session.get('connection_status') === converse.ROOMSTATUS.ENTERED)); await u.waitUntil(() => (model.session.get('connection_status') === converse.ROOMSTATUS.ENTERED));
const span_el = document.createElement('span'); const span_el = document.createElement('span');
span_el.classList.add('converse-root'); span_el.classList.add('conversejs');
span_el.classList.add('converse-embedded'); span_el.classList.add('converse-embedded');
const muc_el = document.createElement('converse-muc'); const muc_el = document.createElement('converse-muc');

View File

@ -18,7 +18,7 @@ class ConverseRoot extends CustomElement {
connectedCallback () { connectedCallback () {
super.connectedCallback(); super.connectedCallback();
this.classList.add('converse-root'); this.classList.add('conversejs');
this.classList.add(`converse-${api.settings.get('view_mode')}`); this.classList.add(`converse-${api.settings.get('view_mode')}`);
this.classList.add(`theme-${api.settings.get('theme')}`); this.classList.add(`theme-${api.settings.get('theme')}`);
this.setAttribute('id', 'conversejs'); this.setAttribute('id', 'conversejs');

View File

@ -1,4 +1,4 @@
.converse-root #converse-roster { .conversejs #converse-roster {
text-align: left; text-align: left;
width: 100%; width: 100%;
position: relative; position: relative;

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
[hidden] { display: none; } [hidden] { display: none; }
.visually-hidden { .visually-hidden {
@ -128,13 +128,13 @@
} }
} }
.converse-root.converse-fullscreen { .conversejs.converse-fullscreen {
.suggestion-box__results--above { .suggestion-box__results--above {
bottom: 4.5em; bottom: 4.5em;
} }
} }
.converse-root.converse-overlayed { .conversejs.converse-overlayed {
.suggestion-box__results--above { .suggestion-box__results--above {
bottom: 3.5em; bottom: 3.5em;
} }

View File

@ -2,7 +2,7 @@
@import "bootstrap/scss/variables"; @import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins"; @import "bootstrap/scss/mixins";
.converse-root { .conversejs {
@import "bootstrap/scss/media"; @import "bootstrap/scss/media";
.chatbox { .chatbox {
@ -192,7 +192,7 @@
} }
} }
.converse-root { .conversejs {
converse-chats { converse-chats {
&.converse-overlayed { &.converse-overlayed {
converse-emoji-dropdown { converse-emoji-dropdown {
@ -268,7 +268,7 @@
} }
@include media-breakpoint-up(m) { @include media-breakpoint-up(m) {
.converse-root { .conversejs {
.chatbox { .chatbox {
converse-emoji-picker { converse-emoji-picker {
max-width: 40em; max-width: 40em;

View File

@ -2,7 +2,7 @@
@import "bootstrap/scss/variables"; @import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins"; @import "bootstrap/scss/mixins";
.converse-root { .conversejs {
.send-button { .send-button {
border-radius: 0; border-radius: 0;

View File

@ -2,7 +2,7 @@
@import "bootstrap/scss/variables"; @import "bootstrap/scss/variables";
@import "shared/styles/_mixins.scss"; @import "shared/styles/_mixins.scss";
.converse-root { .conversejs {
@import "bootstrap/scss/card"; @import "bootstrap/scss/card";
.message { .message {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
bottom: 0; bottom: 0;
height: 100%; height: 100%;
position: fixed; position: fixed;
@ -447,7 +447,7 @@
font-size: 3.75em; font-size: 3.75em;
} }
} }
.converse-root:not(.converse-embedded) { .conversejs:not(.converse-embedded) {
.chatbox { .chatbox {
.chat-body { .chat-body {
border-radius: var(--chatbox-border-radius); border-radius: var(--chatbox-border-radius);
@ -461,33 +461,33 @@
@media screen and (min-width: 576px) { @media screen and (min-width: 576px) {
.converse-root .offset-sm-2 { .conversejs .offset-sm-2 {
margin-left: 16.666667%; margin-left: 16.666667%;
} }
} }
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
.converse-root .offset-md-2 { .conversejs .offset-md-2 {
margin-left: 16.666667%; margin-left: 16.666667%;
} }
.converse-root .offset-md-3 { .conversejs .offset-md-3 {
margin-left: 25%; margin-left: 25%;
} }
} }
@media screen and (min-width: 992px) { @media screen and (min-width: 992px) {
.converse-root .offset-lg-2 { .conversejs .offset-lg-2 {
margin-left: 16.666667%; margin-left: 16.666667%;
} }
.converse-root .offset-lg-3 { .conversejs .offset-lg-3 {
margin-left: 25%; margin-left: 25%;
} }
} }
@media screen and (min-width: 1200px) { @media screen and (min-width: 1200px) {
.converse-root .offset-xl-2 { .conversejs .offset-xl-2 {
margin-left: 16.666667%; margin-left: 16.666667%;
} }
} }
@media screen and (max-height: 450px) { @media screen and (max-height: 450px) {
.converse-root { .conversejs {
left: 0; left: 0;
} }
} }

View File

@ -1,7 +1,7 @@
$mobile_landscape_height: 450px !default; $mobile_landscape_height: 450px !default;
$mobile_portrait_length: 480px !default; $mobile_portrait_length: 480px !default;
.converse-root, .converse-root-bg, body.converse-fullscreen { .conversejs, .conversejs-bg, body.converse-fullscreen {
--subdued-color: #A8ABA1; --subdued-color: #A8ABA1;
--green: #3AA569; --green: #3AA569;
@ -193,7 +193,7 @@ $mobile_portrait_length: 480px !default;
--list-dot-circle-color: #f6dec1; // lighten($orange, 25%) --list-dot-circle-color: #f6dec1; // lighten($orange, 25%)
} }
.converse-root.theme-concord { .conversejs.theme-concord {
--avatar-border-radius: 10%; --avatar-border-radius: 10%;
--avatar-border: 0px; --avatar-border: 0px;
--avatar-background-color: none; --avatar-background-color: none;

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
@import "bootstrap/scss/badge"; @import "bootstrap/scss/badge";
.badge { .badge {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
@import "bootstrap/scss/buttons"; @import "bootstrap/scss/buttons";
@import "bootstrap/scss/button-group"; @import "bootstrap/scss/button-group";

View File

@ -64,7 +64,7 @@
@import "@fortawesome/fontawesome-free/scss/icons"; @import "@fortawesome/fontawesome-free/scss/icons";
@import "@fortawesome/fontawesome-free/scss/screen-reader"; @import "@fortawesome/fontawesome-free/scss/screen-reader";
.converse-root, .converse-website { .conversejs, .converse-website {
/* Apparent font-awesome bug? The circle has some kind of bottom margin */ /* Apparent font-awesome bug? The circle has some kind of bottom margin */
converse-icon:before { converse-icon:before {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
@import "bootstrap/scss/forms"; @import "bootstrap/scss/forms";
@import "bootstrap/scss/input-group"; @import "bootstrap/scss/input-group";
@import "bootstrap/scss/custom-forms"; @import "bootstrap/scss/custom-forms";

View File

@ -11,7 +11,7 @@
@import "./font-awesome.scss"; @import "./font-awesome.scss";
@import "mixins"; @import "mixins";
.converse-root { .conversejs {
@import "bootstrap/scss/root"; @import "bootstrap/scss/root";
@import "bootstrap/scss/reboot"; @import "bootstrap/scss/reboot";
@import "bootstrap/scss/type"; @import "bootstrap/scss/type";

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
@import "bootstrap/scss/list-group"; @import "bootstrap/scss/list-group";
.list-group-item.active { .list-group-item.active {

View File

@ -1,4 +1,4 @@
.converse-root { .conversejs {
.styling-directive { .styling-directive {
color: var(--subdued-color); color: var(--subdued-color);
} }