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

[5.2 ]#44636 add scroll-margin-top if sticky top is used #44679

Open
wants to merge 1 commit into
base: 5.2-dev
Choose a base branch
from

Conversation

hans2103
Copy link
Contributor

@hans2103 hans2103 commented Jan 2, 2025

Pull Request for Issue 44636 .

Summary of Changes

This PR has a css change. It will apply a scroll-margin-top when sticky header is used.
The value of scroll-margin-top is set by custom property --cassiopeia-scroll-margin-top with a fallback to 10rem. Because custom property is used it can be set using javascript too. This might be useful when the height of the header is unknown. Out of scope for this PR.

When header in your custom Cassiopea template is larger you can override --cassiopeia-scroll-margin-top to another value in user.css or use javascript to set it in the style element.

Testing Instructions

  • Joomla 5.2-dev with blog sample data
  • Adjust content item "Your Modules" and add an anchor. (I've set it next to "Your site")
  • Add a menu item type = url referring to #anchor. Add it to Menu Blog
  • Refresh homepage and notice new menu item... click on it and see where the page takes you
  • Apply PR and run npm ci to compile new css. (or something similar... css needs to be recompiled)
  • Refresh homepage and notice new menu item... click on it and see where the page takes you

Actual result BEFORE applying this Pull Request

Screenshot 2025-01-02 at 08 10 04

My set anchor position next to Your site is hidden behind the sticky header.

Expected result AFTER applying this Pull Request

Screenshot 2025-01-02 at 08 11 14

My set anchor position next to Your site is visible below the sticky header.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev labels Jan 2, 2025
@fgsw
Copy link

fgsw commented Jan 2, 2025

I have tested this item ✅ successfully on 18a850a

Used 5.2.2 and Prebuilt Update_Package.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44679.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants