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

How to overwrite styles #10

Closed
Organikk opened this issue Mar 5, 2018 · 8 comments
Closed

How to overwrite styles #10

Organikk opened this issue Mar 5, 2018 · 8 comments

Comments

@Organikk
Copy link

Organikk commented Mar 5, 2018

Hi there,

I'm getting the following error when trying to build my site:

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                    File to import not found or unreadable: node_modules/normalize.css/normalize. Load paths: /Library/Ruby/Gems/2.3.0/gems/jekyll-sleek-0.1.3/_sass /Library/Ruby/Gems/2.3.0/gems/jekyll-sleek-0.1.3/_sass /Library/Ruby/Gems/2.3.0/gems/jekyll-sleek-0.1.3/_sass on line 1
jekyll 3.7.3 | Error:  File to import not found or unreadable: node_modules/normalize.css/normalize.
Load paths:
  /Library/Ruby/Gems/2.3.0/gems/jekyll-sleek-0.1.3/_sass
  /Library/Ruby/Gems/2.3.0/gems/jekyll-sleek-0.1.3/_sass
  /Library/Ruby/Gems/2.3.0/gems/jekyll-sleek-0.1.3/_sass on line 1

Attempting to overerwrite with the following file: /assets/css/main.scss:

---
---

@import "main";

I have the following node packages installed:

"dependencies": {
    "breakpoint-sass": "^2.7.1",
    "normalize.css": "^7.0.0"
  },

Any help would be appreciated, thanks.

@Organikk
Copy link
Author

@janczizikow Any chance you could help with this? Thanks!

@janczizikow
Copy link
Owner

Hey @Organikk,

Really sorry for late answer on this, was quite busy and I didn't really maintain the repo during past few months. Did you try to remove the import of normalize from _sass/vendor/_normalize.scss? What you could try doing is to remove the import of normalize in the file mention above and see if the error still occurs. If that's the case as a dirty workaround you can just copy paste normalize.css to _sass/vendor/_normalize.scss.

The SASS architecture in this projects follows the 7-1 pattern. So main.scss just imports all the partials into 1 file.

@Organikk
Copy link
Author

@janczizikow Thanks for getting back to me. I will give that a shot and report back.

@Organikk
Copy link
Author

@janczizikow I should mention that I'm attempting to do this without actually cloning the repo and just using it via this method https://github.com/janczizikow/sleek#installing-to-existing-jekyll-project

Is there a way I can overwrite styles using that method?

Thanks

@janczizikow
Copy link
Owner

Hey @Organikk ,

ok, I now I understand what's the issue here. I think the import for normalize and other vendor css isn't going to work when installing the the theme through ruby. I'll fix this, but as for temporary solution you can do the following (in your project directory):

# On MacOS
open $(bundle show jekyll-sleek)
# On Windows
explorer /usr/local/lib/ruby/gems/2.3.0/gems/jekyll-sleek-0.1.3

This should open the folder containing the theme. In that folder you can navigate to _sass/vendor. Inside you can find normalize.scss and breakpoint.scss. Those 2 sass partials contain imports from node_modules folder, which is non available, hence the error occurs. You can replace the normalize and breakpoint with actual css. It's a bit dirty solution, so I'll make sure to fix this soon.

Then you could just update the jekyll-sleek gem. So this shouldn't happen again.

@janczizikow
Copy link
Owner

Hey @Organikk I just updated the gem of the theme, you can run bundle update jekyll-sleek in your project directory. Now the issue shouldn't occur. You can also customize theme by following gh-pages guide: https://help.github.com/articles/customizing-css-and-html-in-your-jekyll-theme/

Let me know if the fix helped.

@stevenstetzler
Copy link
Contributor

I am still getting the same problem with the latest version of the theme. I have my custom CSS in the file assets/css/main.scss which has the contents

---
---

@import "jekyll-sleek";
<custom_css_here>

per the instructions for customizing CSS in a Jekyll theme. Upon execution of jekyll build I receive the error

  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                    File to import not found or unreadable: node_modules/breakpoint-sass/stylesheets/breakpoint. Load path: /mnt/c/Users/Steven/Desktop/Projects/spsatuva.github.io/_sass on line 1
jekyll 3.8.3 | Error:  File to import not found or unreadable: node_modules/breakpoint-sass/stylesheets/breakpoint.

Please let me know if you have any suggestions on how to fix this. The repo is here: https://github.com/spsatuva/spsatuva.github.io/

Thanks!

janczizikow added a commit that referenced this issue Jun 22, 2018
@janczizikow
Copy link
Owner

Hey @stevenstetzler,

Please update the gem in your repo by running bundle update jekyll-sleek in your project directory. I replaced the npm package with my own sass mixin, so now this should be resolved. Please let me know if that helped!

kamil-adam referenced this issue in degustujacaistota/sleek Jan 8, 2020
kamil-adam referenced this issue in degustujacaistota/sleek Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants