Skip to content

ScrollToTopExamples: Correct Setup section button positioning#7617

Merged
henon merged 1 commit intoMudBlazor:devfrom
MohamedYassin-J:fix/scroll-to-top-btn-position
Oct 14, 2023
Merged

ScrollToTopExamples: Correct Setup section button positioning#7617
henon merged 1 commit intoMudBlazor:devfrom
MohamedYassin-J:fix/scroll-to-top-btn-position

Conversation

@MohamedYassin-J
Copy link
Contributor

Description

While examining the "Scroll To Top Examples" page, I spotted an inconsistency in the positioning of the button. Expected at the bottom right of Setup section container, it appeared at the bottom right of the entire page due to a CSS positioning conflict. The position attribute of the absolute class was being overridden by the .mud-scroll-to-top class.

To resolve this and avoid future issues, I strengthened the specificity of several position attributes by adding !important in the _position.scss file:

.absolute {
    position: absolute !important;
}

.fixed {
    position: fixed !important;
}

.relative {
    position: relative !important;
}

.static {
    position: static !important;
}

.sticky {
    position: sticky !important;
}

How Has This Been Tested?

  1. Automated Testing: Ran all related unit tests, all of which passed successfully.
  2. Manual Testing: Verified the corrected positioning and functionality of the button on the "Scroll To Top Examples" page within the designated container.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Visual Demonstrations

To provide clearer context:

Before the Fix:

Before Fix Image

After the Fix:

After Fix Image

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code conforms to the project's code style.
  • I've introduced relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Oct 9, 2023
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (2279d75) 90.60% compared to head (1d90761) 90.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7617      +/-   ##
==========================================
- Coverage   90.60%   90.59%   -0.02%     
==========================================
  Files         427      427              
  Lines       15218    15218              
==========================================
- Hits        13788    13786       -2     
- Misses       1430     1432       +2     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henon henon merged commit ab16dbd into MudBlazor:dev Oct 14, 2023
@henon
Copy link
Contributor

henon commented Oct 14, 2023

Awesome! Thanks a lot!

@MohamedYassin-J MohamedYassin-J deleted the fix/scroll-to-top-btn-position branch October 16, 2023 07:00
ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants