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

🚮 Get rid of CSS in JS #2514

Closed
2 tasks
bradystroud opened this issue Nov 25, 2024 · 2 comments
Closed
2 tasks

🚮 Get rid of CSS in JS #2514

bradystroud opened this issue Nov 25, 2024 · 2 comments
Labels

Comments

@bradystroud
Copy link
Member

This stuff is hard to maintain and is inconsistent with our current approach to styling (TailwindCSS 👑)

IMO its also hard to maintain. There are some packages required to make it work that could be removed as well (I tried to get rid of them here #2513

  • Remove all of these
  • Replace with Tailwind

<style jsx>{`
.or-text {
margin: 0.5rem 1.5rem 0.5rem 0.75rem;
font-size: 1.125rem;
color: var(--color-secondary);
font-weight: bold;
}
.actionGroupCenter {
justify-content: center;
}
.icon-class {
display: inline-block;
fill: currentColor;
margin-left: 0.375em;
height: 1em;
width: auto;
transition: opacity ease-out 150ms;
}
`}</style>
</>

@joshbermanssw
Copy link
Member

joshbermanssw commented Nov 29, 2024

Currently there are 105 total instances of <style jsx>

Want to see the progress yourself? Place the following script into a file in your root directory, run it, and enter '.'

import os

def count_style_jsx_instances(directory):
    """
    Recursively counts instances of `<style jsx>` in all files within the given directory.

    Args:
        directory (str): The root directory to start the search.

    Returns:
        int: The total count of `<style jsx>` instances.
    """
    style_jsx_count = 0

    for root, _, files in os.walk(directory):
        for file in files:
            file_path = os.path.join(root, file)
            try:
                with open(file_path, 'r', encoding='utf-8') as f:
                    content = f.read()
                    style_jsx_count += content.count('<style jsx>')
            except (UnicodeDecodeError, FileNotFoundError):
                # Skip files that can't be read
                print(f"Skipped unreadable file: {file_path}")

    return style_jsx_count

if __name__ == "__main__":
    project_directory = input("Enter the path to the project directory: ").strip()

    if not os.path.isdir(project_directory):
        print("Invalid directory. Please provide a valid path.")
    else:
        total_instances = count_style_jsx_instances(project_directory)
        print(f"Total instances of '<style jsx>' found: {total_instances}")

Copy link

stale bot commented Feb 28, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 28, 2025
@stale stale bot closed this as completed Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants