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

Three column layout that includes variable repeating field amounts

November 12 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

I may be having a brain durp, but stuck on something seemingly relatively simple.

I'm trying to create a 3-column layout for an alternate view of a skill table. One that hides a lot of the math and busy-ness. I can do it fine with static div fields, but once I introduce fieldsets it starts getting tricky.

I'm trying to get it to look like this (crude photoshop). But probably with hidden +add and modify buttons. They're included to give you a sense that the gray fields are repeating input fields.

But right now it looks like this.

I'm not sure how to include the repeating input field underneath it's relevant parent skill group. It worked fine when each repeating row had itself a full row.

I tried using grid some, but thinking maybe flex would be a better approach.


Here's some code samples. Here, I'm trying to get the "profession" repeating inputs to show up under the profession chunk.

<!-- KNOWLEDGE row, start of skills -->
    <div class="adventuringskillsfillrepeating"> <!-- class is a misnomer leftover from before -->

      <span class="skillnamefieldprimary" name="attr_knowledge">Knowledge</span>
      <input type="text" class="skilltotalfield" name="attr_knowledgeskilltotal" value="">
      <span class="skillrollbutton">
        <button class="sheet-d6-dice" type="roll" value=
        '&{template:dodas} {{name=@{character_name} Knowledge}} {{roll +@{knowledgeskilltotal} = =[[2d6 + @{knowledgeskilltotal}]]}}'
        name="roll_skilltotalcolumn"></button> </span>

        <span></span>

        <span class="skillnamefieldprimary" name="attr_profession">Profession (Non-Adventuring)</span>
        <input type="text" class="skilltotalfield" name="attr_professionskilltotal" value="">
        <span class="skillrollbutton">
          <button class="sheet-d6-dice" type="roll" value=
          '&{template:dodas} {{name=@{character_name} Profession }} {{roll +@{professionskilltotal} = =[[2d6 + @{professionskilltotal}]]}}'
          name="roll_skilltotalcolumn"></button> </span>

          <span></span>

          <span class="skillnamefieldprimary" name="attr_strengthskills">Strength Skills</span>
          <input type="text" class="skilltotalfield" name="attr_strengthskillsskilltotal" value="">
          <span class="skillrollbutton">
            <button class="sheet-d6-dice" type="roll" value=
            '&{template:dodas} {{name=@{character_name} Strength Skills }} {{roll +@{strengthskillsskilltotal} = =[[2d6 + @{strengthskillsskilltotal}]]}}'
            name="roll_skilltotalcolumn"></button> </span>

      </div>
      <!-- Knowledge +add Repeating inputs -->
          <fieldset class="repeating_knowledgespec">
          <div class="adventuringskillsfillrepeatingsecondary">

            <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
            <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
            <span class="skillrollbutton">
              <button class="sheet-d6-dice" type="roll" value=
              '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
              name="roll_skilltotalcolumn"></button> </span>

            </div>
        </fieldset>

        <fieldset class="repeating_professionspec">
        <div class="adventuringskillsfillrepeatingsecondary">

          <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
          <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
          <span class="skillrollbutton">
            <button class="sheet-d6-dice" type="roll" value=
            '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
            name="roll_skilltotalcolumn"></button> </span>

          </div>
        </fieldset>      

And some of the CSS


  div.adventuringskillsfillrepeating,
  div.adventuringskillsfillrepeating input[type="text"], div.adventuringskillsfillrepeating input[type="number"] {
      display: grid;
    grid-template-columns:  150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt;
      font-family: 'Verdana';
      font-weight: 100;
      height: 12.8pt;
      font-size: 7.0pt;
      width: 100%;
      color: black;
  }

  div.adventuringskillsfillrepeatingsecondary,
  div.adventuringskillsfillrepeatingsecondary input[type="text"], div.adventuringskillsfillrepeatingsecondary input[type="number"] {
      display: grid;
    grid-template-columns:  144pt 32pt 20pt 9pt 144pt 32pt 20pt 9pt 144pt 32pt 20pt 9pt;
      font-family: 'Verdana';
      font-weight: 100;
      height: 12.8pt;
      font-size: 7.0pt;
      width: 100%;
      color: black;
  }

