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

style(plugin-basic-ui): move top padding to margin #479

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/short-jars-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stackflow/plugin-basic-ui": patch
---

style(plugin-basic-ui): move top padding to margin
11 changes: 0 additions & 11 deletions demo/src/activities/Main.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ export const appBarRight = style([
export const scrollable = style([
f.flex1,
f.overflowScroll,
{
paddingTop: cssVars.appBar.height,
"@supports": {
"(padding-top: constant(safe-area-inset-top))": {
paddingTop: `calc(${cssVars.appBar.height} + constant(safe-area-inset-top))`,
},
"(padding-top: env(safe-area-inset-top))": {
paddingTop: `calc(${cssVars.appBar.height} + env(safe-area-inset-top))`,
},
},
},
]);

export const bottom = style({});
13 changes: 7 additions & 6 deletions extensions/plugin-basic-ui/src/components/AppScreen.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ export const paper = recipe({
true: [
f.borderBox,
{
transition: `transform ${vars.transitionDuration}, opacity ${vars.transitionDuration}, padding-top ${globalVars.appBar.heightTransitionDuration}`,
paddingTop: globalVars.appBar.height,
transition: `transform ${vars.transitionDuration}, opacity ${vars.transitionDuration}, margin-top ${globalVars.appBar.heightTransitionDuration}`,
marginTop: globalVars.appBar.height,
height: `calc(100% - ${globalVars.appBar.height})`,
"@supports": {
"(padding-top: constant(safe-area-inset-top))": {
paddingTop: `calc(${globalVars.appBar.height} + max(${globalVars.appBar.minSafeAreaInsetTop}, constant(safe-area-inset-top)))`,
"(margin-top: constant(safe-area-inset-top))": {
marginTop: `calc(${globalVars.appBar.height} + max(${globalVars.appBar.minSafeAreaInsetTop}, constant(safe-area-inset-top)))`,
},
"(padding-top: env(safe-area-inset-top))": {
paddingTop: `calc(${globalVars.appBar.height} + max(${globalVars.appBar.minSafeAreaInsetTop}, env(safe-area-inset-top)))`,
"(margin-top: env(safe-area-inset-top))": {
marginTop: `calc(${globalVars.appBar.height} + max(${globalVars.appBar.minSafeAreaInsetTop}, env(safe-area-inset-top)))`,
},
},
},
Expand Down
Loading