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

Using Global CSS root variables for better consistency #2983

Closed
AceHunterr opened this issue Dec 27, 2024 · 3 comments
Closed

Using Global CSS root variables for better consistency #2983

AceHunterr opened this issue Dec 27, 2024 · 3 comments
Assignees

Comments

@AceHunterr
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The hardcoded values in the tsx files for the styles such as those present in the 'sx' prop can be replaced with global css root variables.

Describe the solution you'd like
Simply import the styles from the global CSS and therefore use the global root variables.

For example :

For this style
original

We have the output:
2nd

But by simply replacing the hardcoded backgroundcolor value with global variable root variable we can ensure much higher consistency for the CSS:
after change

We get the same result:
4th

Approach to be followed (optional)

  1. Visit all the .tsx files in the src directory.
  2. Ensure they have styles imported from global css something like this: import styles from '../../style/app.module.css';
  3. Replace all the possible hard coded values with global css root variables.
  4. Run the server before making the changes and after the changes making sure CSS do not gets disrupted for any component.

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

Copy link

Congratulations on making your first Issue! 🎊 If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues.

@AceHunterr
Copy link
Contributor Author

May I work on this issue?

@AceHunterr AceHunterr changed the title Feature Request Using Global CSS root variables for better consistency Dec 27, 2024
@monk0707
Copy link

@palisadoes Can I work on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants