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

Explain how to override theme styles #6107

Merged
merged 3 commits into from May 31, 2017

Conversation

Projects
None yet
5 participants
@Strangehill
Contributor

Strangehill commented May 31, 2017

#5704
#5690 #5690 (comment)

The theme documentation is frustratingly incomplete when it comes to overriding theme styles. This, or something similar, seems long overdue.

@ashmaroli

👍 LGTM

@ashmaroli

This comment has been minimized.

Show comment
Hide comment
Member

ashmaroli commented May 31, 2017

@tomjoht

This comment has been minimized.

Show comment
Hide comment
@tomjoht

tomjoht May 31, 2017

Contributor

I'm glad to see this update. Lots of people have trouble trying to override Sass styles in Minima, and the process wasn't well documented. Thanks!

Re "An alternative, to continue getting theme updates on all stylesheets, is to use higher specificity CSS selectors in your own additional, originally named CSS files." Can you add some more detail here, including an example? This is an important detail that keeps tripping people up. I have seen this issue pop up half a dozen times in the forums.

Can a user add a _sass folder in their project, with a new partial and reference it in the main.css file? If so, would a user would also create an assets folder with main.scss that would be something like this?

@import "minima";
@import "mycustomstyles";

I'm really not sure what the process is or what works. But I do feel that we need more detail around this point.

Also, should we add similar info into the themes page that explains how overriding Sass styles isn't done the same as overriding files in assets, layouts, or includes? This probably important information for theme developers to know.

Contributor

tomjoht commented May 31, 2017

I'm glad to see this update. Lots of people have trouble trying to override Sass styles in Minima, and the process wasn't well documented. Thanks!

Re "An alternative, to continue getting theme updates on all stylesheets, is to use higher specificity CSS selectors in your own additional, originally named CSS files." Can you add some more detail here, including an example? This is an important detail that keeps tripping people up. I have seen this issue pop up half a dozen times in the forums.

Can a user add a _sass folder in their project, with a new partial and reference it in the main.css file? If so, would a user would also create an assets folder with main.scss that would be something like this?

@import "minima";
@import "mycustomstyles";

I'm really not sure what the process is or what works. But I do feel that we need more detail around this point.

Also, should we add similar info into the themes page that explains how overriding Sass styles isn't done the same as overriding files in assets, layouts, or includes? This probably important information for theme developers to know.

@Strangehill

This comment has been minimized.

Show comment
Hide comment
@Strangehill

Strangehill May 31, 2017

Contributor

I think that's exactly how it would work and didn't go into detail because I haven't totally figured it out myself yet and I'm hoping we can shed shed some light here.

On instructions for theme creators: if they were "to ship a default /assets/styles.scss" as the instructions on creating a theme put it, it would seem wise for the creator to update theme styles everywhere but in this file to allow users to modify it freely.

Contributor

Strangehill commented May 31, 2017

I think that's exactly how it would work and didn't go into detail because I haven't totally figured it out myself yet and I'm hoping we can shed shed some light here.

On instructions for theme creators: if they were "to ship a default /assets/styles.scss" as the instructions on creating a theme put it, it would seem wise for the creator to update theme styles everywhere but in this file to allow users to modify it freely.

@DirtyF

DirtyF approved these changes May 31, 2017

@DirtyF

This comment has been minimized.

Show comment
Hide comment
@DirtyF

DirtyF May 31, 2017

Member

Thank you all!

@Strangehill I hope the override process is clearer for our users with this addition. 🎨

@tomjohnson1492 good question, I'm gonna merge this as is for now, and we can go further with multiple Sass files import later. (I don't develop themes myself right now).

@jekyllbot: merge +docs

Member

DirtyF commented May 31, 2017

Thank you all!

@Strangehill I hope the override process is clearer for our users with this addition. 🎨

@tomjohnson1492 good question, I'm gonna merge this as is for now, and we can go further with multiple Sass files import later. (I don't develop themes myself right now).

@jekyllbot: merge +docs

@jekyllbot jekyllbot merged commit 8a8b055 into jekyll:master May 31, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

jekyllbot added a commit that referenced this pull request May 31, 2017

@Strangehill Strangehill deleted the Strangehill:patch-3 branch Jun 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment