Sass

React component styling being overridden by global styling

怎甘沉沦 提交于 2020-07-18 06:27:01
问题 Okay, just to state the problem right away, I have a situation where stylesheet B which is being loaded (or so I thought) AFTER stylesheet A, and should therefore be overriding A's styling because of cascading, is in fact being loaded into the browser BEFORE A. The order is wrong. I have a simple React component structure as follows: App > Header > Home > Footer In my 'index.js' I have the basic order of statements: import './assets/theme/theme_specific/scss/style.scss'; render( <Router

Why Can't My AWS instance install node-sass pacakage?

独自空忆成欢 提交于 2020-07-18 04:59:33
问题 I made an app using Node and am trying to host it using AWS's Elastic Beanstalk, but it always fails npm install when it reaches node-sass. Here is the error from the logs: 5162 error node-sass@4.5.0 postinstall: node scripts/build.js 5162 error Exit status 1 5163 error Failed at the node-sass@4.5.0 postinstall script 'node scripts/build.js'. 5163 error Make sure you have the latest version of node.js and npm installed. 5163 error If you do, this is most likely a problem with the node-sass

Is it possible to set custom breakpoints in Bootstrap 4 just by editing the CSS files?

允我心安 提交于 2020-07-16 07:14:21
问题 Before I get completely shot down in flames on here, I can't think of any other way of wording or phrasing this question other than how I'm doing as follows.... I would like to set 2 additional breakpoints in Bootstrap 4 for 1366px and 1920px as Bootstrap's xl is very limited at just 1200px. My page references bootstrap.min.css and bootstrap.bundle.min.js. I have added --breakpoint-xxl:1366px;--breakpoint-xxxl:1920px; directly after --breakpoint-xl:1200px; in the boostrap.min.css file and I

Make a div position fixed

爷,独闯天下 提交于 2020-07-10 07:33:21
问题 I am making a very simple application where there is a need to implement parallax effect. Things I have tried as of now, -> Placed an image inside a div with class parallax . -> Then placed an overlay div with bootstrap class card item-card card-block with headline, image and some text inside it. .parallax { width: 100%; height: 250px; border-radius: 0; } .item-card { flex-direction: column; box-sizing: border-box; display: flex; place-content: center flex-start; align-items: center; margin:

Make a div position fixed

↘锁芯ラ 提交于 2020-07-10 07:32:10
问题 I am making a very simple application where there is a need to implement parallax effect. Things I have tried as of now, -> Placed an image inside a div with class parallax . -> Then placed an overlay div with bootstrap class card item-card card-block with headline, image and some text inside it. .parallax { width: 100%; height: 250px; border-radius: 0; } .item-card { flex-direction: column; box-sizing: border-box; display: flex; place-content: center flex-start; align-items: center; margin:

Indenting list items with fontawesome icon

二次信任 提交于 2020-07-09 05:56:22
问题 I am trying to make my list items with fontawesome icons look like this: but at the moment, they look like this: Here my HTML: <section id="black-studio-tinymce-6" class="widget widget_black_studio_tinymce"> <h2 class="widget-title">Contact Us</h2> <div class="textwidget"> <ul> <li>021 552 1187</li> <li>info@powersol.co.za</li> <li>Unit S19 Spearhead Business Park<br> cnr Montague Drive & Freedom Way<br> Montagu Gardens<br> Cape Town, South Africa</li> </ul> </div> </section> Here my styling:

Webpack generates js files with css / scss files

心已入冬 提交于 2020-07-09 05:14:32
问题 Description In webpack I am using mini-css-extract-plugin : plugins: [ new MiniCssExtractPlugin({ filename: '[name].[hash].css', chunkFilename: '[name].[hash].css', }) ] To load scss files in chunk files : { test: /\.scss$/, use: [ { loader: MiniCssExtractPlugin.loader, options: { hmr: isdev, reloadAll: true } }, "css-loader", "sass-loader", ] } When I load a scss with an dynamic import : import(/* webpackChunkName: "test" */ 'test.scss') It will generate a test.[hash].css containing the

Webpack generates js files with css / scss files

十年热恋 提交于 2020-07-09 05:14:23
问题 Description In webpack I am using mini-css-extract-plugin : plugins: [ new MiniCssExtractPlugin({ filename: '[name].[hash].css', chunkFilename: '[name].[hash].css', }) ] To load scss files in chunk files : { test: /\.scss$/, use: [ { loader: MiniCssExtractPlugin.loader, options: { hmr: isdev, reloadAll: true } }, "css-loader", "sass-loader", ] } When I load a scss with an dynamic import : import(/* webpackChunkName: "test" */ 'test.scss') It will generate a test.[hash].css containing the

Running SASS on Gatsby not working

孤街醉人 提交于 2020-07-08 11:52:17
问题 Yesterday, I was able to setup a starter-pack instance of gatsby and deploy to github pages. Since then, I've updated my react/js files locally, which seemed to run fine locally. Now I want to compile my sass: I can't find a decent solution which works: Here's the sass compiler I tried to install: sass --watch assets/scss/main.scss:assets/css/style.css Node sass watch runs, but doesn't actually compile anything. I get an error instead: Problems: 1) Since installing the sass ./src/assets/scss

Getting Undefined variable error when compiling SCSS using node-sass

◇◆丶佛笑我妖孽 提交于 2020-07-08 07:05:01
问题 package.json "scripts": { "compile:sass": "node-sass sass/main.scss css/style.css -w" } main.scss @import "abstracts/variables"; @import "base/typography"; _variables.scss $color-light-grey: #777; $color-white: #fff; _typography.scss body { color: $color-light-grey; } .heading-primary { color: $color-white; } Now my issue is when I'm trying to compile with npm run compile:sass it throws the following error: "message": "Undefined variable: \"$color-light-grey\"." 回答1: Looks like there are two