Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Designing Character Sheet Layout"

From Roll20 Wiki

Jump to: navigation, search
m
m (update examples to be LCS+CSE compliant)
Line 4: Line 4:
 
This is a general guide to different approaches/methods you can use to create the general layout of your custom character sheets.
 
This is a general guide to different approaches/methods you can use to create the general layout of your custom character sheets.
  
{{orange| These tips & examples are made to work with [[Legacy Sheet]], so need adjustments to work with newer [[CSE]]-sheets. See the [[Character Sheet Enhancement]]-page for more info. [[User:1223200|1223200]] ([[User talk:1223200|talk]]) 16:21, 15 April 2021 (UTC)}}
+
{{orange| These tips & examples are made to work with [[Legacy Sheet]], but should now also work with [[CSE]]-sheets. See the [[Character Sheet Enhancement]]-page for more info. [[User:1223200|1223200]] ([[User:1223200|1223200]] ([[User talk:1223200|talk]]) 17:03, 23 May 2021 (UTC)}}
  
 
= Layout Types =
 
= Layout Types =
Line 19: Line 19:
 
{{ex}}
 
{{ex}}
 
<pre data-language="html">
 
<pre data-language="html">
<div class="grid-section">
+
<div class="sheet-grid-section">
 
   <span>1st span</span>
 
   <span>1st span</span>
 
   <span>2nd</span>
 
   <span>2nd</span>
Line 29: Line 29:
 
</pre>
 
</pre>
 
<pre data-language="css">
 
<pre data-language="css">
.sheet-grid-section{
+
.charsheet .sheet-grid-section{
 
   display: grid;
 
   display: grid;
 
   grid-template-columns: 600px 300px;
 
   grid-template-columns: 600px 300px;
Line 44: Line 44:
  
 
<pre data-language="html">
 
<pre data-language="html">
<div class="grid">
+
<div class="sheet-grid">
   <div class="item">
+
   <div class="sheet-item">
     <div class="subitem"></div>
+
     <div class="sheet-subitem"></div>
 
   </div>
 
   </div>
 
</div>
 
</div>
Line 52: Line 52:
  
 
<pre data-language="css">
 
<pre data-language="css">
.grid {
+
.charsheet .sheet-grid {
 
   display: grid;
 
   display: grid;
 
   grid-template-columns: repeat(9, 1fr);
 
   grid-template-columns: repeat(9, 1fr);
Line 58: Line 58:
 
}
 
}
  
.item {
+
.charsheet .sheet-item {
 
   display: grid;
 
   display: grid;
 
   grid-column: 2 / 7;
 
   grid-column: 2 / 7;
Line 66: Line 66:
 
}
 
}
  
.subitem {
+
.charsheet .sheet-subitem {
 
   grid-column: 3 / 6;
 
   grid-column: 3 / 6;
 
   grid-row: 1 / 3;
 
   grid-row: 1 / 3;
Line 82: Line 82:
  
 
<pre data-language="html">
 
<pre data-language="html">
<div class="flex-section">
+
<div class="sheet-flex-section">
 
   <span>1st</span>
 
   <span>1st</span>
 
   <span>2nd</span>
 
   <span>2nd</span>
Line 93: Line 93:
  
 
<pre data-language="css">
 
<pre data-language="css">
.sheet-flex-section{
+
.charsheet .sheet-flex-section{
 
   display: flex;
 
   display: flex;
 
   flex-direction: column;
 
   flex-direction: column;
Line 104: Line 104:
 
Good for basic layouts, but if you aim for a more complex layout/design, CSS Grid and CSS Flexbox is recommended.
 
Good for basic layouts, but if you aim for a more complex layout/design, CSS Grid and CSS Flexbox is recommended.
  
Roll20 provides a few basic classes you can use to organize things into a simple column-based layout. To use them, just create a div with a class of '3colrow', '2colrow', or 'row'. Then inside of that div, create a div for each column with a class of 'col'. For example, to create a 3-column layout, you would could:
+
Roll20 provides a few basic classes you can use to organize things into a simple column-based layout. To use them, just create a div with a class of 'sheet-3colrow', 'sheet-2colrow', or 'sheet-row'. Then inside of that div, create a div for each column with a class of 'sheet-col'. For example, to create a 3-column layout, you would could:
  
 
<pre data-language="html">
 
<pre data-language="html">
<div class='3colrow'>
+
<div class='sheet-3colrow'>
   <div class='col'>
+
   <div class='sheet-col'>
 
     <!-- Put the content for the first column here -->
 
     <!-- Put the content for the first column here -->
 
   </div>
 
   </div>
  
   <div class='col'>
+
   <div class='sheet-col'>
 
     <!-- Second column -->
 
     <!-- Second column -->
 
   </div>
 
   </div>
  
   <div class='col'>
+
   <div class='sheet-col'>
 
     <!-- Third column -->
 
     <!-- Third column -->
 
   </div>
 
   </div>
 
</div>
 
</div>
 
</pre>
 
</pre>
 +
 +
The it's not clear what the css for these are, so styling gets harder the more changes you try to make on how they look. It's better to switch to use Flexbox/CSS Grid eventually.
  
 
== HTML Table ==
 
== HTML Table ==

Revision as of 17:03, 23 May 2021

Character Sheet Creation
Getting Started


Reference


Tools & Tips


Git/GitHub GitHubLogo.png


Other

Main Article: Building Character Sheets

This is a general guide to different approaches/methods you can use to create the general layout of your custom character sheets.


Contents

Layout Types

The four main approaches/frameworks that people use for designing layouts on Roll20 character sheets.

CSS Grid

Many newer character sheet use CSS Grid for their layout, and is the recommended method doing the general layout of sections on a sheet. Aligning things in grid, columns is great, and you can create grids inside other grids.


Example:

<div class="sheet-grid-section">
  <span>1st span</span>
  <span>2nd</span>
  <span>3rd</span>
  <span>4th, stuff</span>
  <span>5th, other</span>
  <span>6th</span>
</div>
.charsheet .sheet-grid-section{
  display: grid;
  grid-template-columns: 600px 300px;
  grid-template-rows: 150px 150px 150px;
}

grid-template-areas can be used for naming sheet sections and then easily display in a human-readable way how each section is positioned in the grid. The drawback is that you can't have sections that overlap with each-other using this.

Subgrid

Subgrid is only available for Firefox, but when it's released for Chrome sheet design will get more easy as you can use the main grid lines in children, making it easier to align sub-components with main components of the sheet.

You can implement subgrid in sheets, and then create a fallback design, in case the browser doesn't support CSS Subgrid.

<div class="sheet-grid">
  <div class="sheet-item">
    <div class="sheet-subitem"></div>
  </div>
</div>
.charsheet .sheet-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(4, minmax(100px, auto));
}

.charsheet .sheet-item {
  display: grid;
  grid-column: 2 / 7;
  grid-row: 2 / 4;
  grid-template-columns: subgrid;
  grid-template-rows: repeat(3, 80px);
}

.charsheet .sheet-subitem {
  grid-column: 3 / 6;
  grid-row: 1 / 3;
}

CSS Flexbox

CSS Flexbox guide

Flexbox is a good way to align elements in rows or columns that flex and wraps around to new rows depending on the elements. Better than using the old float: right; method of aligning things. Some sheet authors use CSS Grid for bigger elements and gid-like sections of a sheet, while using Flexbox for smaller components in the sheet.

Flexbox Froggy is a great training game for learning about Flexbox.

<div class="sheet-flex-section">
  <span>1st</span>
  <span>2nd</span>
  <span>3rd</span>
  <span>4th</span>
  <span>5th</span>
  <span>6th</span>
</div>
.charsheet .sheet-flex-section{
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
}

Roll20 columns/rows

Good for basic layouts, but if you aim for a more complex layout/design, CSS Grid and CSS Flexbox is recommended.

Roll20 provides a few basic classes you can use to organize things into a simple column-based layout. To use them, just create a div with a class of 'sheet-3colrow', 'sheet-2colrow', or 'sheet-row'. Then inside of that div, create a div for each column with a class of 'sheet-col'. For example, to create a 3-column layout, you would could:

<div class='sheet-3colrow'>
  <div class='sheet-col'>
    <!-- Put the content for the first column here -->
  </div>

  <div class='sheet-col'>
    <!-- Second column -->
  </div>

  <div class='sheet-col'>
    <!-- Third column -->
  </div>
</div>

The it's not clear what the css for these are, so styling gets harder the more changes you try to make on how they look. It's better to switch to use Flexbox/CSS Grid eventually.

HTML Table

Using <table> is the fourth, and least recommended method, for designing basic sheet layout.

Many older sheet use HTML tables for layout, but it's harder to customize and adjust to looks of it compared to other methods, so it's generally not seen as a good idea for sheet layout.


Older sheets using tables do exist in the Roll20 character sheet repository, but they where created before the rule was set in place. These older sheets shouldn't be used as templates for your own designs, instead pick more recently created sheets, or some suggested here.

Pages

sheet with multiple pages/tabs

Example: Tabs

When trying to mimic the paper-version of the sheet, or the sheet starts to become too long, it's a good idea to split up content into separate tabs/pages, see Tabs.

The section above also show how you can hide areas with checkboxes, useful for temporally hiding/expanding some section for displaying more info.






Images

Main Article: Image use in character sheets

You'll likely want to use images to improve the looks of a sheet, and there are a few example of how to do so, like displaying a logo or having a nice background.

Sheet Templates

There exist a couple of character sheet templates that are intended as a starting point for character sheet creations.

See Also