Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Firefox compatibility

1488748728
Falcon
Pro
Sheet Author
I was wanting to know from my fellow sheet designers if they designed their character sheet around Firefox compatibility?  There are several things I can't get to work with firefox vs Chrome.
1488766784
plexsoup
Marketplace Creator
Sheet Author
API Scripter
I just recently had to fix a bunch of Firefox problems, related to tabs and hidden checkboxes. It was a Royal pain, and maybe not worth bothering. What's giving you troubles?
1488773985
Falcon
Pro
Sheet Author
Exactly that - Debating whether I want to spend the time to make it work for Firefox.
1488776219

Edited 1488776572
plexsoup
Marketplace Creator
Sheet Author
API Scripter
The problem was: Firefox doesn't render content for checkboxes, so your :before won't work. The solution is to put a span after the checkbox and manipulate that instead. I also wrapped the whole thing in a div, so I'd have more control. (disclaimer: I typed this on a tablet and didn't check spelling. So it may not work. But it should give you the idea.) &lt;div class="sheet-myCheckboxWidgetContainer"&gt; &nbsp; &lt;input type="checkbox"/&gt;&lt;span title="My Hidden Checkbox"&gt;&lt;/span&gt;&lt;span&gt;Hidden Content&lt;/span&gt; &lt;/div&gt; ----------- div.sheet-myCheckboxWidgetContainer { &nbsp; &nbsp;position: relative; } div.sheet-myCheckboxWidgetContainer input[type=checkbox] { &nbsp; &nbsp;position: absolute; &nbsp; left: 0; &nbsp; z-index: 1; } div.sheet-myCheckboxWidgetContainer span { &nbsp; position: absolute; &nbsp; left:0; &nbsp; z-index: 2; &nbsp; pointer-events: none; &nbsp; &nbsp;display: inline-block; } div.sheet-myCheckboxWidgetContainer input[type=checkbox] + span:before { &nbsp; &nbsp;content: attr(title); } div.sheet-myCheckboxWidgetContainer input[type=checkbox]:not(:checked) + span + span { &nbsp; &nbsp;display: none; } div.sheet-myCheckboxWidgetContainer input[type=checkbox]:checked + span + span { &nbsp; display: inline-block; } ------------- Here's the commit where I fixed some of my Firefox problems for The Veil <a href="https://github.com/Roll20/roll20-character-sheets/" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/</a>...
1488780421
Falcon
Pro
Sheet Author
My issue is mainly around tabs - what did you do to show the tabs.
1488787449

