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

Unused css file in starter code that can be potentially misleading #109

Closed
hanameee opened this issue Jan 2, 2023 · 2 comments · Fixed by #181
Closed

Unused css file in starter code that can be potentially misleading #109

hanameee opened this issue Jan 2, 2023 · 2 comments · Fixed by #181

Comments

@hanameee
Copy link

hanameee commented Jan 2, 2023

Hi. Thanks for the great tutorial 👏

1. Unused css file in starter code
There is globals.css file in /styles directory from the very first starter learn-starter, all the way through assets-metadata-css-starter.

However the only css file that is imported & used in those starters is styles/Home.module.css, not styles/globals.css.
image

Are there any reasons that the file (globals.css) is included in those starters despite the fact it is not used?🤔

2. Potentially misleading guide

In addition, Assets, Metadata, and CSS tutorial mentions the presence of styles directory (+ and unused /globals.css file).
image

Although the starter used in tutorial already have styles directory as mentioned, tutorial guides us to create styles directory.
image

And at this point I was confused, since I already got globals.css file but tutorial guides me to create global.css which seems like a typo! (considering similarity of the name for those 2 file)

After this Assets, Metadata, and CSS tutorial, the unused globals.css file is gone, and only global.css file (that is used in pages/_app.js) remains.

image


So, my point is...

  • Is there any reason that unused globals.css exists?
  • If not, it would be nice and clear if it's removed from starters, and also from tutorial.
@Pannu786
Copy link

Pannu786 commented Feb 5, 2023

And I thought I was the only one who was facing this issue..

@jmmarco
Copy link

jmmarco commented Sep 8, 2023

I think that removal of the global style file might be an option, like @hanameee pointed out, it's not mentioned till later chapters. Another option would be just to rename the conflicting file, since it is simply a file name inconsistency. It'll still be present in the first chapters, but at least the name would be the same for later chapters.

In any case, we would want to consult @manovotny or @delbaoliveira to see what they have to say.

Here's my findings:

Based on this information, the simplest approach is to rename the styles filename for the first two starter code templates. I'll go ahead and open a PR to get things rolling 👌

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