Skip to content

Commit

Permalink
Merge pull request #97 from hsanshine/table-print-view
Browse files Browse the repository at this point in the history
Table print view
  • Loading branch information
neSpecc authored Aug 11, 2022
2 parents 7e96243 + a9fc8fb commit 5907135
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@editorjs/table",
"description": "Table for Editor.js",
"version": "2.0.3",
"version": "2.0.4",
"license": "MIT",
"main": "./dist/table.js",
"scripts": {
Expand Down
37 changes: 32 additions & 5 deletions src/styles/table.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
--cell-size: 34px;
--toolbox-icon-size: 18px;
--toolbox-padding: 6px;
--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + 2 * var(--toolbox-padding));
--toolbox-aiming-field-size: calc(
var(--toolbox-icon-size) + 2 * var(--toolbox-padding)
);

border-left: 0px;
position: relative;
Expand All @@ -25,6 +27,17 @@
vertical-align: top;
fill: currentColor;
}

@media print {
border-left: 1px solid var(--color-border);
grid-template-columns: 100% var(--cell-size);
}

.tc-row::after {
@media print {
display: none;
}
}
}

.tc-table {
Expand Down Expand Up @@ -73,16 +86,25 @@
}

.tc-add {
&-column, &-row {
&-column,
&-row {
display: flex;
color: var(--color-text-secondary);
}

@media print {
display: none;
}
}

.tc-add-column {
padding: 9px 0;
justify-content: center;
border-top: 1px solid var(--color-border);

@media print {
display: none;
}
}

.tc-add-row {
Expand All @@ -92,16 +114,21 @@
position: relative;

&::before {
content: '';
content: "";
position: absolute;
right: calc(-1 * var(--cell-size));
width: var(--cell-size);
height: 100%;
}

@media print {
display: none;
}
}

.tc-add {
&-column, &-row {
&-column,
&-row {
transition: 0s;
cursor: pointer;
will-change: background-color;
Expand Down Expand Up @@ -129,7 +156,7 @@
border-bottom: 1px solid var(--color-border);

&::after {
content: '';
content: "";
pointer-events: none;
position: absolute;
width: var(--cell-size);
Expand Down

0 comments on commit 5907135

Please sign in to comment.