Tweak how the SCSS is being compiled / structured

This commit is contained in:
Oliver-Akins 2023-11-25 21:41:31 -07:00
parent 89ccb742f8
commit 93b55df045
13 changed files with 200 additions and 116 deletions

View file

@ -1,5 +0,0 @@
@mixin sr-only {
width: 1px;
height: 1px;
position: absolute;
}

View file

@ -1,101 +1,3 @@
@use "./vars/_colours.scss" as *;
@use "./vars/index" as *;
.dotdungeon {
container-type: size;
&.actor {
&--pc {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
.panel {
&--avatar {
grid-row: 1 / span 2;
}
&--stats {
grid-column: 2 / span 2;
}
&--skills {
grid-column: 2 / span 2;
}
&--backpack {
grid-row: 3 / span 5;
}
&--sync {}
&--aspect {
grid-row: span 2;
}
&--weapons {
grid-row: span 2;
}
&--roles {
grid-row: span 3;
}
&--spells {
grid-row: span 2;
}
&--mounts {}
&--summons {}
&--notes {}
&--storage {}
}
}
}
.panel {
background: white;
border: 2px solid black;
&__header {
background: black;
color: white;
display: flex;
flex-direction: row;
h2 {
flex-grow: 1;
}
.icon {
$size: 32px;
height: $size;
width: $size;
aspect-ratio: 1;
}
}
}
}
@container (max-width: $breakpoint-medium) {
.dotdungeon {
&.actor {
&--pc {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
}
}
}
}
@container (max-width: $breakpoint-small) {
.dotdungeon {
&.actor {
&--pc {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
}
}
}
}
@container (max-width: $breakpoint-extra-small) {
.dotdungeon {
&.actor {
&--pc {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
}
}
}
}
@import "./sheets/actor/mvp.scss";

View file

@ -0,0 +1,96 @@
@use "../../vars/index" as *;
@use "../../vars/fonts.scss" as *;
.dotdungeon {
container-type: size;
&.actor--pc {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(8, minmax(0, 1fr));
gap: 4px;
.panel {
&--avatar {
grid-row: 1 / span 2;
}
&--stats {
grid-column: 2 / span 2;
}
&--skills {
grid-column: 2 / span 2;
}
&--backpack {
grid-row: 3 / span 5;
}
&--sync {}
&--aspect {
grid-row: span 2;
}
&--weapons {
grid-row: span 2;
}
&--roles {
grid-row: span 3;
}
&--spells {
grid-row: span 2;
}
&--mounts {}
&--summons {}
&--notes {}
&--storage {}
}
}
.panel {
border: 2px solid black;
&__header {
background: black;
color: white;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 4px;
h2 {
all: initial;
color: inherit;
flex-grow: 1;
padding-left: 8px;
font-family: $title-font;
font-size: 20px;
}
.icon {
$size: 32px;
height: $size;
width: $size;
aspect-ratio: 1;
}
}
}
}
@container (max-width: $breakpoint-medium) {
.dotdungeon.actor--pc {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
}
}
@container (max-width: $breakpoint-small) {
.dotdungeon.actor--pc {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
}
}
@container (max-width: $breakpoint-extra-small) {
.dotdungeon.actor--pc {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(12, minmax(0, 1fr));
}
}

3
styles/vars/_index.scss Normal file
View file

@ -0,0 +1,3 @@
@use "./breakpoints";
@use "./colours";
@use "./fonts";

3
styles/vars/fonts.scss Normal file
View file

@ -0,0 +1,3 @@
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap');
$title-font: 'Pixelify Sans', sans-serif;