Skip to content

Commit

Permalink
[DOCS] Document styling of current page in fluid_styled_content menu …
Browse files Browse the repository at this point in the history
…content elements

Document https://review.typo3.org/c/Packages/TYPO3.CMS/+/73048 in the extensions manual

Resolves: #97404
Releases: main

Change-Id: If241f826fcc8972877eb9b4f6c7281a814b65ef9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74331
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Annett Jähnichen <mcmietz@web.de>
Tested-by: Jonas Eberle <flightvision@googlemail.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Lina Wolf <112@linawolf.de>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Jonas Eberle <flightvision@googlemail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Lina Wolf <112@linawolf.de>
  • Loading branch information
linawolf committed May 5, 2022
1 parent 7be9318 commit 64d5fed
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,30 @@ shown.

In case no pages are selected, the menu will be rendered from the
current page where the menu is put on.

Styling of the current page in a menu
======================================

.. versionadded:: 12.0
All menu content elements related to page navigation reflect the "current"
state of a page now.

If the current page is displayed within a menu the aria attribute
:html:`aria-current="page"` is added to the a-tag of a menu-item.

For styling with CSS the attribute of the link can be used:

.. code-block:: css
:caption: EXT:site_package/Public/Css/menu.css
[aria-current="page"] {
/* Special style for the current page link */
}
[aria-current="page"]:hover {
/* Special style for the current page link when hovered */
}
[aria-current="page"]::before {
/* Special virtual element for additions like chevrons, etc. */
}
The default styling of contains no style for the current page.

0 comments on commit 64d5fed

Please sign in to comment.