ã¢ã³ãã¬ã€ã»ã·ããã¯ïŒã€ã¹ãã³ã éªæªãªç«æ人 ïŒ
2013幎ãHolowaychukã¯ãRevorkã«ããã¢ãžã¥ã©ãŒCSSããªããã»ãã·ã³ã°ããšããã¿ã€ãã«ã®èšäºïŒ http://tjholowaychuk.tumblr.com/post/44267035203/modular-css-preprocessing-with-rework ïŒã§Reworkãããžã§ã¯ããçºè¡šããŸããã
ã¡ããã©ãã®ãšããèªåãã¬ãã£ãã¯ã¹ãäœæããããã®äœããã®ããŒã«ãæ¢ããŠããŸããã ãã®èšäºãèªãã ãšããããã¯æ¬åœã«é©åœçãªã¢ãããŒãã§ããããã¹ãŠãå€ããã®ã§é©ããŸããã ãã®ãããèªåãã¬ãã£ãã¯ã¹ã®æåã®ããŒãžã§ã³ã¯ãªã¯ãŒã¯ã«åºã¥ããŠããŸããã ããããæ®å¿µãªããããªã¯ãŒã¯-ããã¯æŠå¿µå®èšŒã§ãããäžè¬ã«æ©èœããããšã蚌æããæåã®äžä»£ã§ããã ãããã£ãŠãæã ã¯ããããã£ãããšåå²ããããã¹ãŠã®éçºè ãèªããå°ããªé©åœãèµ·ãããPostCSSãäœããŸããã
PostCSSã¯ãã¢ãžã¥ã©ãŒããã»ããµã®ç¬¬2äžä»£ã§ãã
ããã§ã¯ãPostCSSãšã¯äœã§ããïŒ
PostCSSã¯ãéåžžã«ã·ã³ãã«ãªã³ã¢ãåããã¢ãžã¥ã©ãŒããªããã»ããµã§ãã ã³ã¢ã¯æ¬¡ã®2ã€ã®èŠçŽ ã§æ§æãããŠããŸãã
- CSSæååãå ¥åãšããŠåãåããjavascriptãªããžã§ã¯ãã®ããªãŒãåºåããããŒãµãŒã ASTïŒæœè±¡æ§æããªãŒïŒã
- 圌ã¯å察ã®ããšãããŸã-圌ã¯å ¥åãšããŠãªããžã§ã¯ãã®åœ¢ã§æœè±¡çãªããªãŒãåãåããåºåçšã®æ°ããCSSãçæããŸãã ããã©ã«ãã§ã¯ãPostCSSã³ã¢ã¯éåžžã«äŸ¿å©ã§éåžžã«äŸ¿å©ã§ãããäœãããŸããã CSSã解æããŠãããæååã«æ»ãããã€ãããã€ãåäœã§ïŒç©ºçœãå«ããŠïŒæ ŒçŽãããããã«ããŸãã
ãã¹ãŠã®éæ³ã¯ãããã®ãã©ã°ã€ã³ã«ãããŸãã
ãã©ã°ã€ã³ãšã¯äœã§ããïŒ ãã©ã°ã€ã³ã¯ãASTãå ¥åãšããŠåãåãããã®ããŒãã®ããã€ããå埩åŠçããäœããæ€çŽ¢ããäœããå€æŽããäœããè¿œå ããå€æŽãããããªãŒãæ»ããããªJavaScripté¢æ°ã§ãã 次ã®ãã©ã°ã€ã³ã¯ãå€æŽãããããªãŒã«ç§»åããŸã...ãã§ãŒã³ã«ãªããŸãã ãããŠæåŸã«-ãã®å€æŽãããããªãŒãååŸããŠæ°ããè¡ã«ä¿åããã³ãŒãã«ãŒããçæãããœãŒã·ã³ã°ãè¡ãããžãã¯ã¹ããªã³ã°ãã¡ã€ã¢ã æ°ãããã®ãçæããããå€ããã®ãæŽæ°ããŸãã
Torvaldsããã³ãŒããèŠããŠããšèšã£ãããã«ãç§ãã¡ã¯ãã¹ãŠããã°ã©ããŒãªã®ã§ãã³ãŒãã¯éèŠã§ãã
ã©ã®ããã«èŠããŸããïŒ PostCSSã¯NPã©ã€ãã©ãªã§ãããNPããããŒãããŸãã 次ã«ãã€ã³ã¹ã¿ã³ã¹ãäœæããããã»ããµãªããžã§ã¯ããäœæããæåŸã®ã¹ãããã«ãããã©ã°ã€ã³ã転éããŸãã ãã®ããã»ããµãä»ããŠCSSãååŸããŠå®è¡ããŸãã ãããŠãç§ãã¡ã¯çŽæã®å©ããåããŠçµæãåŸãŸãã
ãã©ã°ã€ã³ã®äŸïŒ
ããªããã»ããµã§ã¯ã枬å®åäœã®èŠªåãäœæã§ããŸããã PostCSSã§æžããŸãããã ãã©ã°ã€ã³ã¯ãCSSãå ¥åãšããŠäœ¿çšããé¢æ°ã§ãããCSSå€æ°ã«å«ãŸãããªããžã§ã¯ãã®ããªãŒã§ãã ããã«ããã®ããªãŒã«ã¯ãã®ãããªéæ³ã®æ©èœããããŸããããã°ã©ã ãç°¡åã«ããããã«ããã¹ãŠã®ããããã£ã®ã€ãã¬ãŒã¿ããããå éšã§ã¯ååž°çã§ãã ãããŠããã¹ãŠã®ããããã£ã調ã¹ãŠè¡ããŸãã ãšããã§ãããã¯ES6ã«æ³šç®ããŠãã ããã ãã¹ãŠã®ããããã£ãå埩åŠçããããããã£ã§remå€ãæ¢ãããã¯ã»ã«ã«çœ®ãæããŸãã æ®å¿µãªãããCoffeeScriptããªããããæ¬åŒ§ãéããŸãã ããã¯ãremã®ããã«ãã®ãããªåºæ¬çãªæ奜家ãäœãããã«æžãå¿ èŠããããã¹ãŠã®ã³ãŒãã§ãã
éãã¯äœã§ããïŒ
誰ãåããã誰ãåããªãããåžžã«ç¥ãå¿ èŠããããŸãã ã©ãã«ããªããã»ããµããããã©ãã«ãã¹ãããã»ããµãããã®ãââãæ£ç¢ºã«å€æããå¿ èŠããããŸãã ããªããã»ããµã¯ã¢ããªã·ãã¯ã§ããã¹ãŠã®æ©èœã¯ã«ãŒãã«ã«çµã¿èŸŒãŸãããã¹ãŠã®å€æ°ãäžçŽç©ã¯ãã¹ãŠå éšã«ãããæ§æå šäœã§ãã 2çªç®ã®ããš-ã³ãŒãããã³ãã¬ãŒãã«çŽæ¥ä¿æããå®å šãªããã°ã©ãã³ã°èšèªã䜿çšããŸãã
PostCSSã§ã¯ããã¹ãŠããã©ã°ã€ã³ã®åœ¢åŒã§ãããã«ãŒãã«ã¯äœãããŸããã 2çªç®ã®ãã€ã³ã-ã³ãŒããšã¹ã¿ã€ã«ã¯å¥ã ã«ãããŸãããéåžžã®JavaScriptããã°ã©ãã³ã°èšèªã®ã³ãŒããšCSS-CSSãå¥ã ã«ããããšãããããŸãã
ãªãããããããªã«éèŠãªã®ã§ããïŒ ãããã®ãã©ã°ã€ã³ã¯éæ³ã®ããš-é²åãå®è£ ããŠããããã§ãã
ããã€ãã®ã¯ã¬ã€ãžãŒãªã¢ã€ãã¢ãããªãã«æ¥ãŠãããªãã®å人ã¯ããªããç¬ããŸãã ããªãã¯ããããã©ã°ã€ã³ãäŸãã°æ°ããæé©åæ¹æ³ãšããŠåãå ¥ããŠå®è£ ãããããå ¬éããŸãã æ®å¿µãªããã圌ãã¯æãã¿ãå«ãã ããããªããç¬ãç¶ããŸãããå°ãªããšãäžéšã®äººã ã¯ãããç解ããããã䜿ãå§ããããããã§ãã¯ããŸãã 圌ãã¯æåãã圌ãã¯ããå€ãéãããããªããç¬ã£ã人ã ã¯è§£éãããŸãã ãã°ãããããšãã»ãšãã©ã®ãŠãŒã¶ãŒããã©ã°ã€ã³ã䜿çšããããšãããããŸããã ã¢ã€ãã¢ãçŸããããã§ã¯ãªããå®éã«å®éã«æ©èœããããã§ãã ãããŠã人æ°ãåºãŠããããW3Cã«æ¥ãŠã圌ãã«ãã©ãããæžãããä»ã®èª°ãã«ä»æ§ãäœæããããäŸé Œããããšãã§ããŸãã ä»æ§ãå®è¡ããããã«ãå®éã®å®çšçãªã¢ããªã±ãŒã·ã§ã³ããªãå Žåãå®è·µã¯ãªãããããæ©èœãããã©ããã¯èª°ã«ãããããŸããã ãã ãã人æ°ãããå Žåã¯ãä»æ§ãäœæããŠãæ°ãããµãŒã¯ã«ãæ°ããå±èŸ±ãæ°ãããã©ã°ã€ã³ãªã©ã«ç§»åããŸãã
ããã¯çè«ã§ããã çŸä»£ç§åŠã¯éåžžã«æ£ããããšãèšã£ãŠããŸã-çè«ã¯å®è·µãªãã§ã¯äœãæå³ããŸããã ã¢ã€ãã¢ãå®éã«æ©èœããå Žåãå®éã®å®çšçãªçµæãåŸãããäœããåŸãããŸãã PostCSSãæ©èœããå Žåãããªããã»ããµãããåªããŠãããããçããŠããäœãã觊ããããšãã§ãããã®ããããŸãã ããããããã©ãããèŠãŠã¿ãŸãããã
æåã®ãã®ã ãã¡ãããPostCSSã«ã¯å€æ°ããããŸããé£ããã¯ãããŸããããã¹ããé£ããããããŸãããã¢ã³ããµã³ãã䜿çšãããšã誰ãã奜ãã®ã§ããã¡ããBEMã«ã¯äžçŽç©ããããæ§æã¯ãããã«ç°ãªããŸãããåãã§ãã ããããéèŠãªãã€ã³ãã¯äœã§ããïŒ ããã¯ãã¹ãŠãã©ã°ã€ã³ã®åœ¢ã§è¡ãããŸãã å€æ°ããã¹ããããã³äžçŽç©ã ããšãã°ãå€æ°ã«ã¯2ã€ã®ãã©ã°ã€ã³ãããã1ã€ã¯å€ãè¯ãSassã¹ã¿ã€ã«ãå®è£ ãããã1ã€ã¯W3Cæ§æã§ããcssã«ã¹ã¿ã ããããã£ãå®è£ ããŸãã
2çªç®ã®éèŠãªç¹ã¯ãéåžžã«å°ããããšã§ãã ããšãã°ããã¹ãã¯60è¡ã®éåžžã®JavaScriptã³ãŒãã§ãã ããªãã¯ãããåãåã£ãŠä¿®æ£ããããšãã§ããç§ããããåãå ¥ããããšãæåŠãããªããããªãã¯ãããåãåã£ãŠãã©ãŒã¯ããããšãã§ããŸãã ããã¯ãŸã£ããåé¡ãããŸããã1æ¥ã§å¥ã®ãã¹ããè¡ãããšãã§ããŸãã
PostCSSã¯Sassãã¢ãžã¥ãŒã«åŒã«åäœãããããšã§ã¯ãããŸãããããã»ã©ã¯ãŒã«ã§ã¯ãªãããã§ãã ã¢ãžã¥ãŒã«æ§ã¯ã¢ãžã¥ãŒã«æ§ã§ã¯ãããŸããã誰ãæ°ã«ããŸããïŒ äž»ãªè³ªåïŒãã以äžã®ããšãè¡ãããšã¯å¯èœã§ããïŒå®å šã«æ°ããéæ³ãè¡ãããšã¯å¯èœã§ããïŒ ãããŠãããã§ã¯èªåæ¥é èŸãäž»ãªäŸã§ãã åçŽãªCSSãšèªåãã¬ãã£ãã¯ã¹èªäœãèšè¿°ããã ãã§ãã 圌ã«ã¯Can I UseããŒã¿ããŒã¹ãããã圌èªèº«ããã¬ãã£ãã¯ã¹ãå¿ èŠãšããããããã£ãèŠã€ããŠè¿œå ããããããçš®é¡ã®è€éãªéæ³ãå®è¡ããŠããŸãã
ããèå³æ·±ãcssnextã®äŸã
Javascriptã§ã¯ãå°æ¥ãã©ãŠã¶ã«ãŸã ãªãJavascriptã䜿çšã§ããããã«ãªããŸããã ãããŠããããçŸåšã®ãã®ã«ã³ã³ãã€ã«ããã³ã³ãã€ã©ããããŸãã ããããã¹ãŠCSSã§è¡ãã®ã¯çŽ æŽãããããšã§ãã ããšãã°ãCSS 4ããããŸããæ°ãããããããã®ããããããããŸãã ããšãã°ãè¿œå ã®ã»ã¬ã¯ã¿ãŒãã«ã¹ã¿ã ãå人çšã®ã»ã¬ã¯ã¿ãŒã宣èšããŠäœ¿çšã§ããŸãã ãã®ããã«ãcssnextããããŸãã
Cssnextã¯ãã©ã³ã¹ããŒã¿ãŒã§ãã ããªãã¯çŸåšCSS 4ãæžããŠãããCSS 3ã«ã³ã³ãã€ã«ããŠããŸããããã¯ãSassã§äœãã§ããªãããšããåé¡ã§ãã ããšãã°ãã«ã¹ã¿ã ã»ã¬ã¯ã¿ã«å ããŠãè²ãæäœããããã®æšæºåãããæ©èœããããããçš®é¡ã®äŸ¿å©ãªã·ã§ãŒãã«ãããçšæãããŠããŸãã ä»ãããªãã¯æ¥ãŠè¿œå ããããšãã§ããŸãã
ããããä»ã¯æã話ããããŸãã
äžåœã巚倧ãªåžå Žãããããã®ãéããã¹ãŠã®ãã®ããããäœãèµ·ãã£ãŠããã®ã-ææïŒ E7ã8çªç®ãããã«ã¯6çªç®ããŸã 人æ°ããããŸãã ããã¯ã²ã©ãã§ããããéã欲ããã§ãã ãã®ãããäžåœäŒæ¥ã®ã¢ãªããã¯cssgraceãã©ã°ã€ã³ãäœæããŸããã ããã¯cssnextã®ãããªãã®ã§ããã®å察ã§ãã 圌ã¯å¹³åããè¯ãã³ãŒããäœã£ãŠã¯ããŸããããéã«æªãã³ãŒããå¹³åããäœã£ãŠããŸãã CSSãééããEã§æ©èœããªãããããã£ãèŠã€ããããããããã¯ã«çœ®ãæããŸãã ããã¯å°ãäžçŽç©ã«äŒŒãŠããŸããããªããããã¯ãŒã«ã§ããªããããSassã§ã¯äžå¯èœã§ããããšãéèŠã§ããïŒ äžçŽç©ã«ã€ããŠã¯ãäžçŽç©ãæžã蟌ãå¿ èŠãããå ŽæãèŠããŠããå¿ èŠããããããäžéæ床ããµããŒããããŠããªãããšã«æ³šæããå¿ èŠããããŸãã ãããŠãããã§ããªãã¯ãã æžããŠãããã«ã€ããŠèããŸãããããããäžåœäººãåã®äžåœäººã¯ããªãã®ããã«èããŠããŸãã
ããã«ãããããã£ã䜿çšãããã¹ãŠã®ããžãã¯ãããã³ã»ã¬ã¯ã¿ã䜿çšããããžãã¯ãå®è¡ã§ããŸãã ã²ã©ãããã¯ããããŸãã芪ã«4ã€ã®èŠçŽ ãããå Žåã25ïŒ å¹ ã5ã€ãªã20ã«ããŸããããããã¯ä»ããã«ã§ããŸãã ãããã³ã°ã¯æ°å³ãæªãã®ã§ãæåã§èšè¿°ããŸãããããã®ãã©ã°ã€ã³ãŸãã¯PostCSSã䜿çšãããšãè¿œå ã®ã»ã¬ã¯ã¿ãŒãè¿œå ãããŸãã
ãŸãã¯å¥ã®ããšã äžèšã¯ãã¹ãŠã³ãŒãã®èšè¿°æ¹æ³ã«é¢ãããã®ã§ãããããã¯ãµã€ãã®èªã¿èŸŒã¿ãé«éåããããã®ã³ãŒãã®äœææ¹æ³ã«é¢ãããã®ã§ãã
ã¹ãã©ã€ãã¯ãããŸãããã€ã³ã©ã€ã³ç»åã®Bij 3ãšã³ã³ãŒãããããé·æãšçæããããŸãã ããããçµã¿åãããã®ã¯çŽ æŽãããããšã§ãã ã€ã³ã©ã€ã³ã§CSSã倧ãããªãããŠãŒã¶ãŒãCSSã«ã€ã³ã©ã€ã³ã§ç»åãã¢ããããŒããããŸã§ãµã€ãã«ã¢ã¯ã»ã¹ãããšãäœã衚瀺ãããªããªããŸããããã¯æªãããšã§ãã ãã¶ã€ã³ãæåã«èªã¿èŸŒãŸãã次ã«åçãèªã¿èŸŒãŸãããšã¯ãŒã«ã§ãã ãã®ããã«ãéæ³ã®ããŒã¿ããã«ãŒãã©ã°ã€ã³ããããŸãã CSSãééãããã¹ãŠã®åçãã€ã³ã©ã€ã³ã§èŠã€ããŠãå¥ã®ãã¡ã€ã«ã«å ¥ããŸãã ãããã£ãŠã圌ã¯2ã€ã®ã»ã¬ã¯ã¿ãŒãåãç»åã䜿çšããŠããããšãçºèŠãããããã®ã»ã¬ã¯ã¿ãŒãçµã¿åãããŸãã
ãã®çµæããŠãŒã¶ãŒããµã€ãã«ã¢ã¯ã»ã¹ãããšãCSSãã¶ã€ã³ãããã«èªã¿èŸŒãŸããé·ãéåçä»ãã®CSSã䟿å©ã«ãªããŸãã ã€ãŸã ãã©ã°ã€ã³ã1ã€è¿œå ããã ãã§ããµã€ãã¯ããé«éã«ãªããŸãã
èå³æ·±ãç¹ã IE9ããµããŒãããŠããã®ã¯èª°ã§ããïŒ ãããŠã誰ãè²èŠç°åžžã®ãã人ãæ¯æŽããŸããïŒ åé¡ã¯ãè²ãèŠããªã人ã®5ïŒ ãšå€ãIEãŠãŒã¶ãŒãå°ãªãããšã§ãã ãããŠãç¶æããããšã¯éåžžã«éèŠã§ãã ãããŠãããªãã¯ãããçœé»ã®ããžã§ã³ã§ã¯ãªãããšãç解ããå¿ èŠããããŸãã 亀éä¿¡å·ã«é¢ãããããã®ãžã§ãŒã¯ã¯ãã¹ãŠãè²èŠç°åžžã«é¢ãããã®ã§ã¯ãããŸããã ããšãã°ãå¥åº·ãªäººã¯ãããèŠãŠïŒå·ŠåŽïŒãè²èŠç°åžžã®äººã¯ãããèŠãŠïŒå³åŽïŒã ãã¿ã³ãç®ç«ããªãããšã確èªããŠãã ããã
ããã¯ãã¹ãããå¿ èŠããããPostCSSã®äœ¿çšã¯ç°¡åã«ãã¹ãã§ããŸãã ãã©ã°ã€ã³ããããŸãã ããšãã°ãéçºäžã«ãéåžžã®ãã«ããäœæãããã©ã°ã€ã³ãå¥ã®ãã«ãã«è¿œå ããŸãã ãã®ãã©ã°ã€ã³ã¯ãCSSã®ãã¹ãŠã®è²ãééããããŸããŸãªçš®é¡ã®è²èŠç°åžžã®ãã人ãèŠãè²ã«çœ®ãæããŸãã ãã¡ããããã£ãšäŸ¿å©ãªããŒã«ã¯ãããŸããããã£ãšäŸ¿å©ãªããŒã«ã䜿çšããªããšãããªãã«åããªãããšãç解ããŠããŸãã ããããããã«ããããããã®ç°¡åãªããŒã«ã䜿çšããŠãè²èŠç°åžžã®ãã人ã®ãµã€ãã確èªã§ããŸãã
ãã1ã€ã®èå³æ·±ãç¹ããããŸããPostCSSã¯ãCSSãå€æŽããã ãã§ãªãããã§ãã¯ããããã«ã䜿çšã§ããŸãã ããšãã°ãTwitterã¯ãªã³ã¿ãŒãBEMã«PostCSSã䜿çšããŸãã ããã¯éåžžã«ã¯ãŒã«ãªãªã³ã¿ãŒã§ã¯ãããŸããããã§ã«äœ¿çšããŠããå¯èœæ§ã®ãããã¹ãŠã®ãªã³ã¿ãŒãšåæ§ã«ãã·ã³ãã«ã ããã§ãã ãããŠãããã¯ã¯ãŒã«ãªãªã³ã¿ãŒã§ã-doiuseïŒ
2ã€ã®ãã¬ãã£ãã¯ã¹ã®ããã«åäœããŸãããå®èŠã§æãå©ãã ãã§ãã Can I UseããŒã¿ããŒã¹ãä¿åããCSSãå®è¡ããŸããããšãã°ãããããIEããµããŒãããããšèšã£ãããéžæãããŠãŒã¶ãŒã¯IEã§ãµããŒããããŠããªãã®ã§ããããæžããã¯ãã ã ïŒã ããã¯éåžžã«äŸ¿å©ãªããšã§ãã
ããã¯ç§ã®ãæ°ã«å ¥ãã®ãã©ã°ã€ã³ã§ãã ããã¯ãŠã£ãããã£ã¢ãããã©ã€èªã§ã©ã®ããã«èŠãããã§ãã ãªãã§ïŒ ãŠãã€äººãšã¢ã©ã人ã¯å察ã®æ¹æ³ã§æžãããã§ãã ããã¯éåžžã«å€ãæçŽã§ãã ããããäºå®ã¯ãïŒæªæ¥ããªãããã«ããã®ãçåã«æã£ãããšã¯ãããŸãã-å³åŽã«ïŒïŒæªæ¥ã¯å³åŽã«ãããŸãã ãããŠãç§ãã¡ãä»ã®æ¹åã«æžããªããç§ãã¡ã®é ã®äžã®æªæ¥ã¯å·ŠåŽã«ããã§ãããã ããã§ããŠãã€äººãšã¢ã©ã人ã®ããã°ã¬ã¹ããŒã¯éã«ãªãã¯ãã§ãã ãããŠãããã¯ããŒã®é²è¡ã ãã§ãªããäžè¬çã«æžãããšã¯ç©ºéã®ç¥èŠã«åœ±é¿ããŸãã
ãããŠãISISãããªãã奎é·å¶ã«é£ããŠè¡ãããããã«ãµã€ããæŒãä»ããããã«åŒ·å¶ããå Žåãã©ããªããŸããïŒ ã¹ã¿ã€ã«ã®2ã€ã®ããŒãžã§ã³ã¯ãµããŒããããŸããã 1ã€ã¯è¥¿æŽã®èŽè¡åãããã1ã€ã¯ã¢ã©ãã®èŽè¡åãã§ãã ãããŠãJordanã®äººïŒåœŒã¯ISISã«ããªãããã§ããç¥ã«æè¬ããŸãïŒã¯ãCSSãå®è¡ãããã©ã°ã€ã³ãäœæããå·Šããå³ãå³ããå·Šã«çœ®ãæããŸã...ãããŠã圌ã¯èªåã§ãã®ãããªãã®ãçæããŸãã ã€ãŸã ãŠã£ãããã£ã¢ã¯éåžžã®å ¥ãå£ã§ããããŠã£ãããã£ã¢ã¯åºå£ã§ãã©ãŒãªã³ã°ãããŠããŸãã ããã¯ç§ã®ãæ°ã«å ¥ãã®ãã©ã°ã€ã³ã§ãSassã§ã¯äžå¯èœãªããšã瀺ããŠããŸãã
ããŠãSass'eã§ã¯å®å šã«äžå¯èœãªãã©ã°ã€ã³ã«ã€ããŠã ãã話ãããŸããã å®éãéåžžã«å€ãã®ããŸããŸãªãã©ã°ã€ã³ããããŸããããããã®ãã©ã°ã€ã³ã¯äŸ¿å©ãªå ŽåããããŸãããèŠãç®ã¯ããŸããããããŸããã githubã«ã¢ã¯ã»ã¹ããŠããã¹ãŠã®ãã©ã°ã€ã³ãèŠãããšãã§ããŸããå€ãã®èå³æ·±ãããšããããããããçš®é¡ã®åæã·ã¥ã¬ãŒãæé©åãèšèªæ¡åŒµãå€ããã©ãŠã¶ãŒã®ãµããŒããå°æ¥ã®ãã©ãŠã¶ãŒã®ãµããŒãããããŸãã
éåžžã«é£ãã質åããããŸãã PostCSSã§ã§ããããšãSassã§ã¯äžå¯èœãªããšã瀺ããŸããã PostCSSã¯ããã«å€ãã®ããšãã§ããŸãã ããã¯ä¿¡ããããªãã»ã©åŒ·åãªããŒã«ã§ãããçåãçããŸãããã匷åãªããŒã«ã¯ããé«éã«ãªããŸããïŒ libsassã¯Cæé©åã§é©ãã¹ãããšããããããéåžžã«é«éã§ãã libsassã®çµæãäžåãããšã¯å¯èœã§ããïŒ ãããŠçãã¯ã€ãšã¹ã§ãã
ããã¯ãã¢ãžã¥ã©ãŒã¢ãŒããã¯ãã£ãéåžžã«ã¯ãŒã«ã§éèŠãªçç±ã®ä»£è¡šçãªäŸã§ãã ã¢ãžã¥ã©ãŒã¢ãŒããã¯ãã£ã¯æé©åãéåžžã«ç°¡åã ããã§ãã å€æ°ã®å°ããªã¢ãžã¥ãŒã«ããããŸãã ãã®ã¢ãžã¥ãŒã«ã®é床ãäœäžããŠããããšãç解ããæé©åããŠãã ããã ãããã£ãŠãPostCSSã¯Javascriptã§èšè¿°ãããŠããŸã-C ++ã§èšè¿°ãããlibsassãã4åé«éã§ãã ããã¯ãããã¯ãšã³ãããä»ããCã§ãã¹ãŠãæžããŸããããé«éã«ãªããŸãããšèšã£ããšãã«åé¡ã«ãªããŸãã
ç¹°ãè¿ããŸãããPostCSSã®å©ç¹ã¯äœã§ããããªãSassãããåªããŠããã®ã§ããïŒ
- PostCSSã¯ã¯ããã«é«éã§ãã ã€ãŸã PostCSSã䜿çšããlibsassã®é床ã«æºè¶³ããŠããå Žåã§ããããã«å€ãã®ããšãã§ããããã«è€éãªæé©åãè¡ãããšãã§ããŸãã ããã¯å€§ããªã¹ããŒã¹ã§ãã
- 2ã€ç®ã¯ã¢ãžã¥ãŒã«æ§ã§ãããããžã§ã¯ããååŸããã³åå²ã§ããŸããããŸããŸãªã¢ã€ãã¢ã䜿çšã§ããŸãã
- ãããŠ3çªç®ã®ããšã¯ãPostCSSãSassãããåªããŠããããšã§ãã Sassã«ããPostCSSã®æ©èœã¯ãã¹ãŠå®è¡ã§ããŸãããSassã§ã¯PostCSSã«ããæ©èœã®ã»ãšãã©ãå®è¡ã§ããŸããã
ããããç§ã¯ããªãã欺ããã ã¬ããŒãã®ã¿ã€ãã«ã¯ãPostCSSã¯Sassã®åŸã®æªæ¥ã ãšè¿°ã¹ãŠããŸãã å®éãããã¯æ¬ç©ã§ãã çŸåšãCan I Useã§æã«50äžãè¶ ããããŠã³ããŒãããããŸãã 倧å¢ã®èŽè¡ã ãããã£ãŠãå¶äœã®ããçŽããæããŠããå Žåã¯ãæããå¿ èŠã¯ãããŸãããPostCSSã§å€§å¢ã®èŠèŽè ã確èªããŸãã PostCSSã¯éåžžã«å€§äŒæ¥ã§äœ¿çšãããŠããŸãã
Paul Irishã¯ãPostCSS Auto Prefixã¯Googleã«ãã£ãŠäœ¿çšãããŠãããšè¿°ã¹ãŸããã obaå®ç¶²ã¯äžåœæ倧ã®ãªã³ã©ã€ã³ã¹ãã¢ã§ãããPostCSSãããŸããŸãªãã©ã°ã€ã³ã䜿çšããã ãã§ãªããããããäœæããŸãã Wordpressã¯2ã€ã®ãã©ã°ã€ã³ã䜿çšããŸãã Rtl css auto-prefixer-ã¢ã©ãã¢èªããŒãžã§ã³çšã ãŸããTwitterã¯PostCSSã䜿çšããŠããã ãã§ãªããããæç¹ã§åãäžããããŠLessãæšãŠãŸããã ãã¹ãããã»ããµã®ã¿ã䜿çšããŸãã ãã®ã¢ãããŒãã®ã¿ã
ããã«ãPostCSSã¯ãã¬ã³ãã«ãªãã€ã€ãããŸãã ããšãã°ãA List Apartã¯ããã¹ãããã»ããµã«é¢ããèå³æ·±ãèšäºãPostCSSãã¹ãããã»ããµãCSSããã»ããµã®ããŒã¯ãµã€ãããç§ãã¡ãæãæ¹æ³ã«ã€ããŠæžããŠããŸãïŒ http://alistapart.com/column/what-will-save-us-from-the-dark-ããªããã»ããµã®ãµã€ã ïŒã
ãŸãã¯ãããšãã°ãç§ãã¡ã®ãã£ã³ãã®è±èµ°è ã§ããããã¶ã€ããŒã®ããã®ãµã¹ãšã³ã³ãã¹ãã®èè ã§ãããã³ã»ãã©ã€ã³ã¯ã圌ãã©ã®ããã«ãµã¹ãšå¥ããPostCSSã«åãæ¿ãããã«ã€ããŠèšäºãæžããŸããïŒ http://benfrain.com/breaking-up-with-sass- postcss ïŒã
ããããæãã¯ãŒã«ãªãã€ãŒãã¯æåŸã®1ã€ãBootsstrapã§ãã 圌ãã¯ãCSSnextã«éåžžã«è§ŠçºãããŠãããBootstrap 5ãPostCSSïŒ https://twitter.com/mdo/status/591364406816079873 ïŒã«èŒãå¯èœæ§ãé«ãã»ã©æ°ã«å ¥ã£ãŠãããšæžããŠããŸã ã ä»ã圌ã¯Lessã«ããŸãããããŠã圌ã¯Sassã«ããŸãããããŠã圌ãã¯SassãæããŠãPostCSSã«åãæ¿ããŸãã
ã€ãŸã ä»é±ã®åž°å® æã«äœãããŠã»ããã§ããïŒ
æåã®ãã€ã³ãïŒèå³æ·±ãCSSåŠçããŒã«ãäœæããå Žåã¯ãPostCSSã®äœ¿çšãæ€èšããŠãã ããã RegCSã¯å±éºã§ãããããPostCSSã¯Regexpãããã¯ããã«åªããŠããŸã-ã³ãŒãã«ãŒããå€æŽãããªã© ãã®ã
2çªç®ã®ãã€ã³ãã¯ãããªããã»ããµã§ãã ããšãã°ãç§ãã¡ã®ãã£ã³ãã®å¥ã®è±èµ°è -ã°ãªããã®éçºè ã倱ãããã°ãªããã®å®è£ ã®ããã®äžçŽç©ãMakeevã¯Webæšæºã®éåžžã«èå³æ·±ãtwitterã§æžãã-圌ã¯ãã¹ãããã»ããµã«åãæ¿ããŸããã圌ã¯ããããšãŠãæ°ã«å ¥ããŸããããªãã§ããïŒ ä»¥åã¯3ã€ã®ããŒãžã§ã³ããµããŒãããå¿ èŠããããŸããã1ã€ã¯ã¹ã¿ã€ã©ã¹çšããã1ã€ã¯ã¬ã¹çšããã1ã€ã¯Sassçšã§ãã ãšãŠãéå±ã§ããã ãããŠã圌ã¯æ°ä»ããŸããïŒãªããããããã®ã§ããïŒ åœŒã¯ãããèªåãã¬ãã£ãã¯ã¹ãšããŠäœ¿çšããŸãã 圌ã¯PostCSSãååŸããSassãŠãŒã¶ãŒãLessãŠãŒã¶ãŒãªã©ã䜿çšã§ããŸãã
ãµã€ããæ§ç¯ããããŒã«ãæ§ç¯ããPostCSSã䜿çšããªãå Žåã¯ãä»ããèªåãã¬ãã£ãã¯ã¹ãè¿œå ããŠãã ããã ããã¯éåžžã«éèŠã§ãããªãã§ããïŒ Googleã¯å¯äžã®ãã¬ãã£ãã¯ã¹ããŒã«ãæšå¥šããŠããããã§ãã ããã¯PostCSSã®ã¿ã§ãããä»ã®ãã¹ãŠã®èŠçŽ ã¯ã¯ããã«æªããå€ãã®çç±ããããŸãã
第äžã®ãã€ã³ãã ããšãã°ãèªåãã¬ãã£ãã¯ã¹ä»ããªã©ã«ãã§ã«PostCSSã䜿çšããŠããå Žåã¯ãä»ã®ãã©ã°ã€ã³ãã芧ãã ããã cssnextããå§ããããšããå§ãããŸããããã¯æ¬åœã«ã¯ãŒã«ã ããã§ããCSS4ã§æžãããšãã§ããããã§ãã å ããŠããã©ã°ã€ã³ã®ãªã¹ããèŠãŠãããã¯æ¥œãããšæãããŸãã
ãããŠ4çªç®ã®ãã€ã³ãã æ°ãããããžã§ã¯ããéå§ããå ŽåãPostCSSãSassã®åŸã«ããŸãæ©èœããå¯èœæ§ããããããããã«Sassãæããããšã¯ãå§ãããŸããã ãªãæšãŠãã®ïŒ æ°ãããããžã§ã¯ããéå§ããå Žåã¯ãããªããã»ããµã§å€æ°ããã¹ããããã³äžçŽç©ãäœæããå¿ èŠãããçç±ãèããŠãã ããã PostCSSã«ãããããããŸããèªåãã£ã¯ãµãŒã䜿çšããå Žåããªããã¡ã€ã«ã2å解æããå¿ èŠãããã®ã§ããïŒ å€æ°ããã¹ããäžçŽç©ãèªåãã¬ãã£ãã¯ã¹ã®åã®PostCSSã«è¿œå ããã ãã§ãã
ITã¯ããã°ã©ãã³ã°ã«é¢ãããã®ã§ã¯ãªããããITã¯ã³ãŒãã«é¢ãããã®ã§ã¯ãããŸããã è¯ãæ¹æ³ã§ãICQã¯é»å ±ã§å®è¡ã§ããããã§ãã ãªãä»ITãç»å Žããã®ã§ããïŒ ç§ãã¡ã¯ä»ãç§ãã¡ãçŽé¢ããŠããåé¡ã解決ã§ããªãæ代ã«ããããã§ãã ç§ãã¡ã解決ãããã¹ãŠã®ã¿ã¹ã¯ã¯ãé ã«åãŸããããè€éã§ãã ãããITã®èãæ¹ã§ãã ITã¯è€éããšã®æŠãã§ãã ãããŠããã£ãšç°¡åãªã®ã¯2ã€ã®ããŒã«ã§ããããããšã1ã€ã®ããŒã«ã§ããïŒ ç§ã«ãšã£ãŠãããã¯1ã€ã§ãã
é£çµ¡å
» ã€ã¹ãã³
ãŽã³ã³ã¿ã¯ã
» éªæªãªè»äºº
ãã®ã¬ããŒãã¯ã ããã³ããšã³ãéçºè FrontendConfã®ã«ã³ãã¡ã¬ã³ã¹ã§è¡ãããæé«ã®ã¹ããŒãã®1ã€ã®è»¢åã§ãã 2017幎ã®æºåã¯ãã§ã«éå§ãããŠãããäŒè°ã®ã¡ãŒãªã³ã°ãªã¹ãã«ç»é²ãããšãæšå¹Žã®ãã¹ãã¬ããŒãã®ãã¡8件ãå±ããŸãã
ä»åŸéå¬ãããHighLoad ++äŒè°ã®æãé£ããã»ã¯ã·ã§ã³ã¯ã ããã³ããšã³ã ããã©ãŒãã³ã¹ã§ãã ããã³ããšã³ãã¯å€§ãããªããŸããããã§ã«ã¢ãŒããã¯ãã£ãã¢ãã«ãããŒã¿ãåããæ¬æ ŒçãªãœãããŠã§ã¢ã§ãïŒä»¥åã®ããã«ãåãªãã€ã³ã¿ãŒãã§ã€ã¹ã§ã¯ãããŸããïŒã ãã®ã»ã¯ã·ã§ã³ã§åŠç¿ããã®ã¯ãã®ã»ã¯ã·ã§ã³ã§ãã
ä»åŸã®ã¬ããŒãã®äžéšã次ã«ç€ºããŸãã
- ç£æ¥çšãŠã§ããµã€ãã®é«éå / Nikolay MatsievskyïŒAir.rfïŒ;
- ããªãã®ããŒããŒã®ç»åã¯ããªããå¿ èŠãšããŸãïŒHTTP2ç»åã®èªã¿èŸŒã¿ã§äžæ¥ãç¯çŽ /ããã¢ã¹ãã«ããŠãïŒã¢ã«ãã€ãã¯ãããžãŒãºïŒ;
- Accelerated Mobile PagesïŒAMPïŒProjectïŒä»åŸã®äºå®ã¯ïŒ / Paul BakausïŒGoogleïŒ;
Angular 2 / Alexey OkhrimenkoïŒIPONWEBïŒã§å¶éé床ãè¶ ããŠããŸãã
ã€ã³ã¹ã¿ã³ãããŒãïŒãªãã©ã€ã³ãã¡ãŒã¹ãããã°ã¬ãã·ãWebã¢ããªã®æ§ç¯ / Alex RussellïŒGoogleïŒ;