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

Organise CSS Z-index #2095

Merged
merged 9 commits into from
Sep 26, 2024
Merged

Organise CSS Z-index #2095

merged 9 commits into from
Sep 26, 2024

Conversation

SajidAlamQB
Copy link
Contributor

@SajidAlamQB SajidAlamQB commented Sep 16, 2024

Related to: #2014

Description

We use z-index everywhere and just add random number that works. It has become cumbersome to debug or fix any styling as z-indexes being added on top of each other.

Development notes

Introduced specific z-index variables in variables.scss to replace hard-coded values throughout the codebase.

Introduced $base, $above, and $below variables to create a flexible system for defining z-index values. This method provides a clear and scalable way to layer elements relative to each other, avoiding conflicts and magic numbers:

$base: 0;
$above: 1;
$below: -1;

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
src/styles/_variables.scss Outdated Show resolved Hide resolved
SajidAlamQB and others added 3 commits September 19, 2024 13:00
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
@jitu5
Copy link
Contributor

jitu5 commented Sep 26, 2024

@SajidAlamQB
In this PR we are removing hardcoded z-index values and moved to _variables.scss file, But we are not using $base: 0; $above: 1; $below: -1; concept right ?

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look's good to me :) Much clearer now . thanks

@SajidAlamQB
Copy link
Contributor Author

@SajidAlamQB In this PR we are removing hardcoded z-index values and moved to _variables.scss file, But we are not using $base: 0; $above: 1; $below: -1; concept right ?

Yes, that is correct.

Copy link
Contributor

@jitu5 jitu5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SajidAlamQB.

@SajidAlamQB SajidAlamQB merged commit 977fe86 into main Sep 26, 2024
5 checks passed
@SajidAlamQB SajidAlamQB deleted the update-zindex-css branch September 26, 2024 12:34
@rashidakanchwala rashidakanchwala mentioned this pull request Nov 21, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants