Skip to content

Commit

Permalink
fix: adds more css vars
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Nov 8, 2022
1 parent 926b6e8 commit 68ad4e1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
13 changes: 12 additions & 1 deletion src/main.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
:root {
--statblock-primary-color: #7a200d;
--statblock-rule-color: #922610;
--statblock-bar-color: #e69a28;
--statblock-background-color: #fdf1dc;

--statblock-bar-color: #e69a28;
--statblock-bar-border-size: 1px;
--statblock-bar-border-color: #000;

--statblock-image-width: 75px;
--statblock-image-height: 75px;
--statblock-image-border-size: 2px;
Expand Down Expand Up @@ -31,6 +34,12 @@
--statblock-heading-font-size: 23px;
--statblock-heading-font-variant: small-caps;
--statblock-heading-font-weight: var(--statblock-font-weight);
--statblock-heading-line-height: inherit;

--statblock-property-line-height: 1.4;
--statblock-property-font-color: var(--statblock-font-color);
--statblock-property-name-font-color: var(--statblock-font-color);
--statblock-property-name-font-weight: bold;

--statblock-section-heading-border-size: 1px;
--statblock-section-heading-border-color: var(--statblock-primary-color);
Expand All @@ -39,6 +48,8 @@
--statblock-section-heading-font-variant: small-caps;
--statblock-section-heading-font-weight: normal;

--statblock-saves-line-height: 1.4;

--statblock-spells-font-style: italic;

--statblock-subheading-font-size: 12px;
Expand Down
3 changes: 2 additions & 1 deletion src/view/ui/Bar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
.bar {
height: 5px;
background: var(--statblock-bar-color);
border: 1px solid #000;
border: var(--statblock-bar-border-size) solid
var(--statblock-bar-border-color);
z-index: 1;
width: auto;
}
Expand Down
1 change: 1 addition & 0 deletions src/view/ui/Heading.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
display: flex;
justify-content: space-between;
align-items: center;
line-height: var(--statblock-heading-line-height);
}
</style>
7 changes: 4 additions & 3 deletions src/view/ui/PropertyLine.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@

<style>
.line {
line-height: 1.4;
line-height: var(--statblock-property-line-height);
display: block;
color: var(--statblock-font-color);
color: var(--statblock-property-font-color);
}
.property-name {
margin: 0;
margin-right: 0.25em;
display: inline;
font-weight: bold;
color: var(--statblock-property-name-font-color);
font-weight: var(--statblock-property-name-font-weight);
}
</style>
2 changes: 1 addition & 1 deletion src/view/ui/Saves.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<style>
.line {
line-height: 1.4;
line-height: var(--statblock-saves-line-height);
display: block;
color: var(--statblock-font-color);
}
Expand Down

0 comments on commit 68ad4e1

Please sign in to comment.