diff --git a/snippets/focus-within.md b/snippets/focus-within.md index dfab711c6..811b4b2f3 100644 --- a/snippets/focus-within.md +++ b/snippets/focus-within.md @@ -1,10 +1,11 @@ ### Focus Within -The psuedo class `:focus-within` applies styles to a parent element if any child element gets focused. For example, an `input` element inside a `form` element. +Changes the appearance of a form if any of its children are focused. #### HTML ```html +
@@ -12,7 +13,7 @@ The psuedo class `:focus-within` applies styles to a parent element if any child
- +
``` #### CSS @@ -28,7 +29,6 @@ form:focus-within { background: #f7b731; color: #000000; } - ``` #### Demo @@ -37,7 +37,7 @@ form:focus-within { #### Explanation - +The psuedo class `:focus-within` applies styles to a parent element if any child element gets focused. For example, an `input` element inside a `form` element. #### Browser support @@ -48,4 +48,4 @@ If no link is provided, it defaults to 99+%. --> - https://caniuse.com/#feat=css-focus-within - +