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

[Help Requested][Legacy->CSE] Trying to convert Legacy to CSE CSS

Heya, I am wanting to convert my character sheet from the legacy style to CSE.  I have examined the Wiki and the Help section and found them to be not all that helpful on the topic of properly converting.  From what I am understanding, I need to strip out ALL the "sheet-" prefix from both the html and the css and then set it to CSE.  Is that about the size of it, or is there more to it than that?
1671218706
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
you do not need to strip out the sheet-  prefix, you just need to make sure that your html and css classes match as CSE does not add the sheet- prefix to the html elements like legacy did. If you were already putting sheet- prefixes in your html, then you can just leave them as is and your css mostly as is. The big complication from switching to CSE is that the specificity of your css declarations is going to change because they are no longer auto prepended with .charsheet . The easy way to ensure your CSS rules maintain the same specificity is to just manually prepend all your rules with .charsheet . If you're using just regular CSS, this is going to be a pain; SCSS makes this much easier at the cost of a little complexity. You may run into other hurdles specific to your sheet, but those are the two general pain points with switching to CSE. And, remember rolltemplate html and styling does NOT  change at all as it is still using legacy sanitization regardless of what your sheet is using. This also means that any fonts you are importing from google fonts must still use the legacy compatible import url as described in the wiki.
Well, my character sheet actually converted over fairly nicely.&nbsp; There are a bunch of issues with repeating sections not holding their proper styles.&nbsp; However, the major issue is that one style is not really applying to the character sheet.&nbsp; I can see it in the css file, but it doesnt even show up when I inspect the code on the page. If i edit the style on the page using the console editor, the style actually seems to function as it should but the problem is I don't really know why.&nbsp; I am guessing their is a hierarchy thing (my biggest hangup with css, I am horrible with finding the hierarchy of an element).&nbsp; So... Perhaps you might give me your thoughts... CSS code:&nbsp; /* Main Styles */ .charsheet { background-image: url(<a href="http://i.imgur.com/5GbMHfg.png" rel="nofollow">http://i.imgur.com/5GbMHfg.png</a>); font-family&nbsp; &nbsp; &nbsp;: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif; font-size&nbsp; &nbsp; &nbsp; &nbsp;: 14px; } .charsheet .wrapper h3 { color&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: black; padding&nbsp; &nbsp; &nbsp; &nbsp;: 3px; margin-bottom : 5px; font-size&nbsp; &nbsp; &nbsp;: 18px; font-weight&nbsp; &nbsp;: bold; font-family&nbsp; &nbsp;: inherit; text-transform: uppercase; text-align&nbsp; &nbsp; : center; } .charsheet .wrapper textarea { display&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: inline-block; border&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 1px solid #aaa; padding&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 2px; height&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 24px; width&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 100%; font-size&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 14px; font-family&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: inherit; line-height&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 16px; font-weight&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: normal; margin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 0; color&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: #555; background-color&nbsp; &nbsp; : white; vertical-align&nbsp; &nbsp; &nbsp; : middle; cursor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : auto; letter-spacing&nbsp; &nbsp; &nbsp; : normal; word-spacing&nbsp; &nbsp; &nbsp; &nbsp; : normal; text-transform&nbsp; &nbsp; &nbsp; : none; text-indent&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 0px; text-shadow&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: none; text-align&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : start; -webkit-rtl-ordering: logical; -webkit-user-select : text; box-shadow&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : inset 0 1px 1px rgba(0, 0, 0, 0.075); transition&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : border linear .2s, box-shadow linear .2s; border-radius&nbsp; &nbsp; &nbsp; &nbsp;: 3px; writing-mode&nbsp; &nbsp; &nbsp; &nbsp; : horizontal-tb; -webkit-writing-mode: horizontal-tb; } .charsheet .wrapper input, .charsheet .wrapper select, .charsheet .wrapper input[type="number"] { /* display&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: inline-block; */ border-bottom&nbsp; &nbsp; &nbsp; &nbsp;: 1px dotted gray; border-top&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : none; border-left&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: none; border-right&nbsp; &nbsp; &nbsp; &nbsp; : none; padding&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 2px; height&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 24px; width&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 100%; font-size&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 14px; font-family&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: inherit; line-height&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 16px; font-weight&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: normal; margin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 0; color&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: #555; background-color&nbsp; &nbsp; : transparent; vertical-align&nbsp; &nbsp; &nbsp; : middle; cursor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : auto; letter-spacing&nbsp; &nbsp; &nbsp; : normal; word-spacing&nbsp; &nbsp; &nbsp; &nbsp; : normal; text-transform&nbsp; &nbsp; &nbsp; : none; text-indent&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 0px; text-shadow&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: none; text-align&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : start; -webkit-rtl-ordering: logical; -webkit-user-select : text; box-shadow&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : inset 0 1px 1px rgba(0, 0, 0, 0.075); transition&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : border linear .2s, box-shadow linear .2s; border-radius&nbsp; &nbsp; &nbsp; &nbsp;: 3px; writing-mode&nbsp; &nbsp; &nbsp; &nbsp; : horizontal-tb; -webkit-writing-mode: horizontal-tb; } .charsheet .wrapper .small-label2 input, .charsheet .wrapper .small-label2 input[type="number"], .charsheet .wrapper .small-label2 input[type="text"], .charsheet .wrapper .small-label2 select { background-color: white; } .charsheet .wrapper input:not([type='checkbox']) { -webkit-appearance: textfield; } .charsheet .wrapper input[type="checkbox"] { height: 13px; width : 13px; color : #555; border: 1px solid #aaa; border-radius: 0; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); transition: border linear .2s, box-shadow linear .2s; } .charsheet .wrapper input[disabled], .charsheet .wrapper select[disabled], .charsheet .wrapper textarea[disabled], .charsheet .wrapper input[readonly], .charsheet .wrapper select[readonly], .charsheet .wrapper textarea[readonly] { background-color: #cccccc !important; border-color&nbsp; &nbsp; : #aaa; cursor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : not-allowed; pointer-events&nbsp; : none; } .charsheet .wrapper textarea { width&nbsp; &nbsp; &nbsp; : 98%; height&nbsp; &nbsp; &nbsp;: 80px; line-height: 16px; } .charsheet .wrapper label { width&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: unset; font-size&nbsp; &nbsp; &nbsp;: 14px; text-align&nbsp; &nbsp; : left; font-weight&nbsp; &nbsp;: 600; height&nbsp; &nbsp; &nbsp; &nbsp; : 24px; line-height&nbsp; &nbsp;: 24px; vertical-align: middle; } .charsheet .wrapper .3colrow .col { width&nbsp; &nbsp; &nbsp; &nbsp;: calc(40% - 9px) !important; margin-right: 5px !important; } .charsheet .wrapper .3colrow .col:nth-child(2) { width&nbsp; &nbsp; &nbsp; &nbsp;: calc(20% - 9px) !important; margin-right: 5px; } .charsheet .wrapper .3colrow .col:last-child { margin-right: 0 !important; } .charsheet .wrapper .2colrow .col { width&nbsp; &nbsp; &nbsp; &nbsp;: calc(50% - 3px) !important; margin-right: 2px !important; } .charsheet .wrapper .2colrow .col:last-child { margin-right: 0 !important; } .charsheet .wrapper .1colrow .col { width&nbsp; &nbsp; &nbsp; &nbsp;: calc(100% - 3px) !important; margin-right: 0 !important; } HTML code: &lt;div class="3colrow"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- Left Column --&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="col skills"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;hr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;h3 data-i18n="basicskills"&gt;Basic Skills&lt;/h3&gt; &lt;div class="table"&gt; &lt;span class="table-name"&gt;Basic Skills&lt;/span&gt; &lt;div class="table-row"&gt; &lt;span class="table-header"&gt;0&lt;/span&gt; &lt;span class="table-header"&gt;1&lt;/span&gt; &lt;span class="table-header"&gt;2&lt;/span&gt; &lt;span class="table-header"&gt;3&lt;/span&gt; &lt;span class="table-header"&gt;4&lt;/span&gt; &lt;span class="table-header"&gt;5&lt;/span&gt; &lt;span class="table-header"&gt;6&lt;/span&gt; &lt;span class="table-header"&gt;7&lt;/span&gt; &lt;span class="table-header"&gt;8&lt;/span&gt; &lt;span class="table-header"&gt;9&lt;/span&gt; &lt;span class="table-header"&gt;10&lt;/span&gt; &lt;span class="table-header"&gt;11&lt;/span&gt; &lt;span class="table-header"&gt;12&lt;/span&gt; &lt;/div&gt; &lt;div class="table-row"&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$0_basicskill}" class="dice" value="%{selected|repeating_basicskills_$0_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$1_basicskill}" class="dice" value="%{selected|repeating_basicskills_$1_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$2_basicskill}" class="dice" value="%{selected|repeating_basicskills_$2_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$3_basicskill}" class="dice" value="%{selected|repeating_basicskills_$3_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$4_basicskill}" class="dice" value="%{selected|repeating_basicskills_$4_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$5_basicskill}" class="dice" value="%{selected|repeating_basicskills_$5_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$6_basicskill}" class="dice" value="%{selected|repeating_basicskills_$6_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$7_basicskill}" class="dice" value="%{selected|repeating_basicskills_$7_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$8_basicskill}" class="dice" value="%{selected|repeating_basicskills_$8_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$9_basicskill}" class="dice" value="%{selected|repeating_basicskills_$9_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$10_basicskill}" class="dice" value="%{selected|repeating_basicskills_$10_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$11_basicskill}" class="dice" value="%{selected|repeating_basicskills_$11_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;span class="tdcs"&gt;&lt;button type="roll" name="roll_repeating_" title="%{selected|repeating_basicskills_$12_basicskill}" class="dice" value="%{selected|repeating_basicskills_$11_basicskill}"&gt;t&lt;/button&gt;&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;hr&gt; ...... the rest of the page continues from here..... The issue from what I can see is that the bolded styles are simply not applying, and therefore not splitting the page into 3 seperate columns.&nbsp; If I add the style straight into the html, it does seem to work (mostly). I understand that this isnt alot to go on, and the code is rather abbreviated.&nbsp; And I am sorry for that.&nbsp; I'm not very good at using github.&nbsp; Thank you in advance. Also, I am aware that the repeating section has some issues, especially the excessive use of underscores "_" for the name.&nbsp; That being said, it works. (I don't know how it works considering the name isnt filled out completely; but it does).&nbsp; Unlike the attack/damage buttons, which simply dont work at all.&nbsp; Which is something I've been struggling with for a long time, and one of the reasons why I wanted to switch to CSE, to see if that would help get them to work.
1671248125
GiGs
Pro
Sheet Author
API Scripter
I don't see a repeating section in the code (which starts with &lt;fieldset clss="repeating_ Extra underscore will break it if its on the line I just showed. Extra underscores do not matter on any other line of the repeating section - you can go wild. To solcve your bold issue, I'd recommend posting the entire sheet code (HTML and CSS) in pastebin.com or gist.com. It's going to be hard to figure out CSS problems from just looking at a list of code.
1671302896

Edited 1671303209
Toby
Pro
I managed to figure out how to upload everything to github without using their stupid app program so.. thats cool.&nbsp; Anyways, here is the git link.&nbsp;&nbsp; <a href="https://github.com/TobyFox2002/DarkHeresyAdvanced" rel="nofollow">https://github.com/TobyFox2002/DarkHeresyAdvanced</a> .&nbsp; The character sheet is an amalgam of DH1e, some superior elements of 2e, and some elements of Rogue Trader.&nbsp; So essentially its a more advanced version of DH.&nbsp; Please keep in mind that this character sheet does require some API to handle the rolls, as the all the rolls are handled using SCRIPTCARDS.&nbsp; Any assistance, that can be rendered would be very much appreciated.&nbsp; Eventually, I'll be converting all my character sheets to CSE, as I want to use variables in my CSS and create pop-out windows.&nbsp; Not to mention, I'd really like to have better accessibility.
Any one perhaps have insight?&nbsp; I have since updated the post with the character sheet code I am using to convert it to CSE.