Skip to content

Commit

Permalink
removes number from data-col attributes. ie. data-col-(number).
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Tomas-Gonzalez committed Nov 29, 2023
1 parent 976eaf9 commit 790f4c9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 53 deletions.
2 changes: 1 addition & 1 deletion dist/core-styles.base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/elements/table--basic.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/elements/table.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 3 additions & 40 deletions src/lib/_imports/elements/table--basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ table,
}

:--s-paragraph-table {
display: table;
/* to mimic shrink-wrap width of real table */
display: table; /* to mimic shrink-wrap width of real table */
}

/* TABLE WITH A <thead> */
Expand Down Expand Up @@ -206,43 +205,7 @@ table p:last-child,

/* To label the cells */
/* RFE: Add `data-label` to each cell so we can use `attr(data-label)` */
td[data-col-1]:before {
content: attr(data-col-1);
}

td[data-col-2]:before {
content: attr(data-col-2);
}

td[data-col-3]:before {
content: attr(data-col-3);
}

td[data-col-4]:before {
content: attr(data-col-4);
}

td[data-col-5]:before {
content: attr(data-col-5);
}

td[data-col-6]:before {
content: attr(data-col-6);
}

td[data-col-7]:before {
content: attr(data-col-7);
}

td[data-col-8]:before {
content: attr(data-col-8);
}

td[data-col-9]:before {
content: attr(data-col-9);
}

td[data-col-10]:before {
content: attr(data-col-10);
td[data-col]:before {
content: attr(data-col);
}
}
20 changes: 10 additions & 10 deletions src/lib/_imports/elements/table/table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
{{/each}}
{{#each data.rows}}
<tr>
{{#if id}}<td data-col-1="ID">{{ id }}</td>{{/if}}
{{#if name}}<td data-col-2="Name">{{ name }}</td>{{/if}}
{{#if name-link}}<td data-col-2="Name"><a href="#">{{ name-link }}</a></td>{{/if}}
{{#if id}}<td data-col="ID">{{ id }}</td>{{/if}}
{{#if name}}<td data-col="Name">{{ name }}</td>{{/if}}
{{#if name-link}}<td data-col="Name"><a href="#">{{ name-link }}</a></td>{{/if}}
{{#if paragraph}}
<td data-col-3="Summary" title="{{> @text-of-one-paragraph-short }}">
<td data-col="Summary" title="{{> @text-of-one-paragraph-short }}">
<p>{{> @text-of-one-paragraph-short }}</p>
</td>
{{/if}}
{{#if sentence}}
<td data-col-4="Sentence" title="{{> @text-of-one-sentence }}">
<td data-col="Sentence" title="{{> @text-of-one-sentence }}">
<span>{{> @text-of-one-sentence }}</span>
</td>
{{/if}}
{{#if custom-1}}<td data-col-5="Size">{{{ custom-1 }}}</td>{{/if}}
{{#if custom-2}}<td data-col-6="">{{{ custom-2 }}}</td>{{/if}}
{{#if custom-3}}<td data-col-7="">{{{ custom-3 }}}</td>{{/if}}
{{#if time}}<td data-col-8="Time"><time>{{ time }}</time></td>{{/if}}
{{#if custom-1}}<td data-col="Size">{{{ custom-1 }}}</td>{{/if}}
{{#if custom-2}}<td data-col="">{{{ custom-2 }}}</td>{{/if}}
{{#if custom-3}}<td data-col="">{{{ custom-3 }}}</td>{{/if}}
{{#if time}}<td data-col="Time"><time>{{ time }}</time></td>{{/if}}
{{#if acts}}
<td data-col-9="Actions">
<td data-col="Actions">
<ul>
{{#each acts}}
{{#if is-link }}<li><a href="#">{{ text }}</a></li>{{/if}}
Expand Down

0 comments on commit 790f4c9

Please sign in to comment.