From 4ec6dd6d1f7c436d71f3bdb4f2f6e4e8fc5cd06c Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:44:25 +0900 Subject: [PATCH] Revert "Merge pull request #183 from inokawa/default-style" This reverts commit 9a84a428aaf099106beed9185bc3e0b8114a425b, reversing changes made to a781990da31d7ed9a1217fb9a9af005981dcd932. --- 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, 70 insertions(+), 64 deletions(-) diff --git a/src/react/VGrid.tsx b/src/react/VGrid.tsx index 005ce8b10..7de003f24 100644 --- a/src/react/VGrid.tsx +++ b/src/react/VGrid.tsx @@ -463,6 +463,8 @@ 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 45de91aae..02eda6a6e 100644 --- a/src/react/VList.tsx +++ b/src/react/VList.tsx @@ -331,7 +331,7 @@ export const VList = forwardRef( () => ({ ...viewportAttrs, style: { - overflow: "auto", + overflow: isHorizontal ? "auto hidden" : "hidden auto", display: isHorizontal ? "inline-block" : "block", contain: "strict", // transform: "translate3d(0px, 0px, 0px)", @@ -341,6 +341,8 @@ 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 dd4efad98..af5a6dbf5 100644 --- a/src/react/WVList.tsx +++ b/src/react/WVList.tsx @@ -270,6 +270,8 @@ 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 a12bd7364..d3296ea87 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`] = `