Configure compass browser support (Compass 1.x syntax)

Excluding browsers is done by modifying the $graceful-usage-threshold variable. If Browser X only has 4.99% of the market share, you want to set it to 5. $debug-browser-support: true; $browser-minimum-versions: ( “ie”: “9” ); $graceful-usage-threshold: 4.46163; @import “compass”; .foo { @include opacity(.5); @include border-radius(10px); } Output: .foo { /* Content for ie 8 omitted. Minimum support … Read more

How to get SCSS variables into react

UPDATE: The original answer claims that it is only supported by webpack, but this is no longer true. Many bundlers now support this via their own css processing pipeline. Original Answer: That’s a webpack/css-loader feature and only works with webpack and css-loader (https://webpack.js.org/loaders/css-loader/#separating-interoperable-css-only-and-css-module-features) Important: the :export syntax in your SCSS/CSS files will only work for … Read more

SASS compile fontawesome preserve notation

Extract from Sass 3.4.0 changelog: Sass now follows the CSS Syntax Level 3 specification for determining a stylesheet’s encoding. In addition, it now only emits UTF-8 CSS rather than trying to match the source encoding. Now no way for use old method Issue on SASS repo For me, rollback to SASS 3.3.14 fix this

How to combine and use multiple Next.js plugins

You can use next-compose-plugins and combine multiple next.js plugins as follows: // next.config.js const withPlugins = require(‘next-compose-plugins’); const withSass = require(‘@zeit/next-sass’); const withCSS = require(‘@zeit/next-css’); module.exports = withPlugins( [ [withSass, { /* plugin config here … */ }], [withCSS, { /* plugin config here … */ }], ], { /* global config here … */ … Read more

Sass import error in Rails 3 app – “File to import not found or unreadable: compass”

I was getting this error. I changed this line in my application.rb from: Bundler.require(:default, Rails.env) if defined?(Bundler) to: Bundler.require(*Rails.groups(:assets => %w(development test))) if defined?(Bundler) Also, make sure the files are names something.css.sass NOT something.sass And one other thing, I had an old compass.rb file in my config directory which isn’t needed in Rails 3.2. Deleting … Read more