Sass

how to compile multiple scss files into multiple css files with grunt-sass?

我只是一个虾纸丫 提交于 2021-02-08 10:40:23
问题 i would like to compile all SCSS files that are inside scss folder and are not imported ( file names do not start with _ ) each into separate CSS files( that has the same name as SCSS file ). that kind of functionality that can be found in Prepros. is it possible to do it with grunt-sass? i tried this but it doesn't work: sass: { dist: { files { 'css/*.css': 'scss/*.scss', } } } 回答1: You can try: sass: { dist: { files: [{ expand: true, cwd: 'styles', src: ['*.scss'], dest: '../public', ext: '

how to compile multiple scss files into multiple css files with grunt-sass?

纵饮孤独 提交于 2021-02-08 10:37:20
问题 i would like to compile all SCSS files that are inside scss folder and are not imported ( file names do not start with _ ) each into separate CSS files( that has the same name as SCSS file ). that kind of functionality that can be found in Prepros. is it possible to do it with grunt-sass? i tried this but it doesn't work: sass: { dist: { files { 'css/*.css': 'scss/*.scss', } } } 回答1: You can try: sass: { dist: { files: [{ expand: true, cwd: 'styles', src: ['*.scss'], dest: '../public', ext: '

Make divs overlap when space is not enough

拈花ヽ惹草 提交于 2021-02-08 06:36:36
问题 I have a container with fixed sized boxes inside. The container does not have a fixed width. It fills the entire screen width. The boxes have to be always aligned to the right. The boxes should have a margin between them. When the container resizes (browser window becomes small), currently the boxes will break into a second line. But this is not what I want. What I want is the boxes to remain in the same line and reduce the margin between the boxes to make space to keep them in the same line.

SCSS Modules Giving Flow error

余生颓废 提交于 2021-02-07 22:03:57
问题 Updated to Create React App 2 which supports css modules via the following import statement: import styles from "./myStyles.module.scss"; However, flow is complaining saying this: Importing from an untyped module makes it any and is not safe! Did you mean to add // @flow to the top of ./myStyles.module.scss? (untyped-import) This is what the [options] in my .flowconfig file looks like: module.file_ext=.js module.file_ext=.jsx module.file_ext=.scss I've also tried adding the following line:

SCSS Modules Giving Flow error

落爺英雄遲暮 提交于 2021-02-07 22:01:08
问题 Updated to Create React App 2 which supports css modules via the following import statement: import styles from "./myStyles.module.scss"; However, flow is complaining saying this: Importing from an untyped module makes it any and is not safe! Did you mean to add // @flow to the top of ./myStyles.module.scss? (untyped-import) This is what the [options] in my .flowconfig file looks like: module.file_ext=.js module.file_ext=.jsx module.file_ext=.scss I've also tried adding the following line:

Webpack SASS-loader include statement breaks SASS @import statemetns

ぐ巨炮叔叔 提交于 2021-02-07 20:47:37
问题 So for background originally I was excluding the node_modules directory in my Webpack config, which was working fine for my sass @import statements, but made it very difficult to include things from the node_modules directory. So I switched the SASS loader to the following { test: /\.scss$/, include: [path.resolve(__dirname, "/src/client"), path.resolve(__dirname, "/node_modules/angular-material/")], loader: 'style-loader!css-loader!autoprefixer-loader!sass-loader' }, Please also note I tried

Webpack SASS-loader include statement breaks SASS @import statemetns

我与影子孤独终老i 提交于 2021-02-07 20:45:31
问题 So for background originally I was excluding the node_modules directory in my Webpack config, which was working fine for my sass @import statements, but made it very difficult to include things from the node_modules directory. So I switched the SASS loader to the following { test: /\.scss$/, include: [path.resolve(__dirname, "/src/client"), path.resolve(__dirname, "/node_modules/angular-material/")], loader: 'style-loader!css-loader!autoprefixer-loader!sass-loader' }, Please also note I tried

Webpack SASS-loader include statement breaks SASS @import statemetns

僤鯓⒐⒋嵵緔 提交于 2021-02-07 20:43:35
问题 So for background originally I was excluding the node_modules directory in my Webpack config, which was working fine for my sass @import statements, but made it very difficult to include things from the node_modules directory. So I switched the SASS loader to the following { test: /\.scss$/, include: [path.resolve(__dirname, "/src/client"), path.resolve(__dirname, "/node_modules/angular-material/")], loader: 'style-loader!css-loader!autoprefixer-loader!sass-loader' }, Please also note I tried

How to import font-awesome scss correctly

我怕爱的太早我们不能终老 提交于 2021-02-07 20:37:42
问题 I am trying to use an icon from font-awesome with webpack 4 via scss. The webconfig file looks as following: const HtmlWebPackPlugin = require("html-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const path = require("path"); const autoprefixer = require("autoprefixer"); module.exports = { entry: ["./src/index.js"], output: { path: path.resolve(__dirname, "dist"), filename: "bundle.[hash].js" }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: {

How to import font-awesome scss correctly

别来无恙 提交于 2021-02-07 20:32:51
问题 I am trying to use an icon from font-awesome with webpack 4 via scss. The webconfig file looks as following: const HtmlWebPackPlugin = require("html-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const path = require("path"); const autoprefixer = require("autoprefixer"); module.exports = { entry: ["./src/index.js"], output: { path: path.resolve(__dirname, "dist"), filename: "bundle.[hash].js" }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: {