Skip to content

Commit

Permalink
feat(print): add 3 new print utilities
Browse files Browse the repository at this point in the history
Deprecate `.visible-print`

BREAKING CHANGE

[#76802876]

Signed-off-by: Geoff Pleiss <gpleiss@pivotal.io>
  • Loading branch information
stubbornella authored and Geoff Pleiss committed Oct 14, 2014
1 parent 702392a commit a4f8d8d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Latest Changes

.visible-print -> .visible-print-block

.panel-space -> .panel-alt
.panel-stopped -> .panel-off
.panel-crashed -> .panel-danger
Expand Down
34 changes: 27 additions & 7 deletions src/pivotal-ui/components/utils.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,34 @@ categories:
- Utilities
---
### Printing
Try printing this page to see these styles in action.
Similar to the regular responsive classes, use these for toggling content for print.
<table class="styleguide">
<thead>
<tr>
<th>Classes</th>
<th>Browser</th>
<th>Print</th>
</tr>
</thead>
<tbody>
<tr>
<th>
<code>.visible-print-block</code><br>
<code>.visible-print-inline</code><br>
<code>.visible-print-inline-block</code>
</th>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th><code>.hidden-print</code></th>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
</tr>
</tbody>
</table>
```haml_example_table
%h3.visible-print This will only show when printed
%h3.hidden-print This will not show when printed
```
*/

Expand Down
14 changes: 14 additions & 0 deletions src/style_guide/style_guide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,17 @@ background-position: 0 50%;
}
}

td.is-visible, td.is-hidden {
text-align: center;
vertical-align: middle;
}

td.is-visible {
color: #468847;
background-color: #dff0d8 !important;
}

td.is-hidden {
color: #ccc;
background-color: #f9f9f9 !important;
}

0 comments on commit a4f8d8d

Please sign in to comment.