Edited 1488798651
plexsoup
Marketplace Creator
Sheet Author
API Scripter
If you decide to enclose the "tab" radio buttons in divs, then for each radio, you need a matching hidden checkbox at the top of the document hierarchy (or at least somewhere before the hidden sections). Then you can test against the checkbox to reveal the contents of the hidden section. Here's one you can play with: HTML &lt;div class="sheet-container"&gt; &lt;input type="checkbox" name="attr_selectedTab" class="sheet-HiddenCheckbox" value="Tab1"/&gt; &lt;input type="checkbox" name="attr_selectedTab" class="sheet-HiddenCheckbox" value="Tab2"/&gt; &lt;input type="checkbox" name="attr_selectedTab" class="sheet-HiddenCheckbox" value="Tab3"/&gt; &lt;div class="sheet-tabs"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="sheet-tab-widget-container"&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;input type="radio" name="attr_selectedTab" value="Tab1" /&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span title="Tab One"&gt;&lt;/span&gt; &nbsp; &nbsp; &lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="sheet-tab-widget-container"&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;input type="radio" name="attr_selectedTab" value="Tab2" /&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span title="Tab Two"&gt;&lt;/span&gt; &nbsp; &nbsp; &lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="sheet-tab-widget-container"&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;input type="radio" name="attr_selectedTab" value="Tab3" /&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span title="Tab Three"&gt;&lt;/span&gt; &nbsp; &nbsp; &lt;/div&gt; &nbsp; &nbsp; &lt;/div&gt; &nbsp; &nbsp; &lt;div class="sheet-tabContents"&gt; &nbsp; &nbsp; &lt;div class="sheet-tab1-Content"&gt; &nbsp; &nbsp; Tab 1 Contents &nbsp; &nbsp; &lt;/div&gt; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &lt;div class="sheet-tab2-Content"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Tab 2 Contents &nbsp; &nbsp; &lt;/div&gt; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &lt;div class="sheet-tab3-Content"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Tab 3 Contents &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; Css /* Messing around with Tabs for Firefox compatibility */ /* Hide the dummy checkboxes which we use to reveal tabs later */ input.sheet-HiddenCheckbox { display: none; } /* Hide all the tabs. Later, we'll reveal them when the right checkbox is checked */ div.sheet-tabContents &gt; div { display: none; } /* Reveal the appropriate tab contents depending on which checkbox is checked. */ div.sheet-container input[type="checkbox"][value="Tab1"]:checked ~ div.sheet-tabContents div.sheet-tab1-Content, div.sheet-container input[type="checkbox"][value="Tab2"]:checked ~ div.sheet-tabContents div.sheet-tab2-Content, div.sheet-container input[type="checkbox"][value="Tab3"]:checked ~ div.sheet-tabContents div.sheet-tab3-Content { &nbsp; &nbsp; display: block; &nbsp; &nbsp; position: relative; &nbsp; &nbsp; background-color: wheat; &nbsp; &nbsp; width: 100%; &nbsp; &nbsp; height: 200px; &nbsp; &nbsp; border-bottom-left-radius: 16px; } /* Style the tabs */ div.sheet-tabs { &nbsp; &nbsp; display: block; &nbsp; &nbsp; height: 30px; } div.sheet-tabs div.sheet-tab-widget-container { &nbsp; &nbsp; /* set this up as the reference box for the successive inputs and spans */ &nbsp; &nbsp; position: relative; &nbsp; &nbsp; display: inline-block; &nbsp; &nbsp; width: 20%; } div.sheet-tabs input[type="radio"], div.sheet-tabs input[type="radio"] + span { &nbsp; &nbsp; position: absolute; &nbsp; &nbsp; top: 0; &nbsp; &nbsp; left: 0; &nbsp; &nbsp; width: 100%; } div.sheet-tabs input[type="radio"] + span { &nbsp; &nbsp; z-index: 2; &nbsp; &nbsp; background-color: burlywood; &nbsp; &nbsp; pointer-events: none; &nbsp; &nbsp; line-height 12px; &nbsp; &nbsp; border-top-left-radius: 8px; &nbsp; &nbsp; border-top-right-radius: 8px; } div.sheet-tabs input[type="radio"] + span:before { &nbsp; &nbsp; content: attr(title); } div.sheet-tabs input[type="radio"]:checked + span { &nbsp; &nbsp; background-color: wheat; &nbsp; &nbsp; box-shadow: 3px -4px 4px 0 dimgrey; }
1488787986
plexsoup
Marketplace Creator
Sheet Author
API Scripter
BTW: you probably already know this, but just in case (and for other aspiring sheet authors)... &nbsp; It's super helpful to have a really good understanding of CSS "Selectors" (~, +, &gt;, *, space, etc). Here's a cool demo of a bunch of them. <a href="https://www.w3schools.com/cssref/trysel.asp" rel="nofollow">https://www.w3schools.com/cssref/trysel.asp</a>
1488819406
Falcon
Pro
Sheet Author
Thanks Plex! &nbsp;This is really helpful.
1488844781
plexsoup
Marketplace Creator
Sheet Author
API Scripter
No problem. If you want to dive deeper into the problem, there's some discussion here:&nbsp; <a href="https://app.roll20.net/forum/post/882997/css-wizardry/?pageforid=1096941#post-1096941" rel="nofollow">https://app.roll20.net/forum/post/882997/css-wizardry/?pageforid=1096941#post-1096941</a>
1488849047

Edited 1488849326
vÍnce
Pro
Sheet Author
plexsoup said: BTW: you probably already know this, but just in case (and for other aspiring sheet authors)... &nbsp; It's super helpful to have a really good understanding of CSS "Selectors" (~, +, &gt;, *, space, etc). Here's a cool demo of a bunch of them. <a href="https://www.w3schools.com/cssref/trysel.asp" rel="nofollow">https://www.w3schools.com/cssref/trysel.asp</a> Nice Link plex! &nbsp;very helpful I wish this demo went 4-5 layers deep. &nbsp;Drilling down to a particular nested element can be a pain... (not to mention when you're using ":checked" and ":not(:checked)" in the mix as well )
1488866456
plexsoup
Marketplace Creator
Sheet Author
API Scripter
FYI: Brian just updated his post about tabs in the CSS Wizardry thread here:&nbsp; <a href="https://app.roll20.net/forum/post/882997/css-wizar" rel="nofollow">https://app.roll20.net/forum/post/882997/css-wizar</a>... It supports Firefox now.