{"id":560,"date":"2018-09-03T20:32:00","date_gmt":"2018-09-03T11:32:00","guid":{"rendered":"https:\/\/www.dogrow.net\/hp\/?p=560"},"modified":"2018-09-03T21:06:50","modified_gmt":"2018-09-03T12:06:50","slug":"blog56","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/hp\/blog56\/","title":{"rendered":"(56) \u3010Sass\u5165\u9580#1\u3011sass\u3067css\u3092\u7c21\u6f54\u306b\u66f8\u304f\u3002"},"content":{"rendered":"<h1 class=\"my_h\">1. \u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u5927\u304d\u306a\u30b5\u30a4\u30c8\u3092\u66f8\u304f\u3068\u3001\u5fc5\u7136\u7684\u306bCSS\u3082\u5927\u304d\u304f\u8907\u96d1\u306b\u306a\u308b\u3002<\/p>\n<p>\u3053\u3093\u306a\u3068\u304d&#8230;<br \/>\n\u300cCSS\u3067\u5909\u6570\u304c\u4f7f\u3048\u305f\u3089\u306a\u3041&#8230;\u300d<br \/>\n\u300c\u901f\u5ea6\u306e\u30ed\u30b9\u306a\u304fCSS\u306e\u4e2d\u3067\u5225\u306eCSS\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u51fa\u6765\u305f\u3089\u306a\u3041&#8230;\u300d<br \/>\n\u300c\u4f3c\u305f\u3088\u3046\u306a\u8a18\u8ff0\u3092\u5171\u901a\u95a2\u6570\u3067\u66f8\u3051\u305f\u3089\u306a\u3041&#8230;\u300d<\/p>\n<p>\u306a\u3069\u3001\u666e\u901a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3068\u540c\u3058\u3053\u3068\u304c\u51fa\u6765\u308c\u3070\u4fbf\u5229\u3060\u306a\u3041\u3068\u601d\u3046\u3002<\/p>\n<p>\u540c\u3058\u3053\u3068\u3092\u8003\u3048\u308b\u5148\u4eba\u305f\u3061\u304c\u5f53\u7136\u306e\u3054\u3068\u304f\u5b58\u5728\u3057\u3066\u304a\u308a\u3001\u3053\u306e\u601d\u3044\u3092\u5177\u73fe\u5316\u3057\u3066\u304f\u308c\u3066\u3044\u305f\u3002<\/p>\n<p>\u305d\u308c\u304c <span class=\"my_fc_deeppink\">Sass<\/span> \u306a\u306e\u3060\u305d\u3046\u3060\u3002<br \/>\n<span class=\"my_fc_crimson\">\u203bSyntactically Awesome Stylesheets \u30b5\u30fc\u30b9\u3068\u8aad\u3080\u3002<\/span><\/p>\n<h1 class=\"my_h\">2. Sass\u306e\u30e1\u30ab\u30cb\u30ba\u30e0<\/h1>\n<p>\u5f53\u7136\u306a\u304c\u3089 WEB\u30d6\u30e9\u30a6\u30b6\u306f CSS\u306f\u7406\u89e3\u3067\u304d\u3066\u3082 SASS\u306a\u3069\u306f\u5168\u304f\u77e5\u3089\u306a\u3044\u3002<br \/>\n\u5f93\u3063\u3066\u3001WEB\u30b5\u30fc\u30d0\u30fc\u304c\u30d5\u30a1\u30a4\u30eb\u3092\u62fe\u3044\u306b\u6765\u308b\u5834\u6240\u306b\u306f\u3001CSS\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u304a\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u3064\u307e\u308a&#8230;<br \/>\n1) Sass\u8a00\u8a9e\u3067 CSS\u306e\u5143\u30cd\u30bf\u3068\u306a\u308b\u3082\u306e\u3092\u66f8\u304f\u3002<br \/>\n2) Sass\u30d7\u30ed\u30b0\u30e9\u30e0\u3067 CSS\u30d5\u30a1\u30a4\u30eb\u306b\u30b3\u30f3\u30d0\u30fc\u30c8\u3059\u308b\u3002<br \/>\n3) \u751f\u6210\u3055\u308c\u305f CSS\u30d5\u30a1\u30a4\u30eb\u3092 WEB\u30b5\u30fc\u30d0\u30fc\u306e\u898b\u3048\u308b\u5834\u6240\u306b\u7f6e\u304f\u3002<\/p>\n<p>\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u306b\u306a\u308b\u3002<\/p>\n<h1 class=\"my_h\">3. \u3084\u3063\u3066\u307f\u308b<\/h1>\n<h2 class=\"my_h\">(1) Sass\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>Sass\u306f Ruby\u4e0a\u3067\u52d5\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u306e\u3067\u3001\u307e\u305a\u306f Ruby\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n\u79c1\u306f CentOS7\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067 yum \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nyum install ruby ruby-devel\r\n<\/pre>\n<p>\u6b21\u306bSass\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngem install sass\r\n<\/pre>\n<p>Sass\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3002<\/p>\n<pre>\r\n# sass -v\r\nRuby Sass 3.5.7\r\n<\/pre>\n<h2 class=\"my_h\">(2) \u5165\u308c\u5b50\u69cb\u9020\u3092\u66f8\u3044\u3066\u307f\u308b\u3002<\/h2>\n<p>\u3053\u3093\u306a SCSS\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3002<br \/>\n<b>style.scss<\/b><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#box{\r\n  display: inline-block;\r\n  padding: 1rem;\r\n  p {\r\n    font-size: 1rem;\r\n    padding: 0.5rem;\r\n  }\r\n}\r\n<\/pre>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092 SASS\u3067 CSS\u306b\u5909\u63db\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsass style.scss:style.css\r\n<\/pre>\n<p>\u5165\u308c\u5b50\u69cb\u9020\u304c\u5c55\u958b\u3055\u308c\u3066\u3001\u3053\u3093\u306a CSS\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u305f\u3002<br \/>\n<b>style.css<\/b><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#box {\r\n  display: inline-block;\r\n  padding: 1rem;\r\n}\r\ndiv#box p {\r\n  font-size: 1rem;\r\n  padding: 0.5rem;\r\n}\r\n<\/pre>\n<p>\u671f\u5f85\u901a\u308a\u306b\u51fa\u6765\u4e0a\u304c\u3063\u3066\u3044\u308b\u3002<\/p>\n<h2 class=\"my_h\">(3) \u4ed6\u30d5\u30a1\u30a4\u30eb\u3092 import \u3057\u3066\u307f\u308b\u3002<\/h2>\n<p>\u3053\u3093\u306a SCSS\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3002<br \/>\n<b>style.scss<\/b><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n@import &quot;child1.scss&quot;;\r\n@import &quot;child2.scss&quot;;\r\n<\/pre>\n<p><b>child1.scss<\/b><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1{\r\n  padding: 1rem;\r\n  p {\r\n    line-height: 1.5rem;\r\n  }\r\n}\r\n<\/pre>\n<p><b>child2.scss<\/b><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id2{\r\n  padding: 1.2rem;\r\n  p {\r\n    line-height: 1.7rem;\r\n  }\r\n}\r\n<\/pre>\n<p>\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092 SASS\u3067 CSS\u306b\u5909\u63db\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsass style.scss:style.css\r\n<\/pre>\n<p>\u3053\u3093\u306a CSS\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u305f\u3002<br \/>\n<b>style.css<\/b><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1 {\r\n  padding: 1rem; }\r\n  div#id1 p {\r\n    line-height: 1.5rem; }\r\n\r\ndiv#id2 {\r\n  padding: 1.2rem; }\r\n  div#id2 p {\r\n    line-height: 1.7rem; }\r\n<\/pre>\n<p>\u671f\u5f85\u901a\u308a\u306b\u51fa\u6765\u4e0a\u304c\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u3064\u3044\u3067\u306b <a href=\"https:\/\/www.dogrow.net\/hp\/blog50\/\">(50) Node.js + gulp\u3067css\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u5727\u7e2e<\/a> \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f cleancss \u3067 minify \u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncleancss -o .\/style.css .\/style.css\r\n<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u306a\u3063\u305f\u3002<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1{padding:1rem}div#id1 p{line-height:1.5rem}div#id2{padding:1.2rem}div#id2 p{line-height:1.7rem}\r\n<\/pre>\n<h2 class=\"my_h\">(3) -t \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u51fa\u529b\u5f62\u5f0f\u3092\u6307\u5b9a\u3059\u308b\u3002<\/h2>\n<h3 class=\"my_h\">1) expanded<\/h3>\n<p>expanded\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3067 sass\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsass -t expanded style.scss:style.css\r\n<\/pre>\n<p>\u666e\u901a\u306eCSS\u5f62\u5f0f\u3067\u51fa\u529b\u3055\u308c\u308b\u3002<br \/>\n\u624b\u66f8\u304d\u3068\u540c\u3058\u306a\u306e\u3067\u3053\u308c\u304c\u4e00\u756a\u898b\u3084\u3059\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<br \/>\n\u304c&#8230;<\/p>\n<p>\u76ee\u8996\u3057\u3066\u7de8\u96c6\u3059\u308b\u306e\u306f SASS\u5f62\u5f0f\u3001WEB\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u30a2\u30c3\u30d7\u6642\u306b\u306f minify\u306e\u5f8c\u3001<br \/>\n\u306a\u306e\u3067\u3001\u3053\u306e\u4e2d\u9593\u751f\u6210\u7269\u7684\u306a\u4f4d\u7f6e\u3065\u3051\u306e Sass\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u6c17\u306b\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1 {\r\n  padding: 1rem;\r\n}\r\ndiv#id1 p {\r\n  line-height: 1.5rem;\r\n}\r\n<\/pre>\n<h3 class=\"my_h\">2) compact<\/h3>\n<p>compact\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3067 sass\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsass -t compact style.scss:style.css\r\n<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u51fa\u529b\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1 { padding: 1rem; }\r\ndiv#id1 p { line-height: 1.5rem; }\r\n<\/pre>\n<h3 class=\"my_h\">3) compressed<\/h3>\n<p>compressed\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3067 sass\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsass -t compressed style.scss:style.css\r\n<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u51fa\u529b\u3055\u308c\u308b\u3002<br \/>\ncleancss\u3067 minify\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002<br \/>\n<span class=\"my_fc_deeppink my_fw_bold\">\u3053\u308c\u304c\u4e00\u756a\u5b9f\u7528\u7684\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/span><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1{padding:1rem}div#id1 p{line-height:1.5rem}div#id2{padding:1.2rem}div#id2 p{line-height:1.7rem}\r\n<\/pre>\n<h3 class=\"my_h\">4) nested (default)<\/h3>\n<p>nested\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3067 sass\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<br \/>\n-t\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u304c\u3053\u308c\u3060\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsass -t nested style.scss:style.css\r\n<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u51fa\u529b\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\ndiv#id1 {\r\n  padding: 1rem; }\r\n  div#id1 p {\r\n    line-height: 1.5rem; }\r\n<\/pre>\n<p>\u672c\u6295\u7a3f\u304c\u3066\u3093\u3053\u76db\u308a\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u305d\u3046\u306a\u306e\u3067\u3001\u3053\u306e\u4ed6\u306e Sass\u306e\u4f7f\u3044\u65b9\u306f\u6b21\u56de\u6295\u7a3f\u4ee5\u964d\u3067\u66f8\u304f\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>1. \u3084\u308a\u305f\u3044\u3053\u3068 \u5927\u304d\u306a\u30b5\u30a4\u30c8\u3092\u66f8\u304f\u3068\u3001\u5fc5\u7136\u7684\u306bCSS\u3082\u5927\u304d\u304f\u8907\u96d1\u306b\u306a\u308b\u3002 \u3053\u3093\u306a\u3068\u304d&#8230; \u300cCSS\u3067\u5909\u6570\u304c\u4f7f\u3048\u305f\u3089\u306a\u3041&#8230;\u300d \u300c\u901f\u5ea6\u306e\u30ed\u30b9\u306a\u304fCSS\u306e\u4e2d\u3067\u5225\u306eCSS\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u51fa\u6765\u305f\u3089\u306a\u3041&#038;#82\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/hp\/blog56\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,19],"tags":[],"class_list":["post-560","post","type-post","status-publish","format-standard","hentry","category-htmlcss","category-sass"],"views":1654,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts\/560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/comments?post=560"}],"version-history":[{"count":16,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"predecessor-version":[{"id":576,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts\/560\/revisions\/576"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}