continue adding static classes

This commit is contained in:
Er2 2022-08-07 17:20:53 +03:00
parent 8d79da2202
commit 5b91f8f843
4 changed files with 122 additions and 86 deletions

View File

@ -1,26 +1,73 @@
// BetterDiscord specific things
div[class^="bd-"]
.bd-button, .bd-search-wrapper,
.bd-changlelog-button, .bd-select-options,
#bd-pub-button,
{ &:extend(.round); }
div.bd-search-wrapper,
div.bd-changelog-button {
.bd-notice, .bd-toast,
{ &:extend(.rounder); }
.bd-toasts {
align-items: flex-end;
width: calc(100% - @roundest) !important;
left: 0 !important;
}
.bd-select-options {
max-width: max-content !important;
}
.bd-search-wrapper,
.bd-changelog-button {
align-self: center;
margin: 0;
margin-right: 8px;
}
div[class^="standardSidebarView-"] {
div.bd-controls {
column-gap: (@round / 2);
}
.butn(@norm, @hov) {
svg { background: @norm; }
&:hover svg { background: @hov; }
}
.floating-window {
max-width: 100% !important;
max-height: 100% !important;
.floating-window-buttons {
.button {
&:hover {
background: none;
}
svg {
color: #000;
&:extend(.round);
}
&.maximize-button {
.butn(#aaaa00, #eeee00);
}
&.close-button {
.butn(#aa0000, #ee0000);
}
}
}
&:extend(.round);
}
div.standardSidebarView-E9Pc3j {
// PluginRepo and ThemeRepo
div[class^="repoList-"] > div {
div.repoList-9JnAPs > div {
position: absolute;
width: 100%;
div[class^="repoHeader-"] {
div.repoHeader-2KfNvH {
& > * {
max-width: unset;
}
div[class^="tabBar-"] {
div.tabBar-2hXqzU {
height: 48px;
}
}
@ -32,6 +79,3 @@ div[class^="standardSidebarView-"] {
}
}
div.bd-addon-list:not(.bd-grid-view) {
.horiz-tab();
}

View File

@ -44,7 +44,7 @@
vertical-align: top;
}
.horiz-tab(@cols: 2) {
.horiz-tab(@cols: 2, @div: ~'.divider-_0um2u') {
@gap: @div-width * 2;
@el-width: calc(100% / @cols - @gap);
display: flex;
@ -55,8 +55,8 @@
width: @el-width;
}
div[class^="divider"]:empty {
display: none;
@{div}:empty {
&:extend(.hide);
}
}

View File

@ -1,21 +1,21 @@
[class^="membersGroup-"] // groups (roles)
.membersGroup-2eiWxl // groups (roles)
{ &:extend(.hide); }
[class^="membersWrap-"] {
.membersWrap-3NUR2t {
// make it shorter
&, div[class^="members-"] {
&, div.members-3WRCEx {
min-width: 48px;
width: 0;
}
// remove fixed height
div[class^="content-"] {
div.content-2a4AW9 {
height: unset !important;
flex-grow: 0;
}
div[class^="member-"] {
div.member-2gU6Ar {
padding: 0;
margin-left: 0;
}

View File

@ -1,20 +1,19 @@
div[class^="keybind-"], // true must know it!
[class*="socialLink-"], // in change log
div[class^="socialLinks-"], // in settings at bottom
div.keybind-13vtq8, // true must know it!
div.socialLinks-3ywLUf, // in settings at end
{ &:extend(.hide); }
// New sidebar in settings
div[class^="standardSidebarView-"] {
div.standardSidebarView-E9Pc3j {
flex-direction: column;
div[class^="sidebarRegion-"] {
div.sidebarRegion-1VBisG {
overflow: hidden;
flex-basis: unset; // bugfix to normalize height
flex-grow: 0; // fix scaling
div[class^="header-"],
div[class^="separator-"]
div.header-2Kx1US,
div.separator-2wx7h6
{ display: none; }
& > div {
@ -37,7 +36,7 @@ div[class^="standardSidebarView-"] {
}
}
div[class^="contentRegion-"] {
div.contentRegion-3HkfJJ {
overflow-y: auto;
scrollbar-width: thin;
@ -70,18 +69,10 @@ div[aria-controls="partner-tab"],
}
// TrY AnImAtEd AvAtAr, eh... f you
[class^="optionBox-"]:nth-child(2)
div.optionBox-1UOevl:nth-child(2)
{ &:extend(.nitro); }
#profile-customization-tab {
div.tabBar-2WK2Dm {
&:extend(.nitro);
+ * {
margin-top: 16px;
}
}
div.baseLayout-8AMrwn {
& > div:not([class]) {
width: 100%;
@ -93,7 +84,7 @@ div[aria-controls="partner-tab"],
}
}
div[class^="bioTextArea-"] {
div.bioTextArea-dDGOeC {
height: 30vh;
}
}
@ -122,38 +113,38 @@ div[aria-controls="partner-tab"],
}
}
#connections-tab div[class^="children-"] {
#connections-tab div.children-1xdcWE {
flex-direction: row;
flex-flow: row wrap;
div[class^="accountList-"] {
div.accountList-Wii_T5 {
margin-right: @div-width;
width: 33%;
height: 100%; // decreases height? 0_0
// auto detect
& + div[class^="container-"] {
& + div.container-1zDvAE {
order: -1;
width: 100%;
}
}
div[class^="connectionList-"] {
div.connectionList-11Q_X- {
flex-grow: 1;
}
}
#appearance-tab div[class^="children-"] {
#appearance-tab div.children-1xdcWE {
.horiz-tab();
& > div:first-child {
width: 100%;
}
div[class^="marginTop20-"] > div[class^="slider-"] {
div.marginTop20-2T8ZJx > div.slider-1NC-Gf {
margin-top: 28px;
}
}
#accessibility-tab div div[class^="children-"] {
#accessibility-tab div.children-1xdcWE {
& > div {
&:nth-child(2),
&:nth-child(3),
@ -167,18 +158,18 @@ div[aria-controls="partner-tab"],
}
}
#notifications-tab div[class^="children"] {
#notifications-tab div.children-1xdcWE {
div:nth-child(6)
{ &:extend(.hide); }
}
#language-tab div[class^="children-"] {
#language-tab div.children-1xdcWE {
div div > div[role="radiogroup"] {
.horiz-tab(3);
}
}
#streamer-mode-tab div[class^="children-"] {
#streamer-mode-tab div.children-1xdcWE {
.horiz-tab();
& > * {
&:nth-child(1),
@ -190,7 +181,7 @@ div[aria-controls="partner-tab"],
}
// Server settings
#overview-tab div[class^="children-"] > div {
#overview-tab > div > div.children-1xdcWE > div {
// system messages
&:nth-child(3) {
.horiz-tab();
@ -211,17 +202,49 @@ div[aria-controls="partner-tab"],
// nitro features
&:nth-child(5) > div > div:last-child {
.horiz-tab(3);
& > * {
div.divider--oiTeJ {
padding: 0;
margin: 0;
border: none;
}
& > div:first-child div[class^="flexChild-"]
{ display: none; }
& > div:first-child div.flexChild-3PzYmX
{ &:extend(.hide); }
}
}
#moderation-tab div[class^="children-"] {
#integrations-tab > div:nth-child(2) {
.horiz-tab();
img.iconWrapper-1sOtkE {
width: unset;
}
button[class^="createButton-"],
[class^="sectionHeader-"],
& > div:first-child {
width: 100%;
margin-bottom: @div-width * 3;
}
}
#widget-tab div.children-1xdcWE {
&, & > div.infoWrapper-1HtsGy {
.horiz-tab();
row-gap: @gap * 2;
}
img.infoItem-Q4HWUe
{ &:extend(.hide); }
div.infoItem-Q4HWUe,
& > div:first-child,
& > div:last-child {
width: 100%;
flex-basis: unset;
}
}
#moderation-tab > div > div.children-1xdcWE {
div[role="radiogroup"] {
.horiz-tab();
}
@ -234,45 +257,14 @@ div[data-list-id="audit-log"] {
}
}
#integrations-tab > div:nth-child(2) {
.horiz-tab();
img[class^="iconWrapper-"] {
width: unset;
}
button[class^="createButton-"],
[class^="sectionHeader-"],
& > div:first-child {
width: 100%;
margin-bottom: @div-width * 3;
}
}
#widget-tab div[class^="children-"] {
&, & > div[class^="infoWrapper-"] {
.horiz-tab();
row-gap: @gap * 2;
}
img[class^="infoItem-"]
{ display: none; }
div[class^="infoItem-"],
& > div:first-child,
& > div:last-child {
width: 100%;
flex-basis: unset;
}
}
#community-tab > div[class^="container-"] {
& > div[class^="banner-"]
#community-tab > div.container-2CHEay {
& > div.banner-3-oqyl
{ &:extend(.hide); }
}
#discovery-tab > div[class^="container-"] {
#discovery-tab > div.container-26RXEg {
.horiz-tab();
// disabledButtonWrapper-2Oz3aY
span[class*="Button"] {
align-self: start;
}