shopify hydrogen and sass setup - sass

hi can somebody explain me how to setup sass module in hydrogen project.
I looked in the documentation but nothing really helpfull.
I ve tried also to add sass dependency but still doesn't recognize my sass file.

I just install sass module and then make files on each component named styles.module.scss and it works perfectly.

Related

include Compass in compiling SASS in Ionic framework?

Does anybody knows how to include compass in an Ionic 2 project?
I have tried to import compass-sass, but I can't find a path to set the compass preprocessing in my styles.
As pointed by this stackoverflow answer use this Compass lib
How i implemented in my Ionic 2+ project.
Installed via npm - npm install compass-sass-mixins
Imported to my project by adding #import "../../node_modules/compass-sass-mixins/lib/compass"; in file app.scss
Then run ionic serve
Hope this helps to implement useful mixins

How do I start a SASS project in Sublime Text 2

I have all the correct packages installed and have SASS running. Now I just need to figure out how to start a project with it. Are there any pre-built templates that show you the file structure, etc...Any help would be great!
An easy way would be to install Compass (http://compass-style.org/) and then it's a simple as running:
compass create project-name
Which would create the structure for you.
And then to compile
compass watch
More can be seen here http://thesassway.com/beginner/getting-started-with-sass-and-compass

Setting up SASS with jekyll?

I've been trying to setup SASS (and Bourbon.io) with jekyll for a personal blog on github pages.
I've changed the name of the css folder that is installed with jekyll to stylesheets and within stylesheets I have two folders, css and sass.
I start my jekyll server locally with: jekyll serve --watch
Then in another terminal window: sass --watch stylesheets/sass:stylesheets/css
But I am now getting the following message:
`/' not found.
Prior to attempting to setup SASS with my jekyll project, my site was displaying. Any links for setting up sass with jekyll would be helpful. Thanks.
New in Jekyll 2.0 is native processing of Sass and CoffeeScript:
http://jekyllrb.com/docs/assets/#sassscss
hope not being to late, for what you are pretending there are many approaches for example i use bourbon, neat in a jekyll project and use grunt tasks for local development.
Another option is to use a rakefile with some task to handle both programs (jekyll and sass) or as favrizio suggested use jekyll's pluging.
I reccomend you to take a look to grunt.
This happens usually if you have messed with the site baseurl in the _config.xml and it can no longer resolve itself to find the index.html.

Importing Compass styles with Sass using Yeoman

I created a project using yo webapp (with the generator-webapp installed obviously).
Everything is fine, but I'm still missing something. I'm sure it's such an easy answer that I'll never come back to SO because I'll be too embarrassed.
I want to use Compass, which comes out of the box with Yeoman, but I don't know how. I mean, obviously #import "compass...etc" inside any Sass files won't work since inside app/bower_components (the default path for Sass #imports specified inside Gruntfile.js) there's no compass directory.
What should I do now in order to import Compass stylesheets?
You can use compass just as you would usually do. If you set up a vanilla compass project with compass create, there is compass folder either. If you want to use any of the helpers compass ships with, you can import them just as described in the documentation, e.g.
#import "compass/css3";
.mybox {
#include box-shadow(red 2px 2px 10px);
}
main.scss
You would have to install grunt task for compass with npm install grunt-contrib-compass and adjust your Gruntfile.js to add a task for compass compilation.
It may appear not that easy since it has some tricky parts like to compile your sass to .temp/main.css to use for testing/livereload, and then minify it into your dist when doing final build.
The most easy way might be to just try another generator that has compass in a separate directory. For example angular generator has compass and even bootstrap for compass. It's pretty cool.

Use Bourbon SASS library with LiveReload

I'd love to use Bourbon with LiveReload but I can't seem to get them to work together. Anybody successfully made these two play nice?
If you use the 'Run a custom command after processing changes' option rather than the standard compilation option, then you can use the commands as detailed on the readme.
# Example (project root directory)
sass --watch stylesheets/sass:stylesheets -r ./stylesheets/sass/bourbon/lib/bourbon.rb
I wrote a blog post covering this.
If you install the latest version (3.0.0) of Bourbon and install bourbon into your compass sass directory:
bourbon install --path ./sass
You can then use LiveReload with one small tweak. You will need to replace LiveReload's version of SASS with at least 3.2.3, since Bourbon requires this.
Instructions on how to replace LiveReload's default SASS version can be found here: http://carl-topham.com/theblog/post/changing-version-sass-livereload/
This seems to work for me.
I've been told you can get it to work by passing the lib/bourbon.rb file into the "Run a custom command" option in LiveReload. See attached image.

Resources