{"id":16939,"date":"2022-03-06T15:30:28","date_gmt":"2022-03-06T06:30:28","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=16939"},"modified":"2023-05-27T22:06:56","modified_gmt":"2023-05-27T13:06:56","slug":"%e3%80%90react%e3%80%91%e3%80%8ccss%e3%81%ae%e9%81%b8%e6%8a%9e%e8%82%a2%e3%80%8d%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=16939","title":{"rendered":"\u3010React\u3011\u300cCSS\u306e\u9078\u629e\u80a2\u300d\uff08Pure CSS\u3001CSS Modules\u3001CSS in JS\u306a\u3069\uff09"},"content":{"rendered":"<p>React\u306eCSS\u8a18\u8ff0\u65b9\u6cd5\u306f\u6226\u56fd\u6642\u4ee3\u3089\u3057\u3044\u3002\u3057\u3063\u304b\u308a\u5b66\u7fd2\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h2>Pure CSS<\/h2>\n<p>\u901a\u5e38\u306eCSS\u3067\u3059\u3002create-react-app\u3057\u305f\u6642\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9069\u7528\u3055\u308c\u3066\u3044\u308bCSS\u3067\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<p>\u300c\u901a\u5e38\u306eCSS\u300d\u306a\u306e\u3067\u5b66\u7fd2\u30b3\u30b9\u30c8\u304c\u4f4e\u3044\u3053\u3068\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<h4>\u4fdd\u5b88\u6027\u304c\u4f4e\u3044<\/h4>\n<ul>\n<li>CSS\u304c\u5168\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u3067\u7ba1\u7406\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u4fdd\u5b88\u3001\u904b\u7528\u3001\u7ba1\u7406\u306b\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002BEM\u306a\u3069\u3067\u30b9\u30b3\u30fc\u30d7\u3092\u4f5c\u3063\u3066\u5bfe\u7b56\u3059\u308b\u30b1\u30fc\u30b9\u304c\u591a\u3044\u3067\u3059\u3002<\/li>\n<li>BEM\u306a\u3069\u3067\u5bfe\u7b56\u3057\u305f\u5834\u5408\u306f\u3001\u547d\u540d\u304c\u975e\u5e38\u306b\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u3002\u5bfe\u7b56\u6cd5\u3068\u3057\u3066\u306f\u3001Sass\u306a\u3069\u306eCSS\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3067\u7c21\u7565\u5316\u3059\u308b\u3002<\/li>\n<li>\u305f\u3060\u3001Sass\u306a\u3069\u3067\u5bfe\u7b56\u3057\u305f\u5834\u5408\u306f\u30b3\u30fc\u30c9\u306e\u691c\u7d22\u304c\u3067\u304d\u306a\u3044\u3002<\/li>\n<\/ul>\n<h2>Inline Styles<\/h2>\n<h3>\u30b5\u30f3\u30d7\u30eb<\/h3>\n<pre class=\"lang:default decode:true\">const containerStyle = {\r\n  border: \"solid #000 1px \",\r\n  borderRadius: \"10px\",\r\n};\r\nreturn (\r\n  &lt;div style={containerStyle}&gt;\r\n    &lt;InlineStyle \/&gt;\r\n  &lt;\/div&gt;\r\n);<\/pre>\n<p>\u666e\u901a\u306eJS\u306e\u3088\u3046\u306b\u30bd\u30fc\u30b9\u3092\u8a18\u8ff0\u304c\u3067\u304d\u307e\u3059\u3002\u666e\u901a\u306eCSS\u3068\u7570\u306a\u308a\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u306f\u30b9\u30cd\u30fc\u30af\u30b1\u30fc\u30b9\u3067\u306f\u306a\u304f\u3001<span style=\"color: #ff0000;\"><strong>\u30ad\u30e3\u30e1\u30eb\u30b1\u30fc\u30b9<\/strong><\/span>\u3067\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<h2>CSS Modules(Css Loader)<\/h2>\n<p>Webpack\u306e\u30ed\u30fc\u30c0\u30fc\u3067CSS\u306e\u30af\u30e9\u30b9\u3092JS\u3067\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5<\/p>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>Css Loader\u306b\u3088\u3063\u3066CSS\u306b\u30b9\u30b3\u30fc\u30d7\u3068\u3044\u3046\u6982\u5ff5\u3092\u4f5c\u308c\u308b\u3002\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3057\u304b\u5f71\u97ff\u3057\u306a\u3044\u306e\u3067\u7af6\u5408\u304c\u306a\u304f\u5b89\u5fc3<\/li>\n<li>\u8a18\u8ff0\u306fPure CSS\u306b\u8fd1\u3044\u306e\u3067\u5b66\u7fd2\u30b3\u30b9\u30c8\u306f\u4f4e\u3081\u3002<\/li>\n<li>\u65e2\u5b58\u306e\u30ea\u30f3\u30bf\u30fc\u304c\u4f7f\u3048\u308b\u3002<\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8de8\u3050CSS\u5171\u901a\u5316\u306f\u96e3\u3057\u3044\u3002\uff08Sass\u3067\u3042\u308b\u7a0b\u5ea6\u89e3\u6d88\u3067\u304d\u308b\u3002\uff09<\/li>\n<li>\u5c06\u6765\u975e\u63a8\u5968\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u304c\u5897\u3048\u308b\u3002\uff08CSS in JS\u3068\u6bd4\u8f03\u3059\u308b\u3068\u3002CSS in JS\u306a\u30891\u30d5\u30a1\u30a4\u30eb\uff09<\/li>\n<\/ul>\n<h3>\u30b5\u30f3\u30d7\u30eb<\/h3>\n<h4>{\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u540d}.module.scss<\/h4>\n<pre class=\"lang:default decode:true\">.container {\r\n  border: solid #000 1px;\r\n  border-radius: 10px;\r\n}<\/pre>\n<p>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u540d\u3068\u540c\u3058\u540d\u524d\u304c\u3064\u3044\u305fcss\uff08\u3082\u3057\u304f\u306fscss\u306a\u3069\uff09\u306b<span style=\"color: #ff0000;\"><strong>\u666e\u901a\u306eCSS<\/strong><\/span>\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<h4>{\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u540d}.jsx<\/h4>\n<pre class=\"lang:default decode:true\">import classes from \".\/CssModules.module.scss\";\r\n\r\n&lt;div className={classes.container}&gt;\r\n   &lt;p&gt;- CssModules -&lt;\/p&gt;\r\n   &lt;button&gt;- CssModules -&lt;\/button&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>className\u5c5e\u6027\u3092\u4f7f\u3063\u3066\u4e0a\u8a18\u306e\u3088\u3046\u306bclass\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h2>styled-jsx<\/h2>\n<h3>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb(Next.js\u306a\u3089\u4e0d\u8981\uff09<\/h3>\n<pre class=\"lang:default decode:true\">npm install styled-jsx<\/pre>\n<p>\u306a\u304a\u3001Next.js\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3082\u3057Next.js\u3092\u4f7f\u3063\u3066\u3044\u308b\u6848\u4ef6\u3067\u3042\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3067\u3059\u3002<\/p>\n<h3>\u30b5\u30f3\u30d7\u30eb<\/h3>\n<pre class=\"lang:default decode:true \">&lt;div className=\"container\"&gt;\r\n  &lt;p&gt;- Styled -&lt;\/p&gt;\r\n  &lt;button&gt;- Styled -&lt;\/button&gt;\r\n&lt;\/div&gt;\r\n&lt;style jsx=\"true\"&gt;{`\r\n  .container {\r\n    border: solid #000 1px;\r\n    border-radius: 10px;\r\n  }\r\n`}&lt;\/style&gt;<\/pre>\n<h3>\u6ce8\u610f\u70b9<\/h3>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fhover\u306a\u3069\u306e\u7591\u4f3c\u8981\u7d20\u306f\u4f7f\u3048\u306a\u3044\u3002sass\u8a18\u6cd5\u306a\u3069\u304c\u4f7f\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3082\u3042\u308b\u307f\u305f\u3044\u3002<\/p>\n<h2>CSS in JS<\/h2>\n<p>CSS\u3092JS\u3067\u8a18\u8ff0\u3057\u307e\u3057\u3087\u3046\u3068\u3044\u3046\u65b9\u6cd5\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3054\u3068\u306b\u300c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u540d.modules.css\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u30b9\u30b3\u30fc\u30d7\u3092\u4f5c\u308c\u308b\u3002<\/p>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>props\u3068\u3057\u3066\u30c7\u30fc\u30bf\u3092\u6e21\u305b\u308b\u306e\u3067\u52d5\u7684\u306b\u30b9\u30bf\u30a4\u30eb\u5909\u66f4\u304c\u3067\u304d\u308b\u3002<\/li>\n<li>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5358\u4f4d\u3067\u30b9\u30b3\u30fc\u30d7\u3092\u4f5c\u308c\u308b\u3002<\/li>\n<li>JS\u30d5\u30a1\u30a4\u30eb\u306b\u5168\u3066\u8a18\u8ff0\u3059\u308b\u306e\u3067\u53ef\u8aad\u6027\u306f\u512a\u308c\u308b\u3002<\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>CSS-modules\u3068\u304b\u306b\u6bd4\u3079\u3066\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u901f\u5ea6\u306f\u52a3\u308b\u3002(CSS-modules\u306f\u30d3\u30eb\u30c9\u5f8c\u306f\u751fCSS\u306e\u305f\u3081\uff09\uff1aLinaria\u3092\u4f7f\u3048\u3070\u61f8\u5ff5\u306f\u89e3\u6d88\u3067\u304d\u308b\u3002<\/li>\n<li>\u901a\u5e38\u306eprops\u3068\u30b9\u30bf\u30a4\u30eb\u306eprops\u304c\u6df7\u5728\u3057\u3066\u3057\u307e\u3046\u3002<\/li>\n<li>\u3071\u3063\u3068\u898b\u306a\u3093\u306e\u30bf\u30b0\u304b\u308f\u304b\u3089\u306a\u3044\u3002<\/li>\n<li>\u5f93\u6765\u306elinter\u306f\u4f7f\u3048\u306a\u3044\u3002\uff08TS\u3067\u3042\u308b\u7a0b\u5ea6\u30ab\u30d0\u30fc\u306f\u3067\u304d\u308b\u3002\uff09<\/li>\n<\/ul>\n<h3>\u4ee3\u8868\u683c<\/h3>\n<p>CSS in JS\u3067\u4eba\u6c17\u306e\u3042\u308b\u624b\u6cd5\u3067\u3059\u3002<\/p>\n<h4>Styled Components<\/h4>\n<p>\u6839\u5f37\u3044\u4eba\u6c17\u304c\u3042\u3063\u3066\u4eca\u3067\u3082\u4eba\u6c17\u4e0a\u4f4d\u306eReact CSS\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h5>\u30e1\u30ea\u30c3\u30c8<\/h5>\n<p>sass\u3068\u540c\u3058\u8a18\u6cd5\u3067\u8a18\u8ff0\u304c\u3067\u304d\u3001hover\u306a\u3069\u304c\u4f7f\u3048\u308b\u3002\uff08\u666e\u901a\u306ecss\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u62e1\u5f35\u3055\u308c\u3066\u3044\u308b\u3002\uff09\u3001\u306a\u306e\u3067sass\u304b\u3089React\u306b\u7f6e\u304d\u63db\u3048\u308b\u969b\u306a\u3069\u306e\u79fb\u884c\u306b\u3082\u4fbf\u5229\u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<h5>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h5>\n<p>\u30b9\u30bf\u30a4\u30eb\u3092\u5f53\u3066\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306a\u306e\u304b\u3001import\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306a\u306e\u304b\u304c\u3071\u3063\u3068\u898b\u3067\u975e\u5e38\u306b\u308f\u304b\u308a\u3065\u3089\u3044\u3067\u3059\u3002\u306a\u306e\u3067\u4eba\u306b\u3088\u3063\u3066\u306f\u30b9\u30bf\u30a4\u30eb\u3092\u5f53\u3066\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u95a2\u3057\u3066\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u540d\u306e<span style=\"color: #ff0000;\"><strong>\u5148\u982d\u306b\u300cS\u300d\u3092\u3064\u3051\u308b<\/strong><\/span>\u306a\u3069\u3057\u3066\u3071\u3063\u3068\u898b\u308f\u304b\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u305f\u308a\u3082\u3057\u307e\u3059\u3002<\/p>\n<h5>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n<pre class=\"lang:default decode:true\">npm install styled-components<\/pre>\n<h5>\u30b5\u30f3\u30d7\u30eb<\/h5>\n<pre class=\"lang:default decode:true \">import styled from \"styled-components\";\r\n\r\nfunction StyledComponents() {\r\n  return (\r\n    &lt;&gt;\r\n      &lt;Cotainer&gt;\r\n        &lt;p&gt;- StyledComponents -&lt;\/p&gt;\r\n        &lt;button&gt;- StyledComponents -&lt;\/button&gt;\r\n      &lt;\/Cotainer&gt;\r\n    &lt;\/&gt;\r\n  );\r\n}\r\n\r\nconst Cotainer = styled.div`\r\n  border: solid #000 1px;\r\n  border-radius: 10px;\r\n`;<\/pre>\n<h5>\u30b9\u30bf\u30a4\u30eb\u306e\u5171\u901a\u5316\uff08\u3068\u3044\u3046\u304b\u7d99\u627f\uff09<\/h5>\n<pre class=\"lang:default decode:true \">function StyledComponents() {\r\n  return (\r\n    &lt;&gt;\r\n      &lt;MainCotainer&gt;\r\n        &lt;p&gt;- StyledComponents -&lt;\/p&gt;\r\n        &lt;button&gt;- StyledComponents -&lt;\/button&gt;\r\n      &lt;\/MainCotainer&gt;\r\n    &lt;\/&gt;\r\n  );\r\n}\r\n\r\nconst BaseCotainer = styled.div`\r\n  border: solid #000 1px;\r\n  border-radius: 10px;\r\n`;\r\n\r\nconst MainCotainer = styled(BaseCotainer)`\r\n  background-color: #555;\r\n`;<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>\u300cstyled(\u7d99\u627f\u5143\u30b9\u30bf\u30a4\u30eb)\u300d<\/strong><\/span>\u3068\u3044\u3046\u611f\u3058\u3067\u65b0\u3057\u3044\u30b9\u30bf\u30a4\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u30b9\u30bf\u30a4\u30eb\u3092\u7d99\u627f\u3057\u3066\u5225\u30b9\u30bf\u30a4\u30eb\u3068\u3057\u3066\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h6>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/h6>\n<p>\u307b\u307c\u540c\u3058\u3088\u3046\u306a\u30dc\u30bf\u30f3\u3060\u3051\u3069\u80cc\u666f\u8272\u3060\u3051\u5909\u3048\u305f\u3044\u307f\u305f\u3044\u306a\u8981\u6c42\u304c\u3042\u3063\u305f\u3068\u3057\u305f\u5834\u5408\u306b\u5171\u901a\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<h5>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h5>\n<ul>\n<li>\u901a\u5e38\u306e\u30bf\u30b0\u3068\u300cStyled Components\u300d\u306e\u533a\u5225\u304c\u4ed8\u304b\u306a\u3044\u3002\uff08Emotion\u306a\u3089\u3053\u306e\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u306a\u3044\u3002\uff09<\/li>\n<\/ul>\n<h4>Emotion<\/h4>\n<p>Styled Components\u3088\u308a\u3082\u5f8c\u767a\u306b\u306a\u308a\u307e\u3059\u30022018\u5e748\u6708\u306b\u51fa\u3066\u304b\u3089\u6025\u901f\u306b\u4f38\u3073\u30661\u5e74\u5f8c\u306bStyled Components\u3092\u629c\u3044\u3066\u3044\u308b\u3002<\/p>\n<p>\u5f8c\u767a\u306a\u3060\u3051\u3042\u3063\u3066Styled Components\u3088\u308a\u3082\u75d2\u3044\u6240\u306b\u624b\u304c\u5c4a\u3044\u3066\u3044\u307e\u3059\u3002\u300c\u30bf\u30b0\u4ed8\u304d\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u6587\u5b57\u5217\u306b\u3088\u308b\u8a18\u8ff0\u300d\u3068\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u8a18\u6cd5\u300d\u306e\u4e8c\u3064\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>v11\u304b\u3089\u306f\u3001TS\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u305f\u3053\u3068\u3067jsx\u306e\u578b\u3092\u4e0a\u66f8\u304d\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h4>Linaria<\/h4>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3067\u8ca0\u8377\u304c\u304b\u304b\u3089\u306a\u3044\u3002\u8a18\u8ff0\u65b9\u6cd5\u306f\u300cstyled-components\u300d\u3068\u307b\u307c\u540c\u3058\u3002IE11\u304c\u975e\u5bfe\u5fdc\u3002<\/p>\n<h5>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n<pre class=\"lang:default decode:true\">npm i @emotion\/styled @emotion\/react<\/pre>\n<h5>\u30b5\u30f3\u30d7\u30eb1\uff08Sass\u3068\u540c\u3058\u8a18\u6cd5\uff09<\/h5>\n<pre class=\"lang:default decode:true\">import { css } from \"@emotion\/css\";\r\n\r\nfunction Emotion() {\r\n  const containerCss = css`\r\n    border: solid #000 1px;\r\n    border-radius: 10px;\r\n  `;\r\n  return (\r\n    &lt;&gt;\r\n      &lt;div css={containerCss}&gt;\r\n        &lt;p&gt;- Emotion -&lt;\/p&gt;\r\n        &lt;button&gt;- Emotion -&lt;\/button&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/&gt;\r\n  );\r\n}<\/pre>\n<p>\u3053\u306e\u624b\u6cd5\u3067\u3042\u308c\u3070\u3001sass\u3068\u540c\u3058\u66f8\u304d\u65b9\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h5>\u30b5\u30f3\u30d7\u30eb2\uff08inline-style\u3068\u540c\u3058\u8a18\u6cd5\uff09<\/h5>\n<pre class=\"lang:default decode:true \">import { css } from \"@emotion\/css\";\r\n\r\nfunction Emotion() {\r\n  const containerCss = css({\r\n    border: \"solid #000 1px\",\r\n    borderRadius: \"10px\",\r\n  });\r\n  return (\r\n    &lt;&gt;\r\n      &lt;div css={containerCss}&gt;\r\n        &lt;p&gt;- Emotion -&lt;\/p&gt;\r\n        &lt;button&gt;- Emotion -&lt;\/button&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/&gt;\r\n  );\r\n}<\/pre>\n<h5>\u30b5\u30f3\u30d7\u30eb3\uff08styled-components\u3068\u540c\u3058\u8a18\u6cd5\uff09<\/h5>\n<pre class=\"lang:default decode:true \">import styled from \"@emotion\/styled\";\r\n\r\nfunction Emotion() {\r\n  return (\r\n    &lt;&gt;\r\n      &lt;Cotainer&gt;\r\n        &lt;p&gt;- Emotion -&lt;\/p&gt;\r\n        &lt;button&gt;- Emotion -&lt;\/button&gt;\r\n      &lt;\/Cotainer&gt;\r\n    &lt;\/&gt;\r\n  );\r\n}\r\n\r\nconst Cotainer = styled.div`\r\n  border: solid #000 1px;\r\n  border-radius: 10px;\r\n`;\r\n\r\nexport default Emotion;\r\n<\/pre>\n<h2>CSS Framework<\/h2>\n<h3>Tailwind<\/h3>\n<p>className\u306b\u9069\u7528\u3057\u305f\u3044\u30af\u30e9\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3002CSS in JS\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3082\u7d44\u307f\u5408\u308f\u305b\u3089\u308c\u308b\u3002<\/p>\n<h4>\u30e1\u30ea\u30c3\u30c8<\/h4>\n<p>\u3059\u3067\u306b\u30af\u30e9\u30b9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u5b9f\u88c5\u304c\u65e9\u3044\u3002<\/p>\n<h4>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h4>\n<p>CSS\u306e\u5f53\u3066\u65b9\u304cTailwind\u72ec\u7279\u306e\u3082\u306e\u306a\u306e\u3067\u5b66\u7fd2\u30b3\u30b9\u30c8\u304c\u9ad8\u3044\u3002<\/p>\n<h3>Chakura UI<\/h3>\n","protected":false},"excerpt":{"rendered":"React\u306eCSS\u8a18\u8ff0\u65b9\u6cd5\u306f\u6226\u56fd\u6642\u4ee3\u3089\u3057\u3044\u3002\u3057\u3063\u304b\u308a\u5b66\u7fd2\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002 Pure CSS \u901a\u5e38\u306eCSS\u3067\u3059\u3002create-react-app\u3057\u305f\u6642\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9069\u7528\u3055\u308c\u3066\u3044\u308bCSS\u3067\u3082\u3042\u308a\u307e\u3059\u3002 \u30e1\u30ea\u30c3\u30c8 \u300c\u901a\u5e38\u306e [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[116],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/16939"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16939"}],"version-history":[{"count":16,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/16939\/revisions"}],"predecessor-version":[{"id":20417,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/16939\/revisions\/20417"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16939"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}