Get to know react

Time:2021-7-22

Clsss should use classname <div className="color-light">

The structure of documents now seems to refer to each other

Subtitle SCSS introduction

In order to look at the comfortable and faster selection label, I decided to use SCSS. The demo comes with less, but relatively speaking, SCSS is more familiar and is not successful

{
          test: /\.(le|c|sc)ss$/,
          use: [
            MiniCssExtractPlugin.loader,
            {
              loader: 'css-loader',
            },
            {
              loader: 'postcss-loader',
              options: {
                ident: 'postcss',
                plugins: [require('autoprefixer')()],
                plugins: () => [
                  //Add this plug-in to the plug-in of postcss loader
                  //Px2rem ({remunit: 75}) means 1rem = 75px. This is based on the 750px design draft. If it is 620, write 62
                  px2rem({ remUnit: 75 })
              ]
              },
            },
            {
              loader: 'less-loader',
            },
          ],
        }

Later, I couldn’t help but use less. When rem2px was introduced, I found that the location of the addition was wrong. The specific configuration of webpack should be to remove itscssIn any case, it’s OK to add it directly with less.

Recommended Today

Write OS kernel from scratch – run shell

Series catalog Preface preparation BIOS boot to real mode GDT and protection mode On virtual memory Load and enter the kernel Display and print Global descriptor table GDT Interrupt processing Virtual memory perfection Implement heap and malloc First kernel thread Multithreading operation and switching Lock and multithreading synchronization Enter user status Process implementation system call […]