• Since the Textbook theme is aimed at “schools, colleges, and other non-profit organizations”, I would expect that the color scheme can be easily adapted to match the existing branding of a school.

    Unfortunately there’s no option in the Customizer that would allow to change the color scheme. So we need to do this with CSS overrides. The color #ce4639, for instance, is used 86 times in style.css.

    It would be much more practical to define this with a variable in a SASS file, then generate the CSS.

    Would it be possible for this theme to inclue the SASS source file, that was probably used by the theme designers? In accordance with the theme’s GPL licence the “complete source code” must be included anyway.

Viewing 5 replies - 1 through 5 (of 5 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi there, we use SASS in initial theme development, but when the theme is released, we remove the SASS files since we do not use them in maintenance and enhancement revisions as it can get cumbersome. If we included the SASS files, they would likely be out-of-date on our first revision.

    Search and replace would be one option for you, but you might want to consider using CSS Variables instead, which are pretty well supported by browsers now-a-days.

    Thread Starter Manuel Schmalstieg

    (@targz-1)

    Thanks for the insights! I was under the assumption that the theme engineers would continue to use the SASS source for maintenance and updates.

    Also, thanks for suggesting CSS variables, I’m looking forward to start using them.

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    You are welcome, and I’m looking forward to using the variable too. I have not yet delved into them very deeply, but they look like they are going to make things a lot easier. CSS3 just keeps getting better and better. I look back 5 years, even 3 years, and can’t believe all the great things that have come along.

    Thread Starter Manuel Schmalstieg

    (@targz-1)

    Indeed, it’s an exciting time, especially the new layout modules…

    I’d like to add some more thoughts on this topic.

    I have been helping through last week with the launch of a WordCamp site -https://2018.lausanne.wordcamp.org/ – using the WCEU 2017 base theme.

    This lead my to study the SASS / CSS structure built by Lucijan Blagonic for this theme – see https://github.com/lucijanblagonic/wceu-2017/blob/master/source/assets/stylesheets/style.scss

    The stylesheet refers to https://codeguide.co/ and I think those are indeed some great principles that could be adopted by WordPress theme authors.

    Also, I found it helpful to be able to navigate the SASS architecture, to understand how the styles are organized. I find this much more difficult to do in a single file of 3800 lines of CSS.

    I don’t have a perfect solution for this, but I think that the development setup of the theme’s stylesheets contains a lot of potential for learning and understanding. You don’t get that level of clarity by using search-replace, or cherry-picking CSS overrides through the browser’s inspector tool.

    It would be great if that “stylesheet intelligence” could be somehow preserved when a theme gets released.

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Thanks a lot for the links. I’ll look them over and pass them along to the theme developers for consideration.

    I know for most users, SASS causes them to scream and run away. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Color overrides – Sass files?’ is closed to new replies.