Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applyTableAttributes altering html width and height attributes #47

Open
Zaggamok opened this issue Jul 7, 2017 · 0 comments
Open

applyTableAttributes altering html width and height attributes #47

Zaggamok opened this issue Jul 7, 2017 · 0 comments

Comments

@Zaggamok
Copy link

Zaggamok commented Jul 7, 2017

Hi,

Although the description of options.applyTableAttributes reads:
"Whether to apply the border, cellpadding and cellspacing attributes to table elements.",

It seems to have an effect on the width and height html values of tables, in that it adds 'px' to the numbers contained.
example:

        <table width="49" height="49">
          <tbody>
            <tr>
              <td></td>
            </tr>
          </tbody>
        </table>

outputs:

        <table width="49px" height="49px" border="0" cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <td></td>
            </tr>
          </tbody>
        </table>

This appears to mess with (my) table rendering D:

If it helps, my gulp task is as follows:

gulp.task('inline', function(){
	var stylesheet = fs.readFileSync('app/css/styles.css', 'utf8');
	return gulp.src('app/html/*.html')
		.pipe(inlineCss({
			applyStyleTags: false,
			removeStyleTags: false,
			applyTableAttributes: true,
			applyWidthAttributes:false,
			preserveMediaQueries: true,
			extraCss: stylesheet
		}))
		.pipe(gulp.dest('dist'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant