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

spacing initializer argument has no effect in VStack #272

Closed
MaxDesiatov opened this issue Sep 2, 2020 · 0 comments · Fixed by #273
Closed

spacing initializer argument has no effect in VStack #272

MaxDesiatov opened this issue Sep 2, 2020 · 0 comments · Fixed by #273
Labels
bug Something isn't working

Comments

@MaxDesiatov
Copy link
Collaborator

Verified in Chrome, Safari, and Firefox, elements in a VStack always stick to each other regardless of the spacing value:

struct VStackTest: View {
  @State private var email: String = ""
  @State private var password: String = ""

  @State private var isSubmitted = false

  var body: some View {
    VStack(spacing: 100) {
      TextField("Email", text: $email)
      SecureField("Password", text: $password)
      Button("Submit") { isSubmitted = true }
    }
  }
}
@MaxDesiatov MaxDesiatov added the bug Something isn't working label Sep 2, 2020
MaxDesiatov added a commit that referenced this issue Jul 7, 2021
It's much easier to implement stack spacing when stacks are rendered as single-row or single-column grids, and grid gaps already work in all browsers. For this we need to slightly bump browser version requirements, most notably from Safari 11 to Safari 12.

Resolves #272.

* Remove unused properties in `StackDemo`

* Implement stack spacing with grid gaps

* Fix GTK build

* Bump browser requirements in README.md

* Remove outdated FIXME

* Generalize snapshot timeouts

* Prevent excessive CSS style leaks of properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant