[CSS] Rewrite (again)

pull/50/head
Oj18 3 years ago
parent 4d2163e472
commit 746fb25d56

@ -1,14 +1,20 @@
import { resolve } from 'path';
import { readdirSync } from 'fs';
// Rollup plugins
import localResolve from 'rollup-plugin-local-resolve';
import { terser } from 'rollup-plugin-terser';
import postcss from 'rollup-plugin-postcss';
import serve from 'rollup-plugin-serve';
// PostCSS plugins
import pcImport from 'postcss-import';
const prod = !process.env.ROLLUP_WATCH;
// Custom plugins
import goosemod from './building/rollup-plugin-gm/index';
const prod = !process.env.ROLLUP_WATCH;
export default [
{
@ -40,7 +46,16 @@ export default [
sourceMap: !prod,
plugins: [
pcImport()
pcImport({
resolve: (id, base, opts) => { // Resolve for @import
if (id.endsWith('/')) { // Directory resolving, eg: test/ imports all css files in test dir
const dir = resolve(base, id);
return readdirSync(dir).filter((x) => x.split('.').pop().startsWith('css')).map((x) => resolve(dir, x));
}
return resolve(base, id);
},
})
]
}),

@ -1,6 +1,6 @@
@import "settings.css";
@import "ootb.css";
@import "repoModal.css";
@import "settings/";
@import "ootb/";
@import "store/";
@import "errorBoundary.css";
@import "discordFixes.css";
@import "sponsorModal.css";

@ -1,20 +1,3 @@
/* OOTB */
.gm-modules-preview .guildIcon-cyDh6h {
display: none;
}
.gm-modules-preview .cardHeader-2XrQbx {
margin-bottom: 12px;
}
.gm-modules-preview .card-3_CqkU {
background-color: var(--background-tertiary);
}
.gm-ootb-modal {
width: 600px;
}
.gm-highlight #app-mount::after {
display: block;
content: '';

@ -0,0 +1,3 @@
.gm-ootb-modal {
width: 600px;
}

@ -0,0 +1,11 @@
.gm-modules-preview .guildIcon-cyDh6h {
display: none;
}
.gm-modules-preview .cardHeader-2XrQbx {
margin-bottom: 12px;
}
.gm-modules-preview .card-3_CqkU {
background-color: var(--background-tertiary);
}

@ -1,41 +1,3 @@
#gm-settings-inject > div, .gm-store-settings {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: center;
}
.gm-store-settings > h1 {
flex-basis: 100%;
}
.gm-inline-dropdown {
display: flex;
align-items: center;
margin-left: 12px;
}
.gm-inline-dropdown > .select-2TCrqx {
width: 120px;
margin-left: 8px;
}
.gm-store-search {
flex-grow: 1;
margin-right: 12px;
}
.gm-store-header {
margin-bottom: 0;
width: 100%;
max-width: 100%;
}
.gm-store-card {
box-shadow: var(--elevation-medium);
background-color: var(--background-secondary);
@ -185,129 +147,4 @@
.gm-store-card > :nth-child(6) > :nth-child(3).hide-toggle {
display: none !important;
}
/* Mini cards (profile store) */
.gm-store-card-mini {
width: 100%;
height: 74px;
}
.gm-store-card-mini > :nth-child(1) {
background-color: unset;
right: 0px;
position: absolute;
width: 120px;
border-radius: 0 8px 8px 0;
height: 100%;
}
.gm-store-card-mini > :nth-child(3) {
margin-top: 0;
}
.gm-store-card-mini > :nth-child(4) {
-webkit-line-clamp: 1;
width: 75%;
}
.gm-store-card-mini > :nth-child(2), .gm-store-card-mini > :nth-child(5), .gm-store-card-mini > :nth-child(6) {
display: none;
}
.gm-modules-container {
display: flex;
grid-template-columns: none;
flex-flow: row wrap;
justify-content: center;
}
.gm-store-category {
width: 100%;
}
.gm-store-category > :nth-child(2) {
display: grid;
overflow-x: scroll;
grid-template-columns: repeat(auto-fill, 350px);
grid-auto-flow: column;
width: 100%;
}
.gm-store-loading-container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.gm-store-author-pfp {
display: inline;
border-radius: 50%;
margin-right: 5px;
vertical-align: bottom;
}
.gm-store-author-name {
line-height: 32px;
}
.gm-settings-note-markdown {
font-size: inherit;
color: inherit !important;
}
.gm-settings-note-markdown .paragraph-3Ejjt0 {
margin: 0;
}
.gm-settings-label-icon {
vertical-align: sub;
}
.gm-settings-label-text {
vertical-align: top;
margin-left: 6px;
}
.gm-settings-header-collapser {
margin-top: -3px;
float: right;
width: 22px;
height: 22px;
}
.gm-settings-header-collapser.collapsed {
transform: rotate(-90deg);
}
/* Store image carousel */
.gm-carousel-modal {
background-color: var(--background-primary);
border-radius: 6px;
padding: 12px;
pointer-events: all;
}
.gm-carousel-modal .outer-s4sY2_ {
width: 50vw;
height: 30vw;
padding-top: 0 !important;
background-color: var(--background-secondary-alt);
}
.gm-carousel-modal .root-3tU4d2 {
background-color: unset;
}
.gm-carousel-modal .smallCarouselImage-2Qvg9S {
cursor: default;
}

@ -0,0 +1,11 @@
#gm-settings-inject > div, .gm-store-settings {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: center;
}
.gm-store-settings > h1 {
flex-basis: 100%;
}

@ -0,0 +1,11 @@
.gm-inline-dropdown {
display: flex;
align-items: center;
margin-left: 12px;
}
.gm-inline-dropdown > .select-2TCrqx {
width: 120px;
margin-left: 8px;
}

@ -0,0 +1,28 @@
.gm-settings-note-markdown {
font-size: inherit;
color: inherit !important;
}
.gm-settings-note-markdown .paragraph-3Ejjt0 {
margin: 0;
}
.gm-settings-label-icon {
vertical-align: sub;
}
.gm-settings-label-text {
vertical-align: top;
margin-left: 6px;
}
.gm-settings-header-collapser {
margin-top: -3px;
float: right;
width: 22px;
height: 22px;
}
.gm-settings-header-collapser.collapsed {
transform: rotate(-90deg);
}

@ -0,0 +1,11 @@
.gm-store-category {
width: 100%;
}
.gm-store-category > :nth-child(2) {
display: grid;
overflow-x: scroll;
grid-template-columns: repeat(auto-fill, 350px);
grid-auto-flow: column;
width: 100%;
}

@ -0,0 +1,6 @@
.gm-store-header {
margin-bottom: 0;
width: 100%;
max-width: 100%;
}

@ -0,0 +1,5 @@
.gm-store-search {
flex-grow: 1;
margin-right: 12px;
}

@ -0,0 +1,10 @@
.gm-store-author-pfp {
display: inline;
border-radius: 50%;
margin-right: 5px;
vertical-align: bottom;
}
.gm-store-author-name {
line-height: 32px;
}

@ -0,0 +1,24 @@
.gm-carousel-modal {
background-color: var(--background-primary);
border-radius: 6px;
padding: 12px;
pointer-events: all;
}
.gm-carousel-modal .outer-s4sY2_ {
width: 50vw;
height: 30vw;
padding-top: 0 !important;
background-color: var(--background-secondary-alt);
}
.gm-carousel-modal .root-3tU4d2 {
background-color: unset;
}
.gm-carousel-modal .smallCarouselImage-2Qvg9S {
cursor: default;
}

@ -0,0 +1,6 @@
.gm-store-loading-container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}

@ -0,0 +1,34 @@
/* Mini cards (profile store) */
.gm-store-card-mini {
width: 100%;
height: 74px;
}
.gm-store-card-mini > :nth-child(1) {
background-color: unset;
right: 0px;
position: absolute;
width: 120px;
border-radius: 0 8px 8px 0;
height: 100%;
}
.gm-store-card-mini > :nth-child(3) {
margin-top: 0;
}
.gm-store-card-mini > :nth-child(4) {
-webkit-line-clamp: 1;
width: 75%;
}
.gm-store-card-mini > :nth-child(2), .gm-store-card-mini > :nth-child(5), .gm-store-card-mini > :nth-child(6) {
display: none;
}
.gm-modules-container {
display: flex;
grid-template-columns: none;
flex-flow: row wrap;
justify-content: center;
}
Loading…
Cancel
Save