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 "Character Sheet Enhancement"

From Roll20 Wiki

Jump to: navigation, search
m
(add info links, link formatting)
Line 2: Line 2:
 
{{main|Building Character Sheets}}
 
{{main|Building Character Sheets}}
  
{{notebox| Update is live as of '''March 9th 2021''', see '''{{forum|permalink/9883156/ Character Sheet Enhancements!}}''' for more info }}
+
cnotebox| Update is live as of '''March 9th 2021''', see '''{{forum|permalink/9883156/ Character Sheet Enhancements!}}''' for more info }}
  
'''Character Sheet Enhancement''' is an update to character sheets and how they are made, enabling many new features, and removing some existing restrictions sheet creators have had to deal with.  
+
'''Character Sheet Enhancement''' (or '''CSE''' for short) is an update to [[CS|character sheets]] and [[Building Character Sheets|how they are made]], enabling many new features, and removing some existing restrictions [[Sheet Author|sheet creators]] have had to deal with.  
  
  
Line 20: Line 20:
  
 
* HTML updates:
 
* HTML updates:
** Accessibility enhancements: ARIA and semantic HTML support
+
** Accessibility enhancements: [https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute ARIA] and [https://www.w3schools.com/html/html5_semantic_elements.asp semantic HTML] support
 
** No pre-pending of “sheet-” to classes
 
** No pre-pending of “sheet-” to classes
** Enable use of #id in HTML elements
+
** Enable use of [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id #id] in HTML elements
** Allowing the usage of HTML datalists – [https://app.roll20.net/forum/post/9624869/html5-datalist-for-character-sheets details]
+
** Allowing the usage of HTML [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist datalists] – {{forum|post/9624869/html5-datalist-for-character-sheets suggestion thread}}
** Allowing the usage of HTML <code><details></code> and <code><summary></code>-elements – [https://app.roll20.net/forum/post/9584382/add-html-tags-details-and-summary-to-whitelist-for-both-character-sheets-and-chat-formatting details]
+
** Allowing the usage of HTML <code><details></code> and <code><summary></code>-elements – {{forum|post/9584382/add-html-tags-details-and-summary-to-whitelist-for-both-character-sheets-and-chat-formatting suggestion thread}}  (part of semantic HTML support)
 
* The CSS sanitizer has been removed, which now allows for:
 
* The CSS sanitizer has been removed, which now allows for:
** Media queries that allow responsive design
+
** [https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries Media queries] that allow responsive design
** Sheet authors can now use the print media query to style their character sheet for printing from the popout window – [https://app.roll20.net/forum/post/1242365/print-character-sheets details]
+
** Sheet authors can now use <code>@media print</code> media query to style their character sheet for printing from the popout window- {{forum|post/1242365/print-character-sheets suggestion thread}}
** Support for CSS Animations – [https://app.roll20.net/forum/post/9664083/charactersheets-fixing-animation-keyframes-and-allowing details]
+
** Support for [https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations CSS Animations] – {{forum|post/9664083/charactersheets-fixing-animation-keyframes-and-allowing suggestion thread}}
 
* Integrated [[quickbar|macro bar]] for character quick attacks, including pop out windows
 
* Integrated [[quickbar|macro bar]] for character quick attacks, including pop out windows
 
* <strike>Character Sheet/Stat Block is the default for opening a PC/NPC</strike> This is being reverted until we have more research regarding implementation.
 
* <strike>Character Sheet/Stat Block is the default for opening a PC/NPC</strike> This is being reverted until we have more research regarding implementation.
Line 38: Line 38:
 
==CSE Examples==
 
==CSE Examples==
 
{{stub}}
 
{{stub}}
Collection of examples & usercases of some features. Please expand with code or links to examples/documentation.
+
Collection of examples, usercases or links to info of some of the new features. Please expand with code or links to examples/documentation.
===id's===
+
===ID===
 
+
Examples of using the HTML global element [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id #id].
 
====id CSS selector====
 
====id CSS selector====
 
Use an id to select one unique element. An id name cannot start with a number.
 
Use an id to select one unique element. An id name cannot start with a number.
Line 96: Line 96:
  
 
===Datalist===
 
===Datalist===
https://app.roll20.net/forum/post/9624869/html5-datalist-for-character-sheets
+
{{forum|post/9624869/html5-datalist-for-character-sheets suggestion thread}}
  
"Datalists are a helpful tool for sheet authors to guide players toward filling out input-fields. Datalists combines the precision of a dropdown-field with the flexibility of an input-field." -Peter B.
+
"[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist Datalists] are a helpful tool for sheet authors to guide players toward filling out input-fields. Datalists combines the precision of a dropdown-field with the flexibility of an input-field." -Peter B.
  
 
<pre data-language="html">
 
<pre data-language="html">
Line 123: Line 123:
 
</details>
 
</details>
 
</pre>
 
</pre>
 +
 +
===Accessability===
 +
Accessibility enhancements: [https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute ARIA] and [https://www.w3schools.com/html/html5_semantic_elements.asp semantic HTML] support
 +
 +
* https://www.w3.org/WAI/fundamentals/accessibility-intro/
 +
* https://developer.mozilla.org/en-US/docs/Web/Accessibility
 +
* https://www.w3schools.com/html/html_accessibility.asp
 +
 +
===Responsive Design===
 +
Aimed at making adjustment for [[mobile]]
 +
 +
* Our mobile app will be launching in the near future and we want character sheets to look beautiful on it!
 +
* We now support breakpoints, ID’s, and new HTML tags, all of which should help in your responsive sheet journey.
 +
* Here are some awesome articles on this topic:
 +
** https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Responsive_Design
 +
** https://www.w3schools.com/html/html_responsive.asp
 +
** https://www.w3schools.com/css/css_rwd_intro.asp
  
 
===Popup===
 
===Popup===
Line 129: Line 146:
 
https://codepen.io/imprakash/pen/GgNMXO
 
https://codepen.io/imprakash/pen/GgNMXO
  
 +
===Print-Friendly===
 +
{{forum|post/1242365/print-character-sheets suggestion thread}}
 +
[https://www.sitepoint.com/css-printer-friendly-pages/ Guide - How to Create Printer-friendly Pages with CSS]
 
=See Also=
 
=See Also=
 
* {{hc|articles/360061735034-iFrame-and-Sanitization-Changes iFrame-and-Sanitization-Changes}}
 
* {{hc|articles/360061735034-iFrame-and-Sanitization-Changes iFrame-and-Sanitization-Changes}}

Revision as of 15:31, 20 March 2021

Main Page: Building Character Sheets

cnotebox| Update is live as of March 9th 2021, see Character Sheet Enhancements!(Forum) for more info }}

Character Sheet Enhancement (or CSE for short) is an update to character sheets and how they are made, enabling many new features, and removing some existing restrictions sheet creators have had to deal with.


It was available on the Dev Server for testing During February, and fully released on March 9th 2021, then partially(?) rolled back little later due to some problems.

Contents

Info


Features

A summary of what updates the sheet system will have.

  • HTML updates:
    • Accessibility enhancements: ARIA and semantic HTML support
    • No pre-pending of “sheet-” to classes
    • Enable use of #id in HTML elements
    • Allowing the usage of HTML datalistssuggestion thread(Forum)
    • Allowing the usage of HTML <details> and <summary>-elements – suggestion thread(Forum) (part of semantic HTML support)
  • The CSS sanitizer has been removed, which now allows for:
  • Integrated macro bar for character quick attacks, including pop out windows
  • Character Sheet/Stat Block is the default for opening a PC/NPC This is being reverted until we have more research regarding implementation.

How to update sheet to new


CSE Examples


Collection of examples, usercases or links to info of some of the new features. Please expand with code or links to examples/documentation.

ID

Examples of using the HTML global element #id.

id CSS selector

Use an id to select one unique element. An id name cannot start with a number.

//html
<input type="text" id="character-name" name="attr_character_name" value="" placeholder="Character Name" />

//css
#character-name {
  text-align: center;
  color: red;
}

id Clickable Label text

Create "clickable" label text by using a linked label and input. Linked labels could replace various methods that use hidden checkboxes to simulate clickable text/buttons on a sheet.

//html
<input id="attackMod1" name="attr_attackMod1" type="checkbox" value="1" class="hidden">
<label for="attackMod1" class="link">Apply Modifier</label>
//css
.sheet-hidden {
    display:none;
}
label.link:hover {
  cursor: help;
  text-decoration: underline;
  color: red;
}
input[type="checkbox"]:checked + label.link {
  color: red;
}

id Sheet Anchors

Create links to jump to anchored elements of a sheet. Could be used as a "Navigational Menu/Table of Contents", or simply as clickable text that can quickly move to another section of a sheet.

//html
<h2>Sheet Anchor example</h2>
<h3 id="menu">Menu</h3>
<ul>
    <li><a href="#Attacks">Attacks</a></li>
    <li><a href="#Skills">Skills</a></li>
    <li><a href="#Spells">Spells</a></li>
</ul>
<h3 id="Attacks">Attacks</h3>
<p>"Lorem ipsum"</p>
<h3 id="Skills">Skills</h3>
<p>"Lorem ipsum"</p>
<h3 id="Spells">Spells</h3>
<p>"Lorem ipsum"</p>
<hr>
<p><a href="#menu">Menu</a></p>

Datalist

suggestion thread(Forum)

"Datalists are a helpful tool for sheet authors to guide players toward filling out input-fields. Datalists combines the precision of a dropdown-field with the flexibility of an input-field." -Peter B.

<input type="text" list="abilityScores" name="attr_abilityScore">
<datalist id="abilityScores">
    <option value="@{strength}">Strength</option>
    <option value="@{dexterity}">Dexterity</option>
    <option value="@{constitution}">Constitution</option>
    <option value="@{intelligence}">Intelligence</option>
    <option value="@{wisdom}">Wisdom</option>
    <option value="@{charisma}">Charisma</option>
</datalist>

<details>

A more simple way to create a collapsible section on a sheet than the old CSS tricks we have.

You have a <details> where everything is inside, and then the <summary>-element inside it determine what is shown when it's collapsed.

<details>
  <summary>Epcot Center</summary>
  <p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>

Accessability

Accessibility enhancements: ARIA and semantic HTML support

Responsive Design

Aimed at making adjustment for mobile

Popup

code snippet by Roll20 Dev exemplifying how popups can be implemented on sheets.

https://codepen.io/imprakash/pen/GgNMXO

Print-Friendly

suggestion thread(Forum) Guide - How to Create Printer-friendly Pages with CSS

See Also