Skip to content

Commit

Permalink
Update packages and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BafS committed Oct 4, 2016
1 parent 73f65ab commit b01ee24
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
__*
.DS_Store
dist/min
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,14 @@ Gutenberg.css is the base stylesheet but there is themes available in the `theme
Example with Gutenberg and "old style" theme :

```HTML
<link rel="stylesheet" href="dist/gutenberg.css" media="print" charset="utf-8">
<link rel="stylesheet" href="dist/themes/oldstyle.css" media="print" charset="utf-8">
<link rel="stylesheet" href="dist/gutenberg.css" media="print">
<link rel="stylesheet" href="dist/themes/oldstyle.css" media="print">
```

![comparison](https://i.imgur.com/tL5cHhn.png)

> Comparison between standard print (left) and Gutenberg (middle, Modern style and right, Old style)
### Force to print background

To force backgrounds to be printed (can be useful when you "print" a pdf), add this CSS (compatible with Safari and Chrome) :

```CSS
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
```

### Hide elements

To hide elements to be printed you can simply add the class `no-print`.
Expand All @@ -43,6 +34,15 @@ Example:
<h1 class="page-break">My title</h1>
```

### Force to print background

To force backgrounds to be printed (can be useful when you "print" a pdf), add this CSS (compatible with Safari and Chrome) :

```CSS
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
```

## Dev

1. `npm install` to install dependencies
Expand Down
3 changes: 2 additions & 1 deletion dist/gutenberg.css
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ select {
* `input` and others.
*/
button,
html input[type="button"], input[type="reset"],
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
/* 2 */
Expand Down
5 changes: 0 additions & 5 deletions dist/themes/classy.css

This file was deleted.

4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var gulp = require('gulp'),
sass = require('gulp-sass'),
minifyCss = require('gulp-minify-css');
cleanCSS = require('gulp-clean-css');
// sourcemaps = require('gulp-sourcemaps');

gulp.task('build-css', function() {
Expand All @@ -11,7 +11,7 @@ gulp.task('build-css', function() {

gulp.task('minify-css', function() {
return gulp.src('dist/**/*.css')
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(gulp.dest('dist/min'));
});

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "0.0.1",
"version": "0.1.0",
"description": "Print your web pages with style",
"main": "index.js",
"scripts": {
Expand All @@ -14,8 +14,8 @@
"author": "Fabien Sa",
"license": "MIT",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-minify-css": "^1.2.1",
"gulp-sass": "^2.0.4"
"gulp": "^3.9.1",
"gulp-clean-css": "^2.0.13",
"gulp-sass": "^2.3.2"
}
}

0 comments on commit b01ee24

Please sign in to comment.