From 4f1da66a7c25c12c0386f20ad252241f9c589ef6 Mon Sep 17 00:00:00 2001 From: Jaka Daneu <44704999+jalezi@users.noreply.github.com> Date: Fri, 23 Apr 2021 19:54:16 +0200 Subject: [PATCH] add padding and zero margin for multicard --- index.js | 4 ++-- test.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 3b4b71d..697bc0c 100644 --- a/index.js +++ b/index.js @@ -113,8 +113,8 @@ module.exports.handler = async (event, context, callback) => { } await page.evaluate(sel => { const el = document.querySelector(sel); - el.style['margin-bottom'] = 'no'; - console.log(el.style); + el.style['margin'] = '0 0 0 0'; + el.style.padding = '16px 16px 16px 16px'; }, selector); const maxWidth = 4 * 325; diff --git a/test.js b/test.js index 23d0504..f0ec53b 100644 --- a/test.js +++ b/test.js @@ -84,7 +84,8 @@ const run = async ( } await page.evaluate(sel => { const el = document.querySelector(sel); - el.style['margin-bottom'] = 'no'; + el.style['margin'] = '0 0 0 0'; + el.style.padding = '16px 16px 16px 16px'; console.log(el.style); }, selector); @@ -133,4 +134,4 @@ const run = async ( }; (async () => - await run({ type: 'multicard', screen: 'HOS', custom: '' }, false))(); + await run({ type: 'multicard', screen: 'ALL', custom: '' }, false))();