-
Notifications
You must be signed in to change notification settings - Fork 189
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
Refactor frontend CSS into CSS-in-JS #741
Comments
While I was trying to figure out why I cannot load the myfeeds page, 2 issues that you mentioned @Silvyre were resolved. What do you think if I'll try to replace CSS with CSS-in-JSS for release 0.7? |
As far as I can tell, As such, these tasks still need to be completed:
Is your experience different, @yatsenko-julia?
I don't believe that we've come to a full agreement on this matter. While I support this initiative, others might not. Let's chat about that tomorrow, in class. |
Thanks for your reply, @Silvyre. I still cannot reproduce your issue. I've tried Safari and Chrome before I saw that you are using Firefox. When I run the project in Firefox instead of styles I receive inline styles. Here is a screenshot: I also tried to change index.css, rebuild containers and restarted the app, but there are no visible changes. ( I added font size and color changes to the Could you please help me understand why my changes do not take effect and how can I reproduce your issue? |
Oh, I see; it seems like you're encountering the same phenomenon that Cindy just commented on here: #748 (comment) You are viewing an incompletely-styled You should navigate to http://localhost:8000/myfeeds. |
The focus of this issue has shifted. The original post has been updated accordingly. |
Blocking #922. |
Taking this, as we need it now. |
All of our convential frontend CSS styling solutions should be refactored into Material UI's CSS-in-JS styling solution.
(Old issue text)
Currently
index.css
imposes its styling rules upon all Gatsby Pages. While developing theAdd Feeds
component, I found some of these rules (namely the scaled-down font size) to be less-than-helpful, as I noted in my pull request:This is not, however, the only styling issue I ran into with
index.css
. I noticed that, due to the stylesheet enforcing abody
height of100vh
, theAdd Feed
component's current use of margins forces an unnecessary scrollbar to appear:There is some discussion about eventually replacing our CSS files, like
index.css
, with CSS-in-JS (JSS). Until we have come to an agreement to that end, I believe that refactoring our CSS files (i.e. to ensure their global styling does not adversely affect new components) prevents a good stop-gap. (Again, at this point, we definitely don't want to outright remove any CSS files...)To summarize what I believe should be done:
index.css
to be more selective about the components it targets (namely the incomingAdd Feeds
component):Add Feeds
component from being targeted. (This rule is currently causing theAdd Feeds
component to be rendered too small.)100vh
body
height should be reworked to exempt at least theAdd Feeds
component from being targeted. (This rule is currently causing theAdd Feeds
page to have an unnecessary scroll bar.)Please note that, however, these global styling rules should keep affecting existing/working components (as we can assume that these components have been designed with this global styling in mind)!
@yatsenko-julia expressed interest in tackling this, so I am assigning this issue to her! (Julia, please feel welcome to reach out to me if you have any questions, or would like any assistance with this!)
The text was updated successfully, but these errors were encountered: