css-modules

    2热度

    1回答

    我想将自定义类添加到我正在学习的应用中的我的Button组件中。 在我Form.js我有 import React, {Component} from 'react'; import Button from './Button'; import styles from '../css/LoginElements.css'; class Form extends Component {

    0热度

    1回答

    我正在使用以网格格式对齐的100个JLabel。 10 x 10. 每个JLabel都有一个与它关联的数字。根据数字的值,JLabel的背景将被设置。因此,一张强度图。值号在同一个类文件中,不同的选项卡上(带数字的10x10表)。 我担心的是,它将采取永远做这样的事情: 私人JLabel的第一个....最后一个100 第一个=新的JLabel(“”) 如果(第一一个值是5){setBackgrou

    0热度

    1回答

    我在webpack.confg以下规则 use: [ { loader: 'css-loader', query: { modules: true, sourceMap: true, importLoaders: 2, localIdentName: '[name]__[local]___[hash:base64:5

    0热度

    1回答

    Modernizr为文档的<html>标记添加类,例如, <html class="no-touchevents">。 在我的代码中,我曾经写过类似这样的东西。 .style { background: green; } .no-touchevents .style { background: red; } 因此,如果支持触摸,元素将为绿色(确定),否则为红色(错误)。现在使用CSS模块,我

    0热度

    1回答

    我的代码如下所示(使用CSS模块): return ( <div> <LandingPage className={styles.hidden} /> </div> ); 不工作(即CSS不适用于元素)。但是,返回 <div> <div className={styles.hidden}> <LandingPage /> </div

    3热度

    1回答

    我需要禁用一个文件的css模块。 请解释我如何能做到这一点 我有两个文件的WebPack 请帮助我configurate和webpack.config.dev.js文件webpack.config.prod.js。 我安装了css模块,教程为https://medium.com/nulogy/how-to-use-css-modules-with-create-react-app-9e44bec2

    2热度

    1回答

    我在那里任何新的CSS文件,我在JS代码创建和import不被添加到输出文件一个非常奇怪的问题。我的webpack配置设置为将我的React组件中所需的所有CSS文件打包到一个名为styles.css的输出文件中。下面是我的配置的相关部分: module.exports = { ... module: { rules: [ ... {

    2热度

    2回答

    我想用sass配置css模块。我跟着一些教程,但似乎没有工作。 webpack配置主要由create-react-scripts创建。我似乎得到这个错误“模块未找到:无法解决'样式'”任何帮助将是伟大的。该错误似乎在我的Modal.js文件中的导入语句中生成。 (从“../css/modal.scss”中导入样式;) 我已经安装了sass loader。我的package.json文件可以在下面找

    1热度

    1回答

    我有一个小问题与在Android中滚动相关。这里是我的xml文件 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" androi

    0热度

    1回答

    我不能使ExtractTextPlugin与css-loader一起使用。我碰到下面的错误,如果我跑webpack -p: ERROR in ./node_modules/css-loader!./app/components/ErrorMessage/styles.css Module build failed: Error: composition is only allowed when