Welcome! To use this support forum, please Login or Join Today!

   

SASS workflow

{name}
Rank

Total Posts: 23

Joined 2015-08-06

PM

 
Hi Casey,

I'm a long-time Mobius child themer, sometimes with WooCommerce, and lover of all things SMPL. From this point forward, I'm moving to a local SASS workflow (with DesktopServer, CodeKit, Git via SourceTree). I'm wondering if the wisest move is to change to Lightfast or Avery for future projects or, alternatively, just try to incorporate a version of those newer SASS master files into a Mobius workflow. My apologies if this overlaps too much with this separate post about a SMPL starter theme.

What is your recommendation considering the future development roadmap of SMPL?

It's a broad question, but I'm genuinely interested in your opinion as you're clearly a seasoned developer with intimate knowledge of where things are headed. Any feedback is greatly appreciated.
{name}
Rank

Total Posts: 23

Joined 2015-08-06

PM

 
I should've marked this thread as "solved" a long time ago. My apologies!

For anyone interested, adding SASS to your Mobius workflow is as simple as including the appropriate folder/files in your local development workflow.

Valid CSS3 stylesheets (like those found in Mobius) are also considered valid SCSS files. To get started, simply rename your child theme's CSS files to SCSS and drop them into a SASS folder. You can choose where to compile the CSS when changes to SCSS files are processed. In my case, changes compile to the main.css file in the CSS folder (see attached Codekit screenshot).

You'll also need to register and enqueue the new CSS files in your child theme's functions.php file. There are numerous ways to do this, but here's one example:

<?php

/*-----------------------------------------------------------------------------------*/
// Register Core Stylesheets
/*-----------------------------------------------------------------------------------*/

function st_registerstyles() {
    wp_register_style
('my_custom_styles'get_stylesheet_directory_uri().'/css/main.css', array(), $version'screen, projection');
    
wp_enqueue_style('my_custom_styles');

}
add_action
'wp_enqueue_scripts''st_registerstyles');

?> 


Hope this helps anyone that was following. Let me know if you have any questions!


Attachments:

https://www.filepicker.io/api/file/d8NsxMLtShGBUmvd8RB8