最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sass - Overriding CSS settings in a Jekyll Gem-based theme - Stack Overflow

programmeradmin2浏览0评论

I have Jekyll running locally with a theme I like, no-style-please. Everything is working as expected.

However, on some content, the overall page width is a little smushed. I hunted around in the repo and found the master/_sass/no-style-please.scss file has this in it:

*:target { background: yellow; }

.w {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

Without getting into a tangent on CSS/SCSS/SASS (all of which I can barely spell), A bit of experimentation shows that changing that max-width setting from 640px is the direction I want to go.

I also know I could download and install the theme locally, but then I would be disconnected from future theme development and improvements doc. SO I would like to override just that setting locally. Is that possible? Or am I just inventing a convenient but impossible solution?

In the Jekyll documentation there is a section about Overriding Theme Defaults, when I created a _sass/no-style-please.css in my site folder and included only the section of that file I excerpted above I was able to change 640px to 1640px and the pages displayed wider, but I lost all of the other formatting.

Must I copy the whole of that no-style-please.css file in order to override only that setting?

发布评论

评论列表(0)

  1. 暂无评论