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

Refactor styles.scss #32

Open
paperdigits opened this issue Nov 2, 2016 · 7 comments
Open

Refactor styles.scss #32

paperdigits opened this issue Nov 2, 2016 · 7 comments

Comments

@paperdigits
Copy link
Contributor

Now that we have that sweet, sweet sass, we should make sure all the classes are nice and clean and get maximum reuse out of our sass!

@paperdigits
Copy link
Contributor Author

paperdigits commented Dec 28, 2016

@patdavid I wanted to get rid of the individual index.css files in each article (articles for now, since apparently index.css are in several places), and use the stylesheet field in the article metadata to specify the name of a class you want to hook into with CSS.

So in the index.md for the article, you'd have:

---
title: Some Title
author: A. Guy
stylesheet: some-title-unique-string
---

Then in a SASS file, you'd have:

.some-title-unique-string {
border-top: 24em;
background: blue;
}

That way we could have one SASS file for all the extra article CSS.

I think that'd help us consolidate and it'd cut back the number of calls to the web server.

What do you think of that?

I had originally thought we had a page slug in there that was a unique string that represented the article, but apparently we're doing that with the folder name.

@patdavid
Copy link
Member

patdavid commented Dec 28, 2016

I like it! Lets us deal with oddball style cases as needed which is nice. I'd say go for it.

Though - we should check that it's really even needed still for most pages. I thought I had started cleaning out posts that used specific stylesheets in order to support this. It might be that most articles don't even have unique stylesheet needs anymore...

@paperdigits
Copy link
Contributor Author

paperdigits commented Dec 28, 2016 via email

@paperdigits
Copy link
Contributor Author

@patdavid can you check out the sass-class-slug branch? I think I've gotten rid of all the index.css files without breaking the site. Unfortunately, I don't have backstop.js setup anymore :( I need to redo that.

@patdavid
Copy link
Member

I'll pull it down later today and test it against a backstop image.

@paperdigits
Copy link
Contributor Author

@patdavid let me know what happened with the sass-class-slug branch when you have a moment!

@patdavid
Copy link
Member

patdavid commented Feb 27, 2017 via email

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

No branches or pull requests

2 participants