From 19aae767bb1ce0b637aa3b3fd84c8932a7bb3e4a Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Fri, 22 Sep 2023 18:35:39 +0900 Subject: [PATCH] Remove unnecessary styles from component --- src/react/VGrid.tsx | 2 - src/react/VList.tsx | 4 +- src/react/WVList.tsx | 2 - src/react/__snapshots__/VGrid.spec.tsx.snap | 20 ++++---- .../__snapshots__/VGrid.ssr.spec.tsx.snap | 4 +- src/react/__snapshots__/VList.spec.tsx.snap | 46 +++++++++---------- .../__snapshots__/VList.ssr.spec.tsx.snap | 8 ++-- src/react/__snapshots__/WVList.spec.tsx.snap | 40 ++++++++-------- .../__snapshots__/WVList.ssr.spec.tsx.snap | 8 ++-- 9 files changed, 64 insertions(+), 70 deletions(-) diff --git a/src/react/VGrid.tsx b/src/react/VGrid.tsx index 7de003f24..005ce8b10 100644 --- a/src/react/VGrid.tsx +++ b/src/react/VGrid.tsx @@ -463,8 +463,6 @@ export const VGrid = forwardRef( // backfaceVisibility: "hidden", width: "100%", height: "100%", - padding: 0, - margin: 0, ...viewportAttrs.style, }, }), diff --git a/src/react/VList.tsx b/src/react/VList.tsx index 02eda6a6e..45de91aae 100644 --- a/src/react/VList.tsx +++ b/src/react/VList.tsx @@ -331,7 +331,7 @@ export const VList = forwardRef( () => ({ ...viewportAttrs, style: { - overflow: isHorizontal ? "auto hidden" : "hidden auto", + overflow: "auto", display: isHorizontal ? "inline-block" : "block", contain: "strict", // transform: "translate3d(0px, 0px, 0px)", @@ -341,8 +341,6 @@ export const VList = forwardRef( // willChange: "transform", width: "100%", height: "100%", - padding: 0, - margin: 0, ...viewportAttrs.style, }, }), diff --git a/src/react/WVList.tsx b/src/react/WVList.tsx index af5a6dbf5..dd4efad98 100644 --- a/src/react/WVList.tsx +++ b/src/react/WVList.tsx @@ -270,8 +270,6 @@ export const WVList = forwardRef( // willChange: "transform", width: isHorizontal ? "auto" : "100%", height: isHorizontal ? "100%" : "auto", - padding: 0, - margin: 0, ...viewportAttrs.style, }, }), diff --git a/src/react/__snapshots__/VGrid.spec.tsx.snap b/src/react/__snapshots__/VGrid.spec.tsx.snap index d3296ea87..a12bd7364 100644 --- a/src/react/__snapshots__/VGrid.spec.tsx.snap +++ b/src/react/__snapshots__/VGrid.spec.tsx.snap @@ -3,7 +3,7 @@ exports[`grid should render 1 children 1`] = `