I'm new to Glitch, how can I update CSS of remixed project?


#1

How can I edit the css that’s in the head of the html? And how can I add and include my own css?


#2

Hey,

Your Project

On the front-end,

  • edit public/client.js, public/style.css and views/index.html
  • drag in assets, like images or music, to add them to your project

On the back-end,

  • your app starts at server.js
  • add frameworks and packages in package.json
  • safely store app secrets in .env (nobody can see this but you and people you invite)

In your code ( and all Glitch base projects ) you can find this line in the back-end ( server.js ) :
app.use(express.static('public'));

It’s especially used by express.js to serve static files such as images, css files and javascript files, it uses the “public” directory by default which means every file in that directory is in the front-end and is open to the public ( for more info ),

There is no style.css in your project, to do so, you’ll have to create a new file ( including the public directory in the name ) like this
image

Edit it and you’re good to go.


#3

Thanks so much. This is very helpful. The css I was wondering about was the original styling because if you look at the live site there is existing styling. I’m trying to access that original sheet but I can’t find it.

Regardless I will create another one. Thanks!


#4

That one you’re referring to is the Glitch stylesheet which is located in
https://button.glitch.me/css/glitch.css

To see it in the editor ( unminified ), check this link :