Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit f276e99

Browse files
committed
Makes it printable.
1 parent 03f7fa8 commit f276e99

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

editable-table-display.html

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,34 @@
147147
:host editable-table-sort {
148148
width: 100%;
149149
}
150+
:host:not([responsive-size="xs"]) #column {
151+
display: none;
152+
}
153+
@media screen {
150154
:host[responsive-size="xs"] table[transition] {
151155
opacity: 0;
152156
transition: opacity 5s;
153157
}
154-
:host:not([responsive-size="xs"]) #column,
155-
:host[responsive-size="xs"] table th[xs-hidden],
156-
:host[responsive-size="xs"] table td[xs-hidden],
157-
:host[responsive-size="xs"] table[default-xs-display] th:nth-of-type(n+3),
158-
:host[responsive-size="xs"] table[default-xs-display][row-header] td:nth-of-type(n+3),
159-
:host[responsive-size="xs"] table[default-xs-display]:not([row-header]) td:nth-of-type(n+2) {
160-
display: none;
158+
:host:not([responsive-size="xs"]) #column,
159+
:host[responsive-size="xs"] table th[xs-hidden],
160+
:host[responsive-size="xs"] table td[xs-hidden],
161+
:host[responsive-size="xs"] table[default-xs-display] th:nth-of-type(n+3),
162+
:host[responsive-size="xs"] table[default-xs-display][row-header] td:nth-of-type(n+3),
163+
:host[responsive-size="xs"] table[default-xs-display]:not([row-header]) td:nth-of-type(n+2) {
164+
display: none;
165+
}
166+
}
167+
@media print {
168+
:host table {
169+
width: 100%;
170+
max-width: 100%;
171+
}
172+
:host #column {
173+
display: none;
174+
}
175+
@page {
176+
size: landscape;
177+
}
161178
}
162179
</style>
163180
<table id="table" default-xs-display>

editable-table-editor.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@
223223
:host .field-group label {
224224
line-height: 30px;
225225
}
226+
@media print {
227+
table {
228+
width: 100%;
229+
max-width: 100%;
230+
}
231+
@page {
232+
size: landscape;
233+
}
234+
}
226235
</style>
227236
<h1 class="sr-only">Table Editor</h1>
228237
<p class="field-group">

0 commit comments

Comments
 (0)