mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Hides the link icon in print view
Summary: Users complained about white spaces left by the link icon when printing. Diff fixes the issue by hiding link icon completely. Test Plan: Adds tests in `nbrowser/Printing.ts` Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3767
This commit is contained in:
@@ -10,7 +10,7 @@ import {getStorage} from 'app/client/lib/storage';
|
||||
import {urlState} from 'app/client/models/gristUrlState';
|
||||
import {getTheme, ProductFlavor} from 'app/client/ui/CustomThemes';
|
||||
import {Theme, ThemeAppearance} from 'app/common/ThemePrefs';
|
||||
import {dom, makeTestId, Observable, styled, TestId} from 'grainjs';
|
||||
import {dom, DomElementMethod, makeTestId, Observable, styled, TestId} from 'grainjs';
|
||||
import debounce = require('lodash/debounce');
|
||||
import values = require('lodash/values');
|
||||
|
||||
@@ -893,3 +893,16 @@ function getOrCreateStyleElement(id: string) {
|
||||
document.head.append(style);
|
||||
return style;
|
||||
}
|
||||
|
||||
// A dom method to hide element in print view
|
||||
export function hideInPrintView(): DomElementMethod {
|
||||
return cssHideInPrint.cls('');
|
||||
}
|
||||
|
||||
const cssHideInPrint = styled('div', `
|
||||
@media print {
|
||||
& {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user