Sass

Why is no Ruby script found in input (LoadError)?

血红的双手。 提交于 2021-02-18 10:58:09
问题 Ruby is installed by rbenv. $ ruby -v ruby 1.9.3p327 (2012-11-10 revision 37606) [i686-linux] $ which ruby /home/user/.rbenv/shims/ruby $ which sass /home/user/.rbenv/shims/sass $ gem list *** LOCAL GEMS *** bigdecimal (1.1.0) bundler (1.2.4) io-console (0.3) json (1.5.4) minitest (2.5.1) rake (0.9.2.2) rdoc (3.9.4) sass (3.2.5) This is my config.yml: # Assetic Configuration assetic: // ... ruby: /home/user/.rbenv/shims/ruby filters: cssrewrite: ~ sass: bin: /home/user/.rbenv/shims/sass // ..

Include sass in gatsby globally

房东的猫 提交于 2021-02-18 10:56:12
问题 I have the following project structure: gatsby-config.js /src /components layout.jsx /button button.jsx button.scss /pages /styles styles.scss _mixins.scss _variables.scss and gatsby-config.js and styles.scss are configured respectively in the following way: ... plugins: [ ..., `gatsby-plugin-sass` ] ... @import 'variables', 'mixins'; in order to access the mixins and variables, the styles.scss is being currently imported in all the components' scss files, e.g.: //button.scss @import './..

Wait for CSS to load before JS in React [FOUC]

情到浓时终转凉″ 提交于 2021-02-18 05:13:54
问题 We are building our new website entirely in React and utilizing code-splitting & scss. Whenever a new page is requested it loads the raw HTML in the browser first and then a split second or so later the css styling comes in, seems to be a FOUC issue. This makes for a terrible experience and we need to figure out how to ensure the CSS is loaded before rendering the component(s). Does anyone have any experience with this? There seems to be a lack of information online currently with this issue.

Wait for CSS to load before JS in React [FOUC]

纵然是瞬间 提交于 2021-02-18 05:13:37
问题 We are building our new website entirely in React and utilizing code-splitting & scss. Whenever a new page is requested it loads the raw HTML in the browser first and then a split second or so later the css styling comes in, seems to be a FOUC issue. This makes for a terrible experience and we need to figure out how to ensure the CSS is loaded before rendering the component(s). Does anyone have any experience with this? There seems to be a lack of information online currently with this issue.

Webpack5 Automatic publicPath is not supported in this browser

泄露秘密 提交于 2021-02-18 03:42:13
问题 I was working on webpack 4.44.2, I face this error when I convert to webpack5.0.0 ERROR in ./src/assets/sass/styles.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): Error: Automatic publicPath is not supported in this browser at E:\maktab\Control-panel\newcontrol\final-control\node_modules\css-loader\dist\cjs.js! the error is from the font file bath in fonts.scss @font-face { font-family: "Janna LT"; src: local("Janna LT"), url(../fonts/janna.woff) format

vue-cli脚手架——3.0版本项目案例

只谈情不闲聊 提交于 2021-02-17 09:50:39
一、【准备工作】 node与git部分见 vue-cli2.0 搭建案例 vue-cli3.0 是一个基于 Vue.js 进行快速开发的完整系统。有三个组件: CLI : @vue/cli 全局安装的 npm 包,提供了终端里的vue命令(如:vue create 、vue serve 、vue ui 等命令) CLI 服务 : @vue/cli-service 是一个开发环境依赖。构建于 webpack 和 webpack-dev-server 之上(提供 如: serve 、 build 和 inspect 命令) CLI 插件 :给Vue 项目提供可选功能的 npm 包 (如: Babel/TypeScript 转译、ESLint 集成、unit和 e2e测试 等) 全局安装过旧版本的 vue-cli (1.x 或 2.x)要先卸载它,否则vue -V查看依旧是2.x旧版: npm uninstall vue-cli -g // 或者 yarn global remove vue-cli vue-cli3.0需要 nodeJs ≥ 8.9 (官方推荐 8.11.0+,你可以使用 nvm 或 nvm-windows 在同一台电脑中管理多个 Node 版本) node -v // 查看版本 安装@vue/cli(vue-cli 3.0的包名称由 vue-cli 改成了 @vue

Pass string into variable in sass mixin

烈酒焚心 提交于 2021-02-17 05:17:04
问题 I have a very simple mixin which looks like this: @mixin global( $variable-name ) { font-size: #{$variable-name}-font-size; } I have previously defined variable $input-font-size and pass it into the mixin in the following format @include global( input ); Problem is that the sass is not converting it and browser returns : font-size:input-font-size How should I write my mixin to actually return the value from $input-font-size please? Thank you for your advice in advance! 回答1: You can't create a

SCSS: parent hover selector

风格不统一 提交于 2021-02-16 10:24:16
问题 In scss we can use a parent selector class: <div class="parent is-active"> <div class="children"></div> </div> .parent { width: 200px; height: 200px; } .children { height: 100px; width: 100px; .is-active & { background: red; } } example How would you write a parent hover selector? 回答1: If I understand your question correctly: https://jsfiddle.net/wx9L9jzj/3/ SCSS: .parent { width: 200px; height: 200px; } .children { height: 100px; width: 100px; .is-active & { background: red; } :hover > & {

SCSS: parent hover selector

不想你离开。 提交于 2021-02-16 10:24:06
问题 In scss we can use a parent selector class: <div class="parent is-active"> <div class="children"></div> </div> .parent { width: 200px; height: 200px; } .children { height: 100px; width: 100px; .is-active & { background: red; } } example How would you write a parent hover selector? 回答1: If I understand your question correctly: https://jsfiddle.net/wx9L9jzj/3/ SCSS: .parent { width: 200px; height: 200px; } .children { height: 100px; width: 100px; .is-active & { background: red; } :hover > & {