recently created a project using create-react-app, and because of the variety of project themes, multiple style files are required for style definition.
The original idea ofis to define a css file, which is introduced where you need to use it through the distinction of naming (. Base_background:-sharpff0000;), but this method is too troublesome, and you need to add a class name (quite a lot of class names) in addition to the element"s own class name. And each component has to introduce theme style files, increasing redundancy.
then try to define scss, globally to control the theme style through variable syntax. See an article on vue that allows variable introduction through sass-resources-loader without the need for each component to introduce a scss file separately. vue introduces the sass global variable
after many attempts, it was not successfully implemented in react. Ask anyone who has done a similar operation and give me some advice. Thank you!