ãããŸã§ãWebéçºè ã¯åå©çšå¯èœãªã³ã³ããŒãã³ãã®äœæã«å€ãã®æéãšåŽåãè²»ãããŠããŸããã CSSã¯ç¹å®ã®åé¡ã§ãããã«ã¹ã±ãŒãã®æ§è³ªã§ããã ããšãã°ãéçºè ãã³ã³ããŒãã³ããäœæããŠããªãŒæ§é ã衚瀺ããå Žåããã®ã³ã³ããŒãã³ãã§äœ¿çšãããCSSã¯ã©ã¹ïŒããšãã°.leaf ïŒãã¢ããªã±ãŒã·ã§ã³ã®ä»ã®éšåã§å¯äœçšãåŒãèµ·ãããªãããšãã©ã®ããã«ä¿èšŒã§ããŸããïŒ ã»ã¬ã¯ã¿ã®åé¡ã«å¯ŸåŠããããã«ãããŸããŸãªæ¹æ³è«ãšèŠåãäœæãããŠããŸãã BEMãšSMACSSã¯ãã¿ã¹ã¯ãé©åã«å®è¡ããããã«åºã䜿çšãããŠããæ¹æ³è«ã§ãããåæã«çæ³ããã¯ã»ã©é ããã®ã§ãã ãã®èšäºã§ã¯ãåœåèŠåã«åºã¥ãããã®ãããªæ¹æ³è«ã®æ¬ ç¹ãCSSã¢ãžã¥ãŒã«ãšã¯äœãããããã®ã¢ãžã¥ãŒã«ãReactã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããæ¹æ³ã«ã€ããŠèª¬æããŸãã
ã«ã¹ã±ãŒãã®åé¡
ã°ããŒãã«ã¹ã¿ã€ã«ã®åé¡ã説æããäŸãšããŠãåå©çšå¯èœãªéžæã³ã³ããŒãã³ããäœæããŸãããã <select>èŠçŽ ãçŽæ¥ã¹ã¿ã€ãªã³ã°ããã®ã¯æªãå€æã§ãããµã€ãã®ä»ã®å Žæã§ã¯ãå ã®å®ååãããŠããªãèŠçŽ ãŸãã¯å®å šã«ç°ãªãå®ååãå¿ èŠã«ãªãå Žåãããããã§ãã 代ããã«ãBEMæ§æã䜿çšããŠã¯ã©ã¹ãå®çŸ©ã§ããŸãã
.select {} .select__item {} .select__item__icon {} .select--loading {}
select__ãã¬ãã£ãã¯ã¹ãªãã§æ°ããã¢ã€ãã ã¯ã©ã¹ãäœæãããå Žåã誰ããåãååã®itemã䜿çšãããå ŽåãããŒã å šäœã«åé¡ãçããå¯èœæ§ããããŸã ã éçºè ãCSSãäœæããããäœããã®ãŠãŒãã£ãªãã£ããããçæãããã¯é¢ä¿ãããŸããã BEMã䜿çšãããšã selectèŠçŽ ã®ã³ã³ããã¹ããå°å ¥ããããšã§ãã®åé¡ã解決ã§ããŸãã
BEMã®ãBãã¯ããããã¯ããè¡šãããããã¯ã¯è»œéã³ã³ããŒãã³ããšããŠè§£éã§ãããããBEMæ§æã¯ã³ã³ããŒãã³ãã«åãã£ãŠäžæ©åé²ããŠããŸãã Selectã¯ãããŸããŸãªç¶æ ïŒ select-loading ïŒãšåïŒ select__item ïŒãæã€ã³ã³ããŒãã³ãã§ãã
æ®å¿µãªãããåœåèŠåã䜿çšããŠã³ã³ããŒãã³ãã®èŠ³ç¹ããèããŠããã»ã¬ã¯ã¿ãŒã®ãã¹ãŠã®åé¡ã解決ã§ããããã§ã¯ãããŸããã ååã®è¡çªã¯ãŸã ä¿èšŒãããŠããããååã®æå³çãªåé·æ§ã¯ã¿ã€ããã¹ã®ãªã¹ã¯ãé«ããå šå¡ãåæãå®å šã«ç解ããŠããèŠåŸããããŒã ãå¿ èŠãšããŸãã ã¿ã€ããã¹ã«ã¯ã2ã€ã§ã¯ãªã1ã€ã®ãã€ãã³ã®äœ¿çšã修食åïŒ-ïŒãšãããã¯ïŒ__ïŒã®æ··ä¹±ãªã©ãå«ãŸããŸãã
æå©ã®ããã®CSSã¢ãžã¥ãŒã«
ãCSSã¢ãžã¥ãŒã«ãã¯æ¬¡ã®ããã«å®çŸ©ãããŸãã
CSSã¢ãžã¥ãŒã«ã¯ããã¹ãŠã®ã¯ã©ã¹åãšã¢ãã¡ãŒã·ã§ã³åãããã©ã«ãã§ããŒã«ã«ã¹ã³ãŒããæã€CSSãã¡ã€ã«ã§ãã
ããã§ã®éèŠãªèãã¯ããŒã«ã«ã¹ã³ãŒãã§ãã
ãã®æŠå¿µã説æããããã«ãJavaScriptããã³CSSã³ã³ããŒãã³ããã¡ã€ã«ãäœæããŸãããã
/* select.css */ .select {} .loading {} .item {} .icon {}
/* select.js */ import styles from "./select.css"; console.log(styles.select, styles.loading);
ããã¯åçŽãªäŸã§ãããè£ã§èµ·ãã£ãŠããããšã®å€ããå«ãŸããŠããŸãã
CSSãã¡ã€ã«ã«ã¯ãã³ã³ããã¹ããèšå®ãããã¬ãã£ãã¯ã¹ãç¹æ®æåãå«ãŸããŠããªããããBEMããŒãžã§ã³ããããã€ãºãã¯ããã«å°ãªããªããŸããã ãã¬ãã£ãã¯ã¹.select--ãåé¡ãªãåé€ã§ããã®ã¯ãªãã§ããïŒ
JavaScriptãã¡ã€ã«ã®importã¹ããŒãã¡ã³ãã¯ãCSSãã¡ã€ã«ãããŒããããªããžã§ã¯ãã«å€æããŸãã 次ã®ã»ã¯ã·ã§ã³ã§ã¯ãCSSãã¡ã€ã«ãã€ã³ããŒãã§ããäœæ¥ç°å¢ãã»ããã¢ããããæ¹æ³ã«ã€ããŠèª¬æããŸãã
CSSãã¡ã€ã«ã®åã¯ã©ã¹åã¯ããªããžã§ã¯ãã®ããããã£ã§ãã äžèšã®äŸã§ã¯ããããã¯styles.select ã styles.iconãªã©ã§ãã
ããããã£åãã¯ã©ã¹ã®ååã§ããå Žåããã®ããããã£ã®å€ã¯äœã§ããïŒ ããã¯äžæã®ã¯ã©ã¹åã§ãããäžææ§ã«ãããã¹ã¿ã€ã«ãä»ã®ã³ã³ããŒãã³ãã«ãæŒãããããšã¯ãããŸããã ããã·ã¥ãããã¯ã©ã¹åã®äŸïŒ _header__1OUvt ã
ããªããŠæãããïŒããšæããããããŸããããæå³ã®ããã¯ã©ã¹åãç解ã§ããªãããã·ã¥ã«å€æŽããæå³ã¯äœã§ããïŒ äž»ãªçç±ã¯ããã®ãããªèå¥åãã°ããŒãã«ã³ã³ããã¹ãã§äžæã§ããããšãä¿èšŒãããŠããããã§ãã ãã®ã¬ã€ãã®åŸåã§ã¯ãèå¥åãäœæããããã®ã¡ã«ããºã ãå€æŽããŠãããæå³ã®ããå€èŠ³ãæã€ããã«ããŸãããäžæã®ãŸãŸã«ããŸãã
ããŒã«ã«ã¹ã³ãŒãã§CSSã䜿çšããäž»ãªå©ç¹ã¯æ¬¡ã®ãšããã§ãã
- å¯äœçšã®ãªãã¢ãžã¥ãŒã«åŒã§åå©çšå¯èœãªã³ã³ããŒãã³ãã«åãã£ãŠåé²ãã
- ã¯ãªãŒããŒCSS
- åã³ã³ããŒãã³ãã«ã¯ç¬èªã®ã¹ã¿ã€ã«ãã¡ã€ã«ããããããã¢ããªã·ãã¯CSSãã¡ã€ã«ãé¿ããŸãã
æ¬ ç¹ã¯æ¬¡ã®ãšããã§ãã
- DOMãèªãã§ç解ããã®ãé£ããã
- ãã¹ãŠãæ©èœãããã«ã¯ãç°å¢ã®åæèšå®ãå¿ èŠã§ãã
CSSã¢ãžã¥ãŒã«ã¯ãããžã§ã¯ãã®ãã«ããå¿ èŠãšããŸãããã¯ã©ã€ã¢ã³ããšãµãŒããŒã®äž¡æ¹ã§ããŸããŸãªãã«ããŒãJavaScriptçšã®CSSã¢ãžã¥ãŒã«ããµããŒãããŠãããããããã¯åé¡ã§ã¯ãããŸããã CSSã¢ãžã¥ãŒã«ã¯ãã»ãšãã©ã®UIã©ã€ãã©ãªãšçµã¿åãããŠäœ¿çšââããããšãã§ããŸãã
ç°¡åã«ããããã«ããã®èšäºã§ã¯Webpackã¢ãžã¥ãŒã«ãã«ããŒãšReactã©ã€ãã©ãªã«çŠç¹ãåœãŠãŸãã
ReactãWebpackãããã³CSSã¢ãžã¥ãŒã«
ã¢ããªã±ãŒã·ã§ã³ããã°ããäœæããã«ã¯ã Create React Appã䜿çšã§ããŸãã
ããã¥ã¡ã³ãã®æ瀺ã«åŸã£ãŠãæ°ãããããžã§ã¯ããã»ãŒç¬æã«äœæããŠèµ·åããŸãã
npm install -g create-react-app create-react-app css-modules cd css-modules/ npm start
åºæ¥äžãã ãReactã¢ããªã±ãŒã·ã§ã³ãåäœããŠããŸãïŒ
ã¹ã¿ãŒãããŒãžã¯ã App.jsãã¡ã€ã«ãç·šéããå¿ èŠãããããšã瀺ããŠããŸãã
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h2>Welcome to React</h2> </div> <p className="App-intro"> To get started, edit {gfm-js-extract-pre-1} and save to reload. </p> </div> ); } } export default App;
Create Reactã¢ããªã§CSSã¢ãžã¥ãŒã«ã¯äœ¿çšãããŠããŸããïŒ ããã¯ã App.jsãã¡ã€ã«ã調ã¹ãããšã§ç¢ºèªã§ããŸãã CSSãã¡ã€ã«ã¯ã€ã³ããŒããããŸãããå€æ°ã«ã¯å²ãåœãŠãããããã¹ãŠã®classNameå±æ§ã¯åçãªå€ã®ä»£ããã«æååã䜿çšããŸãã
ãã®èŠ³ç¹ãããCreate React Appã¯CSSã¢ãžã¥ãŒã«ããµããŒãããŠããªãããããã®ãµããŒããæå¹ã«ããã«ã¯æ§æãå€æŽããå¿ èŠããããŸãã
CSSã¢ãžã¥ãŒã«ããµããŒãããããã«Create React Appãæ§æãã
é衚瀺ã®ã¢ã»ã³ããªæ§æã«ã¢ã¯ã»ã¹ããã«ã¯ã ejectã³ãã³ããå®è¡ããå¿ èŠããããŸãã 泚æïŒãããè¡ã£ãå Žåãå ã«æ»ãããšã¯ã§ããŸããã
npm run eject
ããã§ãwebpackã®æ§æãã©ã«ããŒãéãããšãã§ããŸãã
Create React Appã¯webpackã䜿çšããŠãã«ãããããã webpack.config.dev.jsã¯å€æŽãå¿ èŠãªãã¡ã€ã«ãšåãã§ãïŒ å®çšŒåèšå®ã®webpack.config.prod.js-翻蚳è ã®ã³ã¡ã³ã ïŒã
CSSãã¡ã€ã«ã®åŠçæ¹æ³ã説æããã»ã¯ã·ã§ã³ããããŸãïŒ å ã®èšäºã§ã¯webpackã®èšå®ã«å€ãæ§æã䜿çšããŠããŸãããããã§ã¯æ°ããæ§æã䜿çšããŸãã-翻蚳è ã®ã³ã¡ã³ã ïŒã
{ test: /\.css$/, use: [ require.resolve('style-loader'), { loader: require.resolve('css-loader'), options: { importLoaders: 1, }, }, { loader: require.resolve('postcss-loader'), options: { // Necessary for external CSS imports to work // https://github.com/facebookincubator/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ require('postcss-flexbugs-fixes'), autoprefixer({ browsers: [ '>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9', // React doesn't support IE8 anyway ], flexbox: 'no-2009', }), ], }, }, ], },
以äžã«ç€ºãããã«ãã®ã»ã¯ã·ã§ã³ãå€æŽãããšãCSSã¢ãžã¥ãŒã«ã®ãµããŒããæå¹ã«ãªãããããµã€ãã®ã¹ã¿ã€ãªã³ã°ãå³åº§ã«ç¡å¹ã«ãªããŸãããã³ã³ããŒãã³ãèªäœã«ããã«å€æŽãå¿ èŠã§ãã webpackã®èšå®ãå€æŽããå ŽåãCSSã¯ã©ã¹ã®åœåèŠåãå€æŽããŠãèªã¿åãå¯èœéšåãšããã·ã¥ã®äž¡æ¹ãå«ãŸããããã«ããŠãäžææ§ã確ä¿ã§ããŸãã
{ test: /\.css$/, use: [ require.resolve('style-loader'), { loader: require.resolve('css-loader'), options: { importLoaders: 1, modules: true, localIdentName: "[name]__[local]___[hash:base64:5]" }, }, { loader: require.resolve('postcss-loader'), options: { // Necessary for external CSS imports to work // https://github.com/facebookincubator/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ require('postcss-flexbugs-fixes'), autoprefixer({ browsers: [ '>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9', // React doesn't support IE8 anyway ], flexbox: 'no-2009', }), require('postcss-modules-values'), ], }, }, ], },
ãããã®ããŒããŒã¯äœãããŸããïŒ webpack.configãã¡ã€ã«ã«ã¯ãã¹ã¿ã€ã«ãšCSSããŒããŒã説æããã³ã¡ã³ãã»ã¯ã·ã§ã³ããããŸãã
postcss-loaderã¯ãCSSã«autoprefixerãé©çšããŸãã
style-loaderã¯ãCSSã<style>ã¿ã°ãæ¿å ¥ããJSã¢ãžã¥ãŒã«ã«å€æããŸãã
css-loaderã¯CSSãã¹ã解決ããå¿ èŠãªäŸåé¢ä¿ãšããŠãªãœãŒã¹ãè¿œå ããŸãã
css-loaderèšå®ã®modulesïŒtrueãªãã·ã§ã³ã¯ãCSSã¢ãžã¥ãŒã«ã®ãµããŒããæå¹ã«ããŸãã localIdentNameãã©ã¡ãŒã¿ãŒã¯ãRââeactã³ã³ããŒãã³ãã®ååãã¯ã©ã¹åãäžæã®ããã·ã¥èå¥åãå«ãŸããããã«ãã¯ã©ã¹åãã³ãã¬ãŒããå€æŽããŸãã ããã«ããããã¹ãŠã®ã³ã³ããŒãã³ããç°¡åã«èå¥ã§ããããããããã°ãã¯ããã«ç°¡åã«ãªããŸãã
Reactã§CSSã¢ãžã¥ãŒã«ã䜿çšãã
importã¹ããŒãã¡ã³ãã®åŸã«console.logåŒã³åºããè¿œå ããããšã«ãããæ§æãæ©èœããããšã確èªã§ããŸãã
import './App.css'ã眮ãæãã; ã«
import styles from './App.css'; console.log(styles);
ãã©ãŠã¶ã³ã³ãœãŒã«ã«æ¬¡ã®åºåã衚瀺ãããŸãã
ã¯ã©ã¹ã¯äžæã«ãªããŸããããReactã³ã³ããŒãã³ãã§ã¯äœ¿çšãããŸããã Reactã³ã³ããŒãã³ãã«ã¹ã¿ã€ã«ãé©çšããã«ã¯ãããã«2ã€ã®æé ãå¿ èŠã§ãã ãŸãããã£ã¡ã«ã±ãŒã¹è¡šèšã«åŸã£ãŠã¯ã©ã¹åãå€æŽããå¿ èŠããããŸãã 次ã«ãã€ã³ããŒããããã¯ã©ã¹ã䜿çšããããã«classNameå±æ§ãå€æŽããå¿ èŠããããŸãã
camelCaseè¡šèšã®äœ¿çšã¯ãªãã·ã§ã³ã§ãããJavaScriptããã¯ã©ã¹ã«ã¢ã¯ã»ã¹ããå Žåã styles ["component-name"]ãããstyles.componentNameãèšè¿°ããæ¹ãç°¡åã§ãã
ãœãŒã¹ã¹ã¿ã€ã«ã·ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
.App { text-align: center; } .App-logo { animation: App-logo-spin infinite 20s linear; height: 80px; } .App-header { background-color: #222; height: 150px; padding: 20px; color: white; } .App-intro { font-size: large; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
ã¢ããªã®ãã¬ãã£ãã¯ã¹ã¯äžèŠã«ãªã£ããããä»ã¯ããããåé€ããè¯ãæ©äŒã§ãã å€æŽãããCSSã¯æ¬¡ã®ããã«ãªããŸãã
.app { text-align: center; } .logo { animation: logoSpin infinite 20s linear; height: 80px; } .header { background-color: #222; height: 150px; padding: 20px; color: white; } .intro { font-size: large; } @keyframes logoSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
次ã®ã¹ãããã¯ãã³ã³ããŒãã³ãå ã®ã¯ã©ã¹ã®äœ¿çšãå€æŽããããšã§ãã çµæã¯æ¬¡ã®ããã«ãªããŸãã
import React, { Component } from 'react'; import logo from './logo.svg'; import styles from './App.css'; class App extends Component { render() { return ( <div className={ styles.app }> <div className={ styles.header }> <img src={logo} className={ styles.logo } alt="logo" /> <h2>Welcome to React</h2> </div> <p className={ styles.intro }> To get started, edit {gfm-js-extract-pre-2} and save to reload. </p> </div> ); } } export default App;
ããã§ãã³ã³ããŒãã³ãã¯CSSã¢ãžã¥ãŒã«ã䜿çšããŸãã
å¿ èŠãªãšãã«CSSã¢ãžã¥ãŒã«ã®å¢çãç Žãæ¹æ³
åã®ã»ã¯ã·ã§ã³ã§èª¬æããã¢ãããŒãã¯Reactãããžã§ã¯ãã®åºæ¬ã§ãããéçºè ã¯éåžžãäžè¬çãªã¹ã¿ã€ã«ã匷調ããŠäœ¿çšããæ¹æ³ãå¿ èŠã§ããããšã«ããã«æ°ä»ããŸãã ãã®ã³ã³ããã¹ãã§ã¯ããäžè¬ããšã¯ãã³ã³ããŒãã³ããåºæ¬ã¹ã¿ã€ã«ããäœããç¶æ¿ããå¿ èŠãããããšã®ã¿ãæå³ããŸãã
ãã®äžè¬æ å ±ã¯ãå€æ°ïŒè²ããã©ã³ããµã€ãºãªã©ïŒããã«ããŒïŒSASSããã¯ã¹ã€ã³ïŒããŸãã¯ãŠãŒãã£ãªãã£ã¯ã©ã¹ã§è¡šãããšãã§ããŸãã
CSSã¢ãžã¥ãŒã«ã¯ãfromããŒã¯ãŒãã䜿çšããæ§æãå¯èœã«ããŸãã ç°ãªããã¡ã€ã«ã®ã¯ã©ã¹éã§ã®æ§æãå¯èœã§ãã
次ã®äŸã«ã¯2ã€ã®ãã¡ã€ã«ããããŸãã1ã€ã¯åºæ¬çãªãã¿ã³ã¹ã¿ã€ã«çšããã1ã€ã¯[ éä¿¡ ]ãã¿ã³å®è£ çšã§ãã submitButtonã¯ã©ã¹ã¯ãåºæ¬çãªãã¿ã³ã¹ã¿ã€ã«ãšããã€ãã®è¿œå ããããã£ã®çµã¿åããã§è¡šçŸããå¿ èŠããããšèšããŸãã
/* base_button.css */ .baseButton { border: 2px solid darkgray; background-color: gray; } /* submit_button.css */ .submitButton { composes: baseButton from "./base_button.css"; background-color: blue; }
å€æ°ã䜿çšããå¿ èŠãããå ŽåãSASSãŸãã¯Lessãªã©ã®ããªããã»ããµã䜿çšãããã webpackã§å€æ°ã®ãµããŒããèšå®ã§ããŸã ã
CSSã®å€æ°ã«é¢ããwebpackããã¥ã¡ã³ãã®äŸïŒ
/* variables.css */ @value blue: #0c77f8; @value red: #ff0000; @value green: #aaf200; /* demo.css */ /* import your colors... */ @value colors: "./variables.css"; @value blue, red, green from colors; .button { color: blue; display: inline-block; }
ç¬èªã®å€æ°åã䜿çšããŠããã®äŸãå€æŽã§ããŸãã ããã¯ã éãªã©ã®æšæºå€ããªãŒããŒã©ã€ããããšãå€ãåå®çŸ©ããããã©ãããããããªããªããããCSSãã¡ã€ã«ãç解ãã«ãããªãããã§ãã
å€æŽãããäŸïŒ
/* variables.css */ @value customBlue: #0c77f8; @value customRed: #ff0000; @value customGreen: #aaf200; /* demo.css */ /* import your colors... */ @value colors: "./variables.css"; @value customBlue, customRed, customGreen from colors; .button { color: customBlue; display: inline-block; }
ãããã«
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ããŸãã°ããŒãã«ãªCSSã®åé¡ãèŠãŠãããCSSã®ã¹ã³ãŒããå°å ¥ããã³ã³ããŒãã³ãã®èŠ³ç¹ããèããããšã§ãCSSã¢ãžã¥ãŒã«ãç¶æ³ãã©ã®ããã«æ¹åããããèŠãŸããã ãŸããReact Starter Kitã䜿çšããŠCSSã¢ãžã¥ãŒã«ã®å®éšãç°¡åã«éå§ã§ããããšã確èªããŸããã
CSSã¢ãžã¥ãŒã«ã¯ãããã³ããšã³ãå šäœã®ã¢ã»ã³ããªãšçµã¿åãããŠäœ¿çšââãããŸããã€ãŸãããã©ãŠã¶ãŒã§ã®ãµããŒãã«åé¡ã¯ãããŸããã ãã©ãŠã¶ã¯ãµãŒããŒããéåžžã®CSSãåä¿¡ãããããCSSã¢ãžã¥ãŒã«ã䜿çšããŠãµã€ãããç Žå£ãããæ¹æ³ã¯ãããŸããã ããã©ããããããããããšã§ãæœåšçãªãã°ã®æ°ãæžããããšã§ä¿¡é Œæ§ãé«ããã ãã§ãã CSSã¢ãžã¥ãŒã«ããµããŒãããããã«æ§æãããããŒããŒãåããWebpackã¯åé¡ãåŒãèµ·ãããŸããããããã£ãŠããã®ããŒã«ã®äœ¿çšããå§ãããŸãã
ãããžã§ã¯ãã§CSSã¢ãžã¥ãŒã«ã䜿çšããå Žåãç§ïŒ ã€ãŸããå ã®èšäºã®èè -çŽTranslator ïŒãããªãã®çµéšã«ã€ããŠèããããšæããŸãïŒ
âåºç- ãPactical Guide to React and CSS Modulesããšããèšäºã®ç¡æ翻蚳ã æçš¿è Tatu Tamminen
âãœãŒã¹ã³ãŒãã¯react-cssmodules-demoã«ãããŸã
âãŸãã CSS Modules Webpack Demoã泚ç®ã«å€ããŸã