Skip to content

Commit ae0da2c

Browse files
Table: Make tables wide by default, add max <td> width (#387)
* Table: Make tables wide by default, add max <td> width * Tables: Make bootstrap-tables wide by default too
1 parent 19e2191 commit ae0da2c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

assets/css/v2/style.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ textarea:not([rows]) {
246246
--product-selector-background: 0.98 0 0;
247247

248248
/* vars for the primary grid setup */
249-
--grid-content: minmax(34rem, 50rem);
250-
--grid-content-mobile: minmax(20rem, 50rem);
249+
--grid-max: 50rem;
250+
--grid-content: minmax(34rem, var(--grid-max));
251+
--grid-content-mobile: minmax(20rem, var(--grid-max));
251252
--grid-side-callout: minmax(18rem, 26rem);
252253
--grid-column-gutter: 3.5rem;
253254

@@ -313,7 +314,7 @@ textarea:not([rows]) {
313314
--sidebar-item-padding-tb: 0.25rem;
314315
--content-max-width: 88rem;
315316

316-
--main-col: minmax(34rem, 50rem);
317+
--main-col: minmax(34rem, var(--grid-max));
317318
--side-col: minmax(18rem, 26rem);
318319
}
319320

@@ -1929,6 +1930,7 @@ table {
19291930
font-size: var(--font-step-0);
19301931

19311932
td {
1933+
max-width: var(--grid-max);
19321934
vertical-align: middle;
19331935
padding: var(--table-inner-padding);
19341936
background: transparent;

layouts/partials/table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{$variant := .variant | default "narrow"}}
1+
{{$variant := .variant | default "wide"}}
22
{{$theme := .theme | default "bordered"}}
33
{{$dataGrid := cond (eq $variant "narrow") "first-two-thirds" (cond (eq $variant "wide") "wide" "") }}
44

layouts/shortcodes/bootstrap-table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ $defaultVariant := "narrow" }}
1+
{{ $defaultVariant := "wide" }}
22

33
{{ partial "table.html" (dict
44
"variant" $defaultVariant

0 commit comments

Comments
 (0)