{"id":16869,"date":"2022-02-26T16:44:46","date_gmt":"2022-02-26T07:44:46","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=16869"},"modified":"2023-05-27T23:07:09","modified_gmt":"2023-05-27T14:07:09","slug":"%e3%80%90sass%e3%80%91%e3%80%8cmixin%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=16869","title":{"rendered":"\u3010Sass\u3011\u300cmixin\u300d\u3001\u300c\u7d99\u627f\u300d\u3001\u300c\u95a2\u6570\uff08\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\uff09\u300d\u3001\u300c@at-root\u300d\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>mixin\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<h3>\u5909\u63db\u524d<\/h3>\n<pre class=\"lang:default decode:true\">@mixin test {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n.test_import {\r\n  @include test;\r\n}<\/pre>\n<h3>\u5909\u63db\u5f8c<\/h3>\n<pre class=\"lang:default decode:true \">.test_import {\r\n  border: 1px solid #fff;\r\n}<\/pre>\n<h3>\u547d\u540d\u898f\u5247<\/h3>\n<ul>\n<li>\u534a\u89d2\u6570\u5b57\u304b\u3089\u59cb\u307e\u308b\u540d\u524d\u306f\u3064\u3051\u3089\u308c\u307e\u305b\u3093\u3002<\/li>\n<\/ul>\n<h3>\u30b9\u30b3\u30fc\u30d7<\/h3>\n<p>\u5143\u3005mixin\u81ea\u4f53\u304c\u3055\u307e\u3056\u307e\u306a\u5834\u6240\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u4f5c\u3089\u308c\u305f\u6a5f\u80fd\u306a\u306e\u3067\u30b9\u30b3\u30fc\u30d7\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u9650\u5b9a\u3059\u308b\u3053\u3068\u306f\u305d\u3082\u305d\u3082\u3042\u307e\u308a\u60f3\u5b9a\u3057\u3066\u3044\u306a\u3044\u3067\u3059\u304c\u3001\u4e00\u5fdc\u305d\u3046\u3044\u3046\u4f7f\u3044\u65b9\u3082\u3067\u304d\u308b\u3068\u77e5\u3063\u3066\u304a\u304f\u7a0b\u5ea6\u3067\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\u5909\u6570\u3068\u57fa\u672c\u7684\u306b\u306f\u540c\u3058\u3067\u3059\u3002<\/li>\n<li>\u30b0\u30ed\u30fc\u30d0\u30eb\u306emixin\u3068\u30ed\u30fc\u30ab\u30eb\u306emixin\u3092\u7528\u610f\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3>\u5f15\u6570\u3092\u6e21\u3059\u6a5f\u80fd<\/h3>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u62ec\u5f27\u3067\u62ec\u3063\u3066\u3042\u3052\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u5f15\u6570\u3092\u6e21\u3059\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">@mixin test2($value) {\r\n  border: 1px solid $value;\r\n}\r\n\r\n.test2_import {\r\n  @include test2(#bbb);\r\n}<\/pre>\n<h4>\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570<\/h4>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30ed\u30f3\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u3063\u3066<span style=\"color: #ff0000;\"><strong>\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">@mixin test3($value: #fff) {\r\n  border: 1px solid $value;\r\n}\r\n\r\n.test3_import {\r\n  @include test3;\r\n}<\/pre>\n<h4>\u8907\u6570\u306e\u5f15\u6570\u3092\u6e21\u3059<\/h4>\n<p>\u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3068\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u3001\u5f15\u6570\u3092\u4e00\u90e8\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002(\u305f\u3060\u3001\u524d\u306e\u5f15\u6570\u306f\u7701\u7565\u3067\u304d\u306a\u3044\u306e\u3067\u5f8c\u308d\u3060\u3051\u6307\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u300c$color:#ccc\u300d\u3068\u3044\u3046\u3088\u3046\u306b\u5909\u6570\u540d\u3092\u6307\u5b9a\u3057\u3066\u5f15\u6570\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u5bfe\u5fdc\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\uff09<\/p>\n<pre class=\"lang:default decode:true\">@mixin test4($value,$color) {\r\n  border: $value solid $color;\r\n}\r\n\r\n.test4_import {\r\n  @include test4(1px,#000);\r\n}<\/pre>\n<h4>\u30bb\u30ec\u30af\u30bf\u306e\u30d6\u30ed\u30c3\u30af\u81ea\u4f53\u3092\u5f15\u6570\u3067\u6e21\u3059\u3002<\/h4>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">@mixin test5 {\r\n  @media screen and (min-width:480px) {\r\n    @content;\r\n  }\r\n}\r\n\r\n.test5_import {\r\n  @include test5 {\r\n    border: 1px solid solid;    \r\n  };\r\n}\u3051<\/pre>\n<h2>\u7d99\u627f<\/h2>\n<p>\u6307\u5b9a\u3057\u305f\u30bb\u30ec\u30af\u30bf\u3092\u5f15\u304d\u7d99\u3044\u3067\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<h3>mixin\u3068\u306e\u4f7f\u3044\u5206\u3051<\/h3>\n<h4>mixin<\/h4>\n<p>\u5358\u7d14\u306b\u5171\u901a\u90e8\u5206\u3092\u5916\u51fa\u3057\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h4>\u7d99\u627f<\/h4>\n<p>\u4f8b\u3048\u3070\u3001button\u3068info_button\u306e\u3088\u3046\u306b\u540c\u3058\u30ab\u30c6\u30b4\u30ea\u306e\u5185\u5bb9\u306e\u5171\u901a\u3059\u308b\u9805\u76ee\u3092\u5171\u901a\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h3>\u7d99\u627f\u5143\u306b\u3067\u304d\u308b\u30bb\u30ec\u30af\u30bf<\/h3>\n<p>class\u30bb\u30ec\u30af\u30bf\u3001id\u30bb\u30ec\u30af\u30bf\u3001\u64ec\u4f3c\u30bb\u30ec\u30af\u30bf\u306a\u3069\u57fa\u672c\u7684\u306b\u306a\u3093\u3067\u3082\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001<span style=\"color: #ff0000;\"><strong>\u5b6b\u30bb\u30ec\u30af\u30bf\u3001\u96a3\u63a5\u30bb\u30ec\u30af\u30bf\u306a\u3069\u306f\u7d99\u627f\u5143\u306b\u3067\u304d\u306a\u3044<\/strong><\/span>\u306e\u3067\u6ce8\u610f\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<span style=\"color: #ff0000;\"><strong>media\u30af\u30a8\u30ea\u306e\u5916\u306e\u30bb\u30ec\u30af\u30bf\u3092media\u30af\u30a8\u30ea\u306e\u4e2d\u3067\u7d99\u627f\u5143\u306b\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<h3>\u5b9f\u88c5\u65b9\u6cd5<\/h3>\n<h4>\u5909\u63db\u524d<\/h4>\n<pre class=\"lang:default decode:true\">.parent {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n.child {\r\n  @extend .parent;\r\n  background-color: #000;\r\n}<\/pre>\n<h4>\u5909\u63db\u5f8c<\/h4>\n<p>\u5171\u901a\u90e8\u5206\u306f\u30b0\u30eb\u30fc\u30d7\u3068\u3057\u3066\u66f8\u304d\u51fa\u3055\u308c\u3001\u5dee\u5206\u3060\u3051\u304c\u5225\u30bb\u30ec\u30af\u30bf\u3068\u3057\u3066\u66f8\u304d\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">.parent, .child {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n.child {\r\n  background-color: #000;\r\n}<\/pre>\n<h3>\u89aa\u30af\u30e9\u30b9\u3092\u66f8\u304d\u51fa\u3057\u305f\u304f\u306a\u3044\u5834\u5408<\/h3>\n<p>\u300c%\u300d\u3068\u3044\u3046\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h4>\u5909\u63db\u524d<\/h4>\n<pre class=\"lang:default decode:true\">%parent {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n.child {\r\n  @extend %parent;\r\n  background-color: #000;\r\n}\r\n<\/pre>\n<h4>\u5909\u63db\u5f8c<\/h4>\n<pre class=\"lang:default decode:true \">.child {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n.child {\r\n  background-color: #000;\r\n}<\/pre>\n<h3>\u591a\u91cd\u7d99\u627f<\/h3>\n<p>\u666e\u901a\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">%parent {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n%parent2 {\r\n  margin-bottom: 10px;\r\n}\r\n\r\n.child {\r\n  @extend %parent;\r\n  @extend %parent2;\r\n  background-color: #000;\r\n}\r\n<\/pre>\n<h3>\u7d99\u627f\u306e\u9023\u9396<\/h3>\n<p>\u666e\u901a\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">%parent {\r\n  border: 1px solid #fff;\r\n}\r\n\r\n%child {\r\n  @extend %parent;\r\n  background-color: #000;\r\n}\r\n\r\n.grand_child {\r\n  @extend %child;\r\n  border-top: 10px;\r\n}<\/pre>\n<h2>\u95a2\u6570<\/h2>\n<h3>Sass\u306b\u304a\u3051\u308b\u95a2\u6570\u3068mixin\u306e\u9055\u3044<\/h3>\n<p>\u95a2\u6570\u306f\u5024\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001mixin\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u5024\u306e\u30bb\u30c3\u30c8\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30cd\u30a4\u30c6\u30a3\u30d6\u95a2\u6570\uff08\u7d44\u307f\u8fbc\u307f\u95a2\u6570\uff09<\/h3>\n<p>Sass\u3067\u3042\u3089\u304b\u3058\u3081\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u95a2\u6570\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<h4>round<\/h4>\n<p>\u56db\u6368\u4e94\u5165\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">.round {\r\n  width: round(100px \/ 3);\r\n}<\/pre>\n<h4>quote<\/h4>\n<p>\u30c0\u30d6\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u3051\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">.quote {\r\n  content: quote(\u3053\u3093\u306b\u3061\u306f);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true\">.quote {\r\n  content: \"\u3053\u3093\u306b\u3061\u306f\";\r\n}<\/pre>\n<h4>unquote<\/h4>\n<p>\u30c0\u30d6\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u5916\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">.unquote {\r\n  content: unquote(\"\u3053\u3093\u306b\u3061\u306f\");\r\n}<\/pre>\n<h4>abs<\/h4>\n<p>\u7d76\u5bfe\u5024\u3092\u51fa\u529b\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">.abs {\r\n  witdh: abs(-100px);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true\">.abs {\r\n  witdh: 100px;\r\n}<\/pre>\n<h4>ceil<\/h4>\n<p>\u5207\u308a\u4e0a\u3052\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \">.ceil {\r\n  witdh: ceil(100px\/3);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true \">.ceil {\r\n  witdh: 34px;\r\n}<\/pre>\n<h4>floor<\/h4>\n<p>\u5207\u308a\u6368\u3066\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">.floor {\r\n  witdh: (100px\/7);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true\">.floor {\r\n  witdh: 14.2857142857px;\r\n}<\/pre>\n<h4>rgba<\/h4>\n<p>\u8272\u30b3\u30fc\u30c9\u3068\u30a2\u30eb\u30d5\u30a1\u5024\u3092\u6e21\u3057\u307e\u3059\u3002CSS\u306eRGBA\u306e\u66f8\u5f0f\u306b\u5909\u63db\u3057\u3066\u304f\u308c\u307e\u3059\u3002CSS\u3067\u306f16\u9032\u306e\u5024\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u308c\u306a\u3044\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">.rgba {\r\n  color: rgba(#fff,0.3);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true \">.rgba {\r\n  color: rgba(255, 255, 255, 0.3);\r\n}<\/pre>\n<h4>mix<\/h4>\n<p>\u4e8c\u3064\u306e\u8272\u3092\u6df7\u305c\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">.mix {\r\n  color: mix(#fff,#000);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true \">.mix {\r\n  color: gray;\r\n}<\/pre>\n<h4>lighten<\/h4>\n<p>\u7b2c\u4e8c\u5f15\u6570\u3067\u660e\u308b\u304f\u3057\u305f\u3044\u5272\u5408\u3092%\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">.lighten {\r\n  color: lighten(#000,20%);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true \">.lighten {\r\n  color: #333333;\r\n}<\/pre>\n<h4>darken<\/h4>\n<p>\u6697\u304f\u3059\u308b\u95a2\u6570<\/p>\n<pre class=\"lang:default decode:true \">.darken {\r\n  color: darken(#fff,20%);\r\n}<\/pre>\n<h5>\u5909\u63db\u5f8c<\/h5>\n<pre class=\"lang:default decode:true \">.darken {\r\n  color: #cccccc;\r\n}<\/pre>\n<h4>length<\/h4>\n<p>\u914d\u5217\u306e\u500b\u6570\u3092\u53d6\u5f97\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \">$array: meron,itigo,suica;\r\n\r\n.length {\r\n  z-index: length($array);\r\n}<\/pre>\n<h4>nth<\/h4>\n<p>\u914d\u5217\u306eN\u756a\u76ee\u306e\u8981\u7d20\u3092\u51fa\u529b\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \">$array: meron,itigo,suica;\r\n\r\n.nth {\r\n  content: nth($array,2);\r\n}\r\n<\/pre>\n<h4>join<\/h4>\n<p>\u4e8c\u3064\u306e\u914d\u5217\u3092\u7d50\u5408\u3057\u3066\u51fa\u529b\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">$array: meron,itigo,suica;\r\n$array2: lemon,kyuui;\r\n.join {\r\n  content: join($array,$array2);\r\n}<\/pre>\n<h4>append<\/h4>\n<p>\u914d\u5217\u306e\u672b\u5c3e\u306b\u8981\u7d20\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">$array: meron,itigo,suica;\r\n.append {\r\n  content: append($array,lemon);\r\n}<\/pre>\n<h4>map-get<\/h4>\n<p>map\u304b\u3089\u5fc5\u8981\u306a\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">$map: (\r\n  white: #fff,\r\n  black: #000\r\n);\r\n\r\n.map_get {\r\n  color: map-get($map,white);\r\n}<\/pre>\n<h3>\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\u3068\u306f\uff1f<\/h3>\n<p>Sass\u306b\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u95a2\u6570\u3092\u30e6\u30fc\u30b6\u30fc\u81ea\u8eab\u304c\u7528\u610f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<h4>\u5b9f\u88c5\u4f8b<\/h4>\n<pre class=\"lang:default decode:true\">@function sum($arg1,$arg2){\r\n  @return $arg1 + $arg2;\r\n}\r\n\r\n.add {\r\n  witdh: sum(100px,200px);\r\n}<\/pre>\n<h4>\u305d\u306e\u4ed6\u6a5f\u80fd<\/h4>\n<ul>\n<li>\u300c\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u300d\u306e\u3084\u308a\u65b9\u306fmixin\u3068\u540c\u3058\u3067\u3059\u3002<\/li>\n<li>\u95a2\u6570\u306e\u4e2d\u3067\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3092\u4f7f\u3048\u307e\u3059\u3002<\/li>\n<li>\u5909\u6570\u3084\u30eb\u30fc\u30d7\u3001\u5236\u5fa1\u69cb\u6587\u3082\u4f7f\u3048\u307e\u3059\u3002<\/li>\n<\/ul>\n<h4>\u30c7\u30d0\u30c3\u30b0<\/h4>\n<p>\u4ee5\u4e0b\u306e\u69cb\u6587\u3067\u5909\u6570\u306e\u5024\u3092\u898b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">@debug\u00a0$\u5909\u6570\u540d;<\/pre>\n<h5>\u8b66\u544a<\/h5>\n<p>\u3042\u307e\u308a\u671b\u307e\u3057\u304f\u306a\u3044\u3053\u3068\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306a\u3069\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3059\u308b\u76ee\u7684\u306a\u3069\u3067\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">@warn '\u8b66\u544a\u5185\u5bb9';<\/pre>\n<h5>\u30a8\u30e9\u30fc<\/h5>\n<p>\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306b\u4f7f\u3044\u307e\u3059\u3002\u8b66\u544a\u3068\u7570\u306a\u308a\u51e6\u7406\u304c\u505c\u6b62\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">@error '\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8';<\/pre>\n<h2>@at-root<\/h2>\n<h3>\u4f7f\u3044\u65b9<\/h3>\n<p>@at-root\u3068\u3064\u3051\u305f\u3082\u306e\u3092\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u305f\u3068\u3057\u3066\u3082\u30eb\u30fc\u30c8\u8981\u7d20\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">.btn {\r\n  @at-root {\r\n    div {\r\n      color: #fff;\r\n    }\r\n  }\r\n}<\/pre>\n<h4>\u5909\u63db\u5f8c\u306eCSS<\/h4>\n<pre class=\"lang:default decode:true \">div {\r\n  color: #fff;\r\n}<\/pre>\n<h3>\u4f7f\u3044\u9053<\/h3>\n<p>\u6b63\u76f4\u3042\u307e\u308a\u306a\u3044\u3067\u3059\u3002\u305f\u3060\u3001<span style=\"color: #ff0000;\"><strong>\u300c<\/strong><strong>@mixin\u300d<\/strong><\/span>\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"mixin\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9 \u5909\u63db\u524d @mixin test { border: 1px solid #fff; } .test_import { @include test; } \u5909\u63db\u5f8c .test_import { b [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[142],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/16869"}],"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=16869"}],"version-history":[{"count":13,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/16869\/revisions"}],"predecessor-version":[{"id":20560,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/16869\/revisions\/20560"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16869"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}