Skip to content

Commit

Permalink
fix(css-reset): attach variable to :host as well (#7456)
Browse files Browse the repository at this point in the history
* fix(css-reset): attach variable to :host as well

* docs: add changelog

---------

Co-authored-by: Segun Adebayo <joseshegs@gmail.com>
  • Loading branch information
kendaganio and segunadebayo committed Mar 17, 2023
1 parent 01c0a84 commit e5255d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-socks-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chakra-ui/css-reset": patch
---

Attach `--chakra-vh` variable to :host as well
8 changes: 4 additions & 4 deletions packages/components/css-reset/src/css-reset.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { Global } from "@emotion/react"

const vhPolyfill = `
:root {
:root, :host {
--chakra-vh: 100vh;
}

@supports (height: -webkit-fill-available) {
:root {
:root, :host {
--chakra-vh: -webkit-fill-available;
}
}

@supports (height: -moz-fill-available) {
:root {
:root, :host {
--chakra-vh: -moz-fill-available;
}
}

@supports (height: 100dvh) {
:root {
:root, :host {
--chakra-vh: 100dvh;
}
}
Expand Down

1 comment on commit e5255d8

@vercel
Copy link

@vercel vercel bot commented on e5255d8 Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.