Maybe there's a simple solution. The div being inside the repeating input field doesn't seem to help. Perhaps if I styled the repeating input directly, as mentioned here? https://wiki.roll20.net/Character_Sheet_Development/Repeating_Section

I was originally thinking some kind of flexbox layout might be best. Where it's a column things with a max height, that spills over into a second column and a third column after awhile? 

I feel I'm close to a solution but not sure I'm in the right ballpark. Thanks for any help!



November 12 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

I'm not sure exactly what your issue is, but this looks weird:

div.adventuringskillsfillrepeating input[type="text"], div.adventuringskillsfillrepeating input[type="number"] {
      display: grid;

You seem to have the grid display assigned to your inputs.

A grid display only has meaning when assigned to a container, like a div. Input is not a container.

November 13 (1 year ago)

Edited November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

I'll try finagling that.

I think I'm just not really sure how to approach this three column thing, when those columns also include repeating rows. My head doesn't seem to be in the right space. I think maybe trying to apply grid to the inputs is part of that guesswork. I'm wondering how most other people would approach this or what other strategies are out there.

Maybe css grid, with 3 "columns' of rows, where each row 4 columns (skills, total, dice roller, and a blank)? But then the trick becomes how to position them all in a row together, and inside the same div "table". There's probably a way to do this with grid.

Maybe the trick is using grid to have a flexible length of column, given that there are repeating rows involved? Grid with static content I understand well enough, but introducing repeating rows is where I'm stuck.

November 13 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

Are you trying to create a 3 column layout where a fieldset is completely contained on one of the columns (this is easy, and I can guide you here), or a three column layout where the repeating section straddles the columns and isn't the full height of the columns (this is a lot hader, and we may need for information).

November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

Yes, a 3 column layout where the fieldset is contained in the column. Ideally where the overall height of the "table" div is variable based on how many extra repeating inputs have been added. 

November 13 (1 year ago)

Edited November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

So far I'm thinking having a div includes the "title row" which is the one that displays 'skill, total, roll' and then a blank. The grid row amounts there would be the dimensions of the grid. 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt. Then have 3 separate columns (div containers), where the second one has grid-column-start at 5, and the third at grid column start 9. And the three rows are at  150pt 26pt 20pt 9pt. 

That's where I'm at for now. But haven't got it working yet. 

November 13 (1 year ago)

Edited November 13 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

The best way I think would be to do an enclosing grid of 3 columns, something like:

grid: display;
grid-template-columns: repeat(3, 33%); /* or maybe repeat(3, auto); */
column-gap: 0.5%;

Then have each ciolumn as its own div, which might itself be its own grid if you wnat to split into tables.

If the repeating section, you would likely need to put a div inside the section, and apply a grid on that to give each column the spacing you want. e.g.

<!-- Knowledge +add Repeating inputs -->
          <fieldset class="repeating_knowledgespec">
            <div class="adventuringskillsfillrepeatingsecondary">
  
              <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
              <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
              <span class="skillrollbutton">
                <button class="sheet-d6-dice" type="roll" value=
                '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
                name="roll_skilltotalcolumn"></button> </span>
            </div>
        </fieldset>

div.adventuringskillsfillrepeatingsecondary {
display: grid;
grid-template-columns: /* whatever spacings you want */
}

One of the beauties of grid is the ability to put grids inside other grids (inside other grids)

November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

Cool. I think I'm getting somewhere here. Grid inside of grid is definitely useful. Yeah the placement of divs is throwing me off somewhere, but slowly figuring it out.

November 13 (1 year ago)

Edited November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

I got something mocked up in codepen that seems to be working. But it doesn't seem to work unless I ascribe a grid-row number to each element. I'm concerned that a repeating section might screw that up? And maybe there's a way to have the columns stick together in one div so as to avoid the extra css and potential for errors?

https://codepen.io/danimagaming/pen/gOqxrZX

Also, maybe there's some way for this to repeat automatically. Otherwise I'll have to apply a separate class and styling to each skill chunk, which seems unecessarily laborous.

Also, even if the repeating inputs do automatically resize the row they're in, it would make that row in column 2 and 3 bigger too most likely, which isn't ideal. So preferably, column 1 would scale independently of the rest of the rows and table. Not sure how to do that.

November 13 (1 year ago)

Edited November 13 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

Don't test roll20 sheets outside of roll20, especially if your code includes roll20 specific structures like fieldsets.

The fieldsets used outside of roll20 are not the same as the way roll20 uses them, so codepen will not produce accurate results.

November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

Yeah, I didn't include the repeating fieldsets. Just making sure I understand grid correctly before moving on to Roll20.

November 13 (1 year ago)

Edited November 13 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

I had a quick look at your codepen, and you have several repeated grid-columns. This means you have several divs being drawn in the same grid cell. This will create display problems.

Also I notice your columns are each the same dimension, so instead of:

grid-template-columns: 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt ;

I'd use

grid-template-columns: 205pt 205pt 205pt; /* or more likely, repeat(3, 205pt) but thats the same thing */

Then each column would be a container div with the same class name, and would have:

display: grid;
grid-template-columns: 150pt 26pt 20pt 9pt;


The fieldset might need spacial handling, since a fieldset is never drawn, but roll20 uses it as a set of instructions to create a .repcontainer. You would need to set that .repcontainer to grid-column: 1/-1, to ensure it spreads across this column, and the div inside it would then set the actual width of each table column.

.repcontainer[data-groupname="fieldset class name"] {
   grid-column: 1 / -1;
display: grid;
grid-template-columns: 150pt 26pt 20pt 9pt;
}

You don't need to put a div container inside the fieldset here.


There are usually multiple different ways to achieve the same effect, but this is the approach I'd use based on my understanding of what you're trying to achieve.

November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

Ah good point. The parent container doesn't need the dimensions repeated.

I'll try the that and the 1/-1 thing. See if I can't get somewhere with this.

November 13 (1 year ago)

Edited November 13 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

A quick explanatory note: you have:

<div class="container">
  <div class="titlerow">

But you set a 12 column grid in both of them. Since title row is a div inside .container, it would be assigned to the first column of ,container, and then that first column would be subdivided into 12 columns for .titlerow.


I created a codepen with some of the techniques here based on the code you already had. Copy this into the HTML pane:

<div class="container">
<div class="column">
<span>Skill</span>
<span>Total</span>
<span>Roll</span>
<span></span>
<span>All Combat</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
<span>Profession</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
<span>All Combat spec</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
<span>Social</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
<span>Melee</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
</div>
<!-- column 2 -->
<div class="column">
<span>Skill</span>
<span>Total</span>
<span>Roll</span>
<span></span>
<span>Social Wit</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
</div>

<!-- column 3 -->
<div class="column">
<span>Skill</span>
<span>Total</span>
<span>Roll</span>
<span></span>
<span>Strength Skills</span>
<input type="text"></input>
<input type="text"></input>
<span></span>

<span>Survival</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
<span>Survival: Outdoors</span>
<input type="text"></input>
<input type="text"></input>
<span></span>
</div>

Copy this into CSS

body {
background-color: black;
color: gray;
}

div.container {
display: grid;
grid-template-columns: repeat(3, 205pt);
}

div.column {
display: grid;
grid-template-columns: 150pt 26pt 20pt 9pt;
align-content: start;
background-color: #262626;
}

I wouldn't use "column" as a classname on roll20, it's just here as an example.

November 13 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

I'm making progress, however, the repeating inputs seem to be causing some problems. The add and modify buttons, and inputs fields are in the wrong sections and behaving strangely. If, however, I hide the buttons ala... 

div.gridalttablecontainer div[data-groupname=repeating_YOURNAMEHERE].repcontrol ) {
display: none;
}

everything lines up properly. That's an okay solution for now. But any ideas why the repeating inputs would cause issues, for future reference?

What I've got so far, the important stuff anyways.

<div class="sheet-block-nomathtable">

  <div class="adventuringgridalttable">
  <div class="skilltablerow">

    <span class="str1Skillsand">Adventuring</span>
    <span></span>
    <span></span>

  </div>

<div class="gridalttablecontainer">
  
  <div class="adventuringgridalttabletitlerow">

    <span class="str2Abilities">Skills</span>
    <span class="str2Total">Total</span>
    <span class="str2Roll">Roll</span>
    <span></span>
    <span class="str2Abilities">Skills</span>
    <span class="str2Total">Total</span>
    <span class="str2Roll">Roll</span>
    <span></span>
    <span class="str2Abilities">Skills</span>
    <span class="str2Total">Total</span>
    <span class="str2Roll">Roll</span>


  </div>



<!-- KNOWLEDGE row, start of skills -->
    <div class="knowledgetierfourgrid"> <!-- class is a misnomer leftover from before -->

      <span class="skillnamefieldprimary" name="attr_knowledge">Knowledge</span>
      <input type="text" class="skilltotalfield" name="attr_knowledgeskilltotal" value="">
      <span class="skillrollbutton">
        <button class="sheet-d6-dice" type="roll" value=
        '&{template:dodas} {{name=@{character_name} Knowledge}} {{roll +@{knowledgeskilltotal} = =[[2d6 + @{knowledgeskilltotal}]]}}'
        name="roll_skilltotalcolumn"></button> </span>

        <span></span>
        </div>
     <div class="professiontierfourgrid">
        <span class="skillnamefieldprimary" name="attr_profession">Profession (Non-Adventuring)</span>
        <input type="text" class="skilltotalfield" name="attr_professionskilltotal" value="">
        <span class="skillrollbutton">
          <button class="sheet-d6-dice" type="roll" value=
          '&{template:dodas} {{name=@{character_name} Profession }} {{roll +@{professionskilltotal} = =[[2d6 + @{professionskilltotal}]]}}'
          name="roll_skilltotalcolumn"></button> </span>

          <span></span>
          </div>
          
      <div class="strengthtierfourgrid">
          <span class="skillnamefieldprimary" name="attr_strengthskills">Strength Skills</span>
          <input type="text" class="skilltotalfield" name="attr_strengthskillsskilltotal" value="">
          <span class="skillrollbutton">
            <button class="sheet-d6-dice" type="roll" value=
            '&{template:dodas} {{name=@{character_name} Strength Skills }} {{roll +@{strengthskillsskilltotal} = =[[2d6 + @{strengthskillsskilltotal}]]}}'
            name="roll_skilltotalcolumn"></button> </span>

      </div>
      
      <!-- Knowledge +add Repeating inputs -->
          <fieldset class="repeating_knowledgespec">
          <div class="knowledgegridspec">

            <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
            <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
            <span class="skillrollbutton">
              <button class="sheet-d6-dice" type="roll" value=
              '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
              name="roll_skilltotalcolumn"></button> </span>

            </div>
        </fieldset>

        <fieldset class="repeating_professionspec">
        <div class="professiongridspec">

          <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
          <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
          <span class="skillrollbutton">
            <button class="sheet-d6-dice" type="roll" value=
            '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
            name="roll_skilltotalcolumn"></button> </span>

          </div>
        </fieldset>


          <!-- strengthskills Repeating -->
          <fieldset class="repeating_strengthskillsspec">
          <div class="strengthgridspec">

            <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
            <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
            <span class="skillrollbutton">
              <button class="sheet-d6-dice" type="roll" value=
              '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
              name="roll_skilltotalcolumn"></button> </span>

            </div>
        </fieldset>
/* alt layout 3 columns, new skill property names */

div.gridalttablecontainer {
  display: grid;
  grid-template-columns: 205pt 205pt 205pt;
}

div.gridalttablecontainer div[data-groupname=repeating_knowledgespec].repcontrol, div[data-groupname=repeating_mobilityspec].repcontrol, div[data-groupname=repeating_professionspec].repcontrol, div[data-groupname=repeating_strengthskillsspec].repcontrol, div[data-groupname=repeating_mechanicaldevicesspec].repcontrol, div[data-groupname=repeating_medicinespec].repcontrol, div[data-groupname=repeating_socialwitspec].repcontrol, div[data-groupname=repeating_socialpersonalityspec].repcontrol, div[data-groupname=repeating_survivaloutdoorsspec].repcontrol, div[data-groupname=repeating_survivalurbanspec].repcontrol {
  display: none;
}

div.adventuringgridalttabletitlerow {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt;
}

div.adventuringgridalttabletitlerow span {
  display: grid;
  align-items: center;
  justify-content: center;
}

div.knowledgetierfourgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}

div.professiontierfourgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 2;
}

div.strengthtierfourgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 3;
}

div.knowledgegridspec {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}

div.professiongridspec {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 2;
}

div.strengthgridspec {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 3;
}

This is what displays with repcontainer hidden


vs. without (if you can't read the text, the 2nd and 3rd column repeating rows are inversed, and there's some funky spacing in the second column


Would you need to assign a column to the repcontainer? Or perhaps there's a typo somewhere or a missing div? 

November 14 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

Can you describe more precisely by what you mean here:

The add and modify buttons, and inputs fields are in the wrong sections and behaving strangely.

The only problem I can see is there is a gap of empty space between Profession (Non-adventuring) and Powerlifiting (note the typo there btw).

November 14 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

The add button will sometimes add an input field to a different row. And the column 2 and column 3 input fields have are inverted. 'Strength' skills are under 'profession' and vice versa.

November 14 (1 year ago)

Edited November 14 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

I've got it mostly cobbled together, however, I've got two problems.

  1. The repeating fields, when added, change the height of the rows to the left or right of it. Instead of each column being independent.
  2. The final input field (perception in this case) decided to spill over into the second column for some reason, in spite of giving it the 'grid-column-start: 1' property.

I'm not really sure where to go from here. It's a lot of code to copy paste, but maybe this is a known issue? I continued the code pattern mentioned above.

Blue arrows are showing where it's adding height to other columns. Red arrow is where the skill (input field) is supposed to fit neatly under.


A small snippet of the ending.

<!-- row 6 -->
<!-- medicine, start of skills -->
    <div class="medicinegrid"> <!-- class is a misnomer leftover from before -->

      <span class="skillnamefieldprimary" name="attr_medicine">Medicine</span>
      <input type="text" class="skilltotalfield" name="attr_medicineskilltotal" value="">
      <span class="skillrollbutton">
        <button class="sheet-d6-dice" type="roll" value=
        '&{template:dodas} {{name=@{character_name} Medicine }} {{roll +@{medicineskilltotal} = =[[2d6 + @{medicineskilltotal}]]}}'
        name="roll_skilltotalcolumn"></button> </span>

      </div>

      <!-- social Personality Repeating -->
      <fieldset class="repeating_socialpersonalityspec">
      <div class="socialpersonalitygridspec">

        <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
        <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
        <span class="skillrollbutton">
          <button class="sheet-d6-dice" type="roll" value=
          '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
          name="roll_skilltotalcolumn"></button> </span>

        </div>
      </fieldset>

      <!-- Survival Urban Repeating -->
      <fieldset class="repeating_survivalurbanspec">
      <div class="survivalurbangridspec"> <!--skillsfillrepeatingtertiary-->

        <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
        <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
        <span class="skillrollbutton">
          <button class="sheet-d6-dice" type="roll" value=
          '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
          name="roll_skilltotalcolumn"></button> </span>

        </div>
      </fieldset>
<!-- row 7 -->

    <!-- medicine Repeating -->
    <fieldset class="repeating_medicinespec">
    <div class="medicinegridspec">

      <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
      <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
      <span class="skillrollbutton">
        <button class="sheet-d6-dice" type="roll" value=
        '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
        name="roll_skilltotalcolumn"></button> </span>

      </div>
  </fieldset>


<!-- row 8 -->

    <!-- perception, start of skills -->
    <div class="perceptiongrid"> <!-- class is a misnomer leftover from before -->

      <span class="skillnamefieldprimary" name="attr_perception">Perception</span>
      <input type="text" class="skilltotalfield" name="attr_perceptionskilltotal" value="">
      <span class="skillrollbutton">
        <button class="sheet-d6-dice" type="roll" value=
        '&{template:dodas} {{name=@{character_name} Perception }} {{roll +@{perceptionskilltotal} = =[[2d6 + @{perceptionskilltotal}]]}}'
        name="roll_skilltotalcolumn"></button> </span>

      </div>

<!-- row 9 -->

    <!-- perception Repeating -->
    <fieldset class="repeating_perceptionspec">
    <div class="perceptiongridspec">

      <input type="text" class="skillnamefield" name="attr_skillsandabilities" value="">
      <input type="text" class="skilltotalfield" name="attr_skilltotal" value="">
      <span class="skillrollbutton">
        <button class="sheet-d6-dice" type="roll" value=
        '&{template:dodas} {{name=@{character_name} @{skillsandabilities} }} {{roll +@{skilltotal} = =[[2d6 + @{skilltotal}]]}}'
        name="roll_skilltotalcolumn"></button> </span>

      </div>
  </fieldset>



</div> <!-- close grid container -->

And the relevant CSS

/* alt layout 3 columns, new skill property names */

div.gridalttablecontainer {
  display: grid;
  grid-template-columns: 205pt 205pt 205pt;
}

/*row 0*/
div.adventuringgridalttabletitlerow {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt 150pt 26pt 20pt 9pt;
}

div.adventuringgridalttabletitlerow span {
  display: grid;
  align-items: center;
  justify-content: center;
}

/*row1*/
div.knowledgegrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}

div.professiongrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 2;
}

div.strengthskillsgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 3;
}

/*row2*/
div.knowledgegridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 1;
}

div.professiongridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 2;
}

div.strengthskillsgridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 3;
}

/*row2*/

div.mobilitygrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}

div.socialgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 2;
}

div.survivalgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 3;
}


/*row 3*/
div.mobilitygridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 1;
}

div.socialwitgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 2;
}

div.survivaloutdoorsgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 3;
}


/*row4*/
div.mechanicaldevicesgrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}

div.socialwitgridspec {
  display: grid;
  grid-template-columns: 137pt 39pt 20pt 9pt;
  grid-column-start: 2;
}

div.survivaloutdoorsgridspec {
  display: grid;
  grid-template-columns: 137pt 39pt 20pt 9pt;
  grid-column-start: 3;
}



/*row5*/
div.mechanicaldevicesgridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 1;
}


div.socialpersonalitygrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 2;
}

div.survivalurbangrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 3;
}

/*row6*/
div.medicinegrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}

div.socialpersonalitygridspec {
  display: grid;
  grid-template-columns: 137pt 39pt 20pt 9pt;
  grid-column-start: 2;
}

div.survivalurbangridspec {
  display: grid;
  grid-template-columns: 137pt 39pt 20pt 9pt;
  grid-column-start: 3;
}


/*row7*/
div.medicinegridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 1;
}



/*row8*/
div.perceptiongrid {
  display: grid;
  grid-template-columns: 150pt 26pt 20pt 9pt;
  grid-column-start: 1;
}


/*row9*/
div.perceptiongridspec {
  display: grid;
  grid-template-columns: 144pt 32pt 20pt 9pt;
  grid-column-start: 1;
}

/*hide buttons */
div.gridalttablecontainer div[data-groupname=repeating_knowledgespec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_mobilityspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_perceptionspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_professionspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_strengthskillsspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_mechanicaldevicesspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_medicinespec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_socialwitspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_socialpersonalityspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_survivaloutdoorsspec].repcontrol, div.gridalttablecontainer div[data-groupname=repeating_survivalurbanspec].repcontrol {
  display: none;
}
November 14 (1 year ago)

Edited November 14 (1 year ago)
Daniel S.
Pro
Marketplace Creator
Sheet Author
Compendium Curator

I finally figured it out after finagling for awhile. I made a separate div for each column, inside the grid container with the 3 columns defined, and gave the inner container the property 'display: flex; flex-direction: column; grid-column-start: 1;' etc. The extra layer of div seems to be all it needed. Also turned out to be much much cleaner CSS.

If anyone's curious or is trying this yourself, modeled it off this.

https://codepen.io/danimagaming/pen/gOqxrZX?editors=1100