From 586706e24fba28a4520f8488a3612e5420194266 Mon Sep 17 00:00:00 2001 From: Sebastian Nomme Date: Thu, 2 May 2024 20:45:31 +0200 Subject: [PATCH] docs: Update documentation for active link with Tailwind (#2417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Proposed change:** - Document styling for aria-current attribute separately for Tailwind and Twind. **Disclaimer:** I am new to open-source contributions and are unfamiliar with the process for submitting a pull request. I have found some more areas of improvement in the Fresh documentation. Should this PR not be up-to-standards on how to contribute, please guide me in the right direction. I have a few more suggestions on issues I found while developing a new Fresh app. Any guidance would be helpful, either reach out to me on GitHub, Discord (bastianplsfix) or X (bastianplsfix). Best, Sebastian 🦕 --- docs/latest/examples/active-links.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/latest/examples/active-links.md b/docs/latest/examples/active-links.md index 49d1258b..a69ba6f0 100644 --- a/docs/latest/examples/active-links.md +++ b/docs/latest/examples/active-links.md @@ -33,14 +33,28 @@ a[aria-current='true'] { ## Tailwind / Twind -In Tailwind or similar CSS frameworks, you can apply styles to elements with the -aria-current attribute by using bracket notation in your class definitions. +In Tailwind or similar CSS frameworks like Twind, you can apply styles to +elements with the aria-current attribute using bracket notation in your class +definitions. However, the specific syntax varies slightly between Tailwind and +Twind. For Tailwind, use the syntax: + +```tsx +function Menu() { + return ( + + Link to some page + + ); +} +``` + +For Twind, the syntax is: ```tsx function Menu() { return ( - link to some page + Link to some page ); }