Skip to content

Commit 051997c

Browse files
cgarwoodfabaff
authored andcommitted
Add print friendly style overrides (home-assistant#3621)
1 parent dfb11db commit 051997c

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

sass/custom/_print.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@media print {
2+
3+
/* General Overrides */
4+
header div.grid__item nav {
5+
display: none;
6+
}
7+
aside#sidebar {
8+
display: none;
9+
}
10+
.grid__item {
11+
display: block;
12+
width: 100%;
13+
}
14+
15+
/* Components List */
16+
div.filter-button-group {
17+
display: none;
18+
}
19+
.hass-option-cards.show-items {
20+
display: block;
21+
}
22+
.hass-option-cards.show-items a.option-card {
23+
display: block;
24+
opacity: 1;
25+
width: 100%;
26+
height: auto;
27+
min-height: 80px;
28+
margin-bottom: 8px;
29+
}
30+
.hass-option-cards.show-items a.option-card .img-container {
31+
float: left;
32+
width: 33%;
33+
text-align: center;
34+
}
35+
.hass-option-cards.show-items a.option-card div.title {
36+
height: 1.5em;
37+
margin-top: 8px;
38+
}
39+
}

sass/screen.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
@import 'custom/paulus';
33
@import 'custom/component_page';
44
@import 'custom/syntax';
5+
@import 'custom/print';

source/_includes/site/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<meta name="twitter:description" content="{{ fb_description | truncate:200 }}">
3333
<meta name="twitter:image" content="{{ social_image }}">
3434

35-
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
35+
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection, print" rel="stylesheet">
3636
<link href="{{ root_url }}{{ site.subscribe_rss }}" rel="alternate" title="{{ site.title }}" type="application/atom+xml">
3737
<link rel='shortcut icon' href='{{ root_url }}/images/favicon.ico' />
3838
<link rel='icon' type='image/png' href='{{ root_url }}/images/favicon-192x192.png' sizes='192x192' />

0 commit comments

Comments
 (0)