InfoQ Software Architects' Newsletter A monthly overview of things you need to know as an architect or aspiring architect. View an example
社å ã§æ°ãããã¡ã¤ã³ãè¨ç«ããã«ããããCSS Modules, PostCSS, cssnextã試ãã¦ã¿ã¾ããã ãã®ã¹ã©ã¤ãã¯ããã®éã®èª¬æã«ä½¿ã£ããã®ã§ãããã£ãããªã®ã§å ¬éãã¾ãã ããããã¿ã¤ãä½æã§è©¦ãã¦ã¿ããã©ãã¿ãªããã©ãæãã¾ããï¼ããããã®æ¸©åº¦æãæ¬çªæ¡ç¨ã確å®ããããã§ã¯ããã¾ãããä½ããå½¹ã«ç«ã¤ãã¨ãã¢ã¬ã°å¹¸ãã§ãã 以å¾ã説æã«ä½¿ã£ãã¹ã©ã¤ãã ãããªãã 1. ã³ã³ãã¼ãã³ãæ代ã®ã¹ã¿ã¤ãªã³ã° 2. ã°ãã¼ãã«CSSãBEMãããã¦ãã¼ã«ã«CSS 3. CSS Modulesãããã¦JSXã¸ã®å²ãæ¯ã 4. cssnextã¨ããã®æ¸ãæ¹ 5. æã ã®PostCSSã¹ã¿ã³ãã¼ã æ°ãã¡ã¤ã³ã® CSSç°å¢ï¼æ¡ï¼ CSS Modules css next PostCSS on webpack ä½ãå¤ããã®ã æã ã®ä»ã¾ã§ã®ã¹ã¿ã¤ãªã³ã° sassã§æ¸ã ã¹ã¿ã¤ã«ã®ã¢ã¸
Incrementsã« bucaranãã¨ã¸ã§ã¼ã¸ã¨ã morishitterãJoinãã¾ãã++ ã¸ã§ã¼ã¸ã¯TokyoJSã®ãªã¼ã¬ãã¤ã¶ã¼ãåããããNode.js製ã®ã¿ã¹ã¯èªååãã¼ã«Flyãfishã·ã§ã«ã®ãã©ã°ã¤ã³ããã¼ã¸ã£ã¼Fishermanãå¶ä½ããããªã©ããããããã¼ã¨ãã¦ç²¾åçã«æ´»åãã¦ãã¾ãã morishitterã¯CSSã®ã³ã¼ããã©ã¼ããã¿ã¼ã§ããStylefmtã®ä½è ã§ãããWEB+DB PRESSã§ã¢ãã³CSSç¹éãå·çãããªã©ãCSSã«å¼·ãã¨ã³ã¸ãã¢ã§ãã ã¸ã§ã¼ã¸ãmorishitterã¨ä¸ç·ã«ãIncrementsã®éçºãããã«å éããã¦ããã¾ãï¼ ä»å¾ã®Incrementsã®é²åãã楽ãã¿ã«++ Incrementsã§ã¯å¼ãç¶ãéçºã¡ã³ãã¼ãåéãã¦ãã¾ãã Application EngineerNLP & Search EngineerProduct
ä»ãèªåãã©ããã£ã¦CSSãæ¸ãã¦ããã®ãã«ã¤ãã¦ã¾ã¨ããã CSSãæ¸ãåã«ããã㨠æè«ã ããããã¶ã¤ã³ã®æå³ãæ£ç¢ºã«ç解ããä¸ã§æ¸ãããCSSã¯ç ´ç¶»ããªããã¨æã£ã¦ããã ããããèªåã²ã¨ãã§ãµã¼ãã¹ãä½ãã¨ããããªããã¶ã¤ã³ã®æ±ºå®æ¨©ãæã¤äººã¨UIå®è£ è ãåãã§ããå ´åãé¤ãã¦ããã¶ã¤ã³ã®æå³ãæ£ç¢ºã«ä¼ããç解ãããã¨ã¯é£ããã åã1çªæéã使ãã®ããã®å·¥ç¨ã ã ä»ã®ä»äºã§ã¯ãã¶ã¤ãã¼ãSketchãã¡ã¤ã«ãä½æããã¨ã³ã¸ãã¢ããããå ã«å®è£ ããã Sketchãã¡ã¤ã«ãéããã¢ã¼ããã¼ããã²ãããçºããã¶ã¤ã³ã®çç¾ããªããã確èªããããªããã®ãããªãã¶ã¤ã³ãªã®ããã質åãã¾ããã ããã§è¯ã質åã¨ææ¡ãããããã«ããã¨ã³ã¸ãã¢å´ã«æä½éã®ãã¶ã¤ã³ã«å¯¾ããç¥èãå¿ è¦ã ã¨æãã æè¿èªãã æ¬ã ã¨ããã¿ããªã§ã¯ããããã¶ã¤ã³æ¹è©âç®çéæã®ããã®ã³ã©ãã¬ã¼ã·ã§ã³&ã³ãã¥ãã±ã¼ã·ã§ã³æ¹å
ãã®ãµã¤ãã§ã¯ãã¦ã§ããµã¤ãã®ã¬ã¤ã¢ã¦ãã«é¢ããCSSã®åºç¤ãå¦ã¶ãã¨ãã§ããã CSSã®ã»ã¬ã¯ã¿/ããããã£/å¤ã«ã¤ãã¦ãããç¨åº¦ã®ç¥èãããäºãåæã¨ãã¦æ¸ããã¦ãããã¨ããã§ããã®ãµã¤ããè¦ã¦ãã人ã®ä¸ã«ã¯ãæ¢ã«å°ãªãããã¬ã¤ã¢ã¦ãã®ç¥èããã人ãããã ããããããªåã§ããä½ãæ°ããçºè¦ããããããããªããHTMLãCSSã«ã¤ãã¦åç´ã¬ãã«ããå¦ã³ããåã¯ããã¥ã¼ããªã¢ã«ãåèã«ãªããããã§ãªããã°ã次ã«åãããã¸ã§ã¯ãã«æºããã¨ãããã®èç«ã¡ãå°ãã§ãæã ã軽æ¸ã§ãããã©ããããã®ãµã¤ããè¦ã¦ã»ããã
大è¦æ¨¡ãªããã¸ã§ã¯ããé·æã«æ¸¡ãããã¸ã§ã¯ããè¤æ°ã®ã¡ã³ãã¼ãé¢ããããã¸ã§ã¯ããããã¦ææ¥ã®èªåãä¸å¹´å¾ã®èªåãè¦ã¦ãåãããã¡ã³ããã³ã¹æ§ã«åªããä¸è²«æ§ã®ããCSSãæ¸ãã®ã«å½¹ç«ã¤ã¬ã¤ãã©ã¤ã³ãã¹ã¿ã¤ã«ã¬ã¤ããç´¹ä»ãã¾ãã
ããã³ãã¨ã³ãå¨ãã®æè¡ã¯é©ç°çãªã¹ãã¼ãã§é²åããã¾ãå¤æ§åãã¦ãã¾ããããããå ¨ã¦ãã¹ã¿ã¼ããã®ã¯éæ¹ããªã大å¤ãªã®ã§ããããã§ã¯ã社å ã®ã¨ã³ã¸ãã¢ã»ãã¶ã¤ãããæä½éããã ãã¯ãããã¦ããããã¨ããã¹ã¿ã³ãã¼ããææ¸åãããã¨ã«ãããã¾ããã社å åããæ³å®ããææ¸ã§ã¯ããã¾ããã社å ã®ã¿ã«çããå¤ãã®æ¹ã«å½¹ç«ã¦ããã¨èããããå ¬éãã¾ãã ã¹ã¿ã¤ã«ã·ã¼ãã®å¤¢ (1) äºæ¸¬ãããã (2) åå©ç¨ãããã (3) ä¿å®ãããã (4) æ¡å¼µãããã 代表ç㪠CSS è¨è¨ææ³ æ¢åããã¸ã§ã¯ãã® CSS ã«ç«ã¡åããï¼ (0) æµã (1) æ¢åã® CSS ãã¡ã¤ã«ãå ã« SCSS ãã¡ã¤ã«ã«å¤æãã (2) ã¤ãã·ã£ã©ã¤ãº CSS ãå ±éã®ç®æã®ã¹ã¿ã¤ã«ãåé¢ãã (3) CSSLint ã使ã£ã¦ãä¿®æ£ããããã¨ããããæ´çãã¦ãã (4) ã³ã³ãã¤ã« (5) ã¹ã¿ã¤ã«ã®ã¹ã³ã¼ãï¼ã
React.jsã®éçºè ã§ããvjeuxããReact:CSS in JSãã¨ããã¿ã¤ãã«ã§Talkããã¦ãã¦ããã®å 容ããªããªãèå³æ·±ããã®ã§React.jsã«ãé¢ä¿ãããã®ãªã®ã§ç´¹ä»ãã¦ããããã¨æãã¾ãã ã¾ãããã®ã¢ããã¼ãã«ã¤ãã¦ã¯åããReact.jsã®éçºè ã§ããzpaoã«ãããReact Through the Agesãã¨ããTalkã§ãè¨åããã¦ãã¾ãã CSSãã¹ã±ã¼ã«ãããæã«åé¡ã«ãªãç¹ Global Namespace Dependencies Dead Code Elimination Minification Sharing Constantsn Non-deterministic Resolution Isolation ããã§ããã¹ã±ã¼ã«ãããã¨ããã®ã¯ãFacebookãããã®è¦æ¨¡ã®ãã¨ã ã¨æãã¾ãã Global Namespace ãã®ã¾ã¾ã§ããã
BEMã使ã£ãå½åãã¨ã¦ãæå¿«ã§ããã®ã¨ããHTMLãCSSãæ¸ãã®ã«ãã使ã£ã¦ãããCSSã®ã¯ã©ã¹åã¨ãã¦æ¸ãå ´åã¯ãBEMãCSSç¨ã«ä½¿ããããããMindBEMdingã¨ããæ¸ãæ¹ãæ¡ç¨ãã¦ãããæåã«ãããç¥ã£ãã¨ãã¯ããããªæ±ãè¨è¿°ã®ä»æ¹ã¯ä½¿ããããªããã¨æã£ã¦ããã ãã©ããã£ããæ £ãã¦ãä»ã§ã¯ãã®æå¿«ãã«ã¡ãã£ã¨å¿é ãããã¦ããã»ã©ã BEMã®æ¹æ³è«ã¨MindBEMdingã®ã«ã¼ã«ã«ã¤ãã¦ã¯ããããã®ææ¸ãèªãã§ãããã¨ãã¦ãããããã²ã£ãããã¦å¤§éæã«èª¬æããã¨ãBEMã¨ã¯BlockãElementãModifierã®é æåãåã£ããã®ã§ãæ§æããè¦ç´ ããã®ã©ããã«å½ã¦ã¯ãã¦å½åãã¦ããæ¹æ³ãã©ã®å ´åã§ãå¿ ãBlockãããã¯ãã®Modifierãã«ã¼ãã«ããããã®ä¸ã«ãæå±ããElementãããã¯ãã®Modifierãå«ã¾ããæ§æã«ãªãã Block - æ§æã®ã«ã¼ãã¨ãª
ç§ã¯ããæè¿ãããããã·ã³ã°ã«ãã¼ã¸Webã¢ããªã±ã¼ã·ã§ã³ã®ããã©ã¼ãã³ã¹ã®æé©åã«åãçµãã§ãã¾ãããã®ã¢ããªã±ã¼ã·ã§ã³ã¯é常ã«åçãã¤ã¤ã³ã¿ã©ã¯ãã£ãã§ãæ°ããCSS3ã®å©ç¹ãè©°ãè¾¼ã¾ãããã®ã§ããåã«è§ä¸¸ãã°ã©ãã¼ã·ã§ã³ã®å¹æã«ã¨ã©ã¾ãããå½±ãã°ã©ãã¼ã·ã§ã³ãè¦ç´ ã®å¤å½¢ããµãã ãã«ä½¿ããã¦ãããå ãã¦transitionå¹æï¼æéçå¤åï¼ãå¤å½©ãªåéæè²ãçä¼¼è¦ç´ ããã¼ã¹ã«ããCSSã®å·§å¦ãªããªãã¯ãããã«å®é¨çãªCSSã®ç¹å¾´ãã¡ãã°ãããã¦ãã¾ãã åæããéã«ã¯ãJavascript/DOMå´ã®ããã«ããã¯ã ãã§ã¯ãªããCSSã®é åã«ãè¸ã¿è¾¼ãã§ã¿ã¾ãããä¸ã«æãããã°ãããUIã®è¦ç´ ããããã©ã¼ãã³ã¹ã«ã©ã®ãããªå½±é¿ãåã¼ãã¦ããããè¦ããã£ãããã§ãããã®ã¢ããªã±ã¼ã·ã§ã³ã®ãã¼ã¹ã«ããJavascriptã®ãã¸ãã¯ã¯ä»¥åï¼è¡¨é¢çãªè£ 飾ã®ãªããã¼ã¸ã§ã³ï¼ãããã»ã©å¤ãã£ã¦ã¯ãã¾
ãã©ã¦ã¶ã¹ã¿ã¤ã«ã¯å¹³å¦åãã¦ãã ãªã»ããCSSã¯ãªããã¢ã¦ãå¯è½ã«ãã¦ãã ç»å ´é »åº¦ã®é«ãçµåãã¯placeholderã¨ãã¦ç»é²ãã¦ããå©ç¨ãã å¯è½ãªéãç»åã¯ã¹ãã©ã¤ãçæãã¦ããå©ç¨ãã ãã以ä¸å解ä¸å¯è½ãªã³ã³ãã¼ãã³ãã¯è¦ç´ ã®ããã«æ±ã ã³ã³ãã¼ãã³ãã¯èªå·±å®çµåã®ãã®ã使ã BEMã¯DRYã«ãªãããç²åº¦ãä¸ãã å¯è½ãªéã@extendã¯å©ç¨ããªã ã¬ã¹ãã³ã·ãã§ãªãå ´æã§ã¯ãUtilitiesã¯ã©ã¹ãæ´»ç¨ãã shame.cssã¯ãã¤ã綺éºã«ãã¦ãã 詳細度ã¾ãã¯ç¹ç°æ§ã®é«ããã®ã»ã©å¾æ¹ã«è¨è¿°ãã å¯è½ãªéã!importantããªã å¯è½ãªéãããã¯ããªã å¤æ°ããã¶ã¤ã³ã¬ã¤ãã¨ãã¦æ´»ç¨ãã CSSãã¡ã¤ã«ãåå²ããã¡ãªããã¯ã»ã¨ãã©ãªãã®ã§ä¸ã¤ã«ã¾ã¨ãã 1. ãã©ã¦ã¶ã¹ã¿ã¤ã«ã¯å¹³å¦åãã¦ãã ä¾ãã°ãããããScrap & Buildã¯åã«éä¿¡éã®ã ãã
æ¬è¨äºã¯2015å¹´1æã«éå¬ãããHTML5 Conferenceã§ã話ããã¦ããã ããã ãBeyond CSS Architectureãã¨ããCSSè¨è¨ã®ã»ãã·ã§ã³ããã©ãã¼ã¢ããããè¨äºã§ãã æ¬è¨äºã§ã¯ããã®ã»ãã·ã§ã³ã®æ¦è¦ã¨è£è¶³ãã¾ãã»ãã·ã§ã³ä¸ã«èª¬æã§ããªãã£ãç¹ãªã©ã«ã¤ãã¦æ¸ãã¦ããã¾ãã â»å½æ¥ã®ã»ãã·ã§ã³ã®åç»ã»ã¹ã©ã¤ããå ¬éããã¦ããã®ã§ãææ«ããã覧ãã ããã CSSã®é£ããã¨ãæ¨ä»ã®CSSè¨è¨äºæ ãã®è¿å¹´ãCSSã«ãããè¨è¨è«ã¨ããã®ã話é¡ã«åºã¦ããããã«ãªãã¾ãããçè ãæèãWebå¶ä½è ã®ããã®CSSè¨è¨ã®æç§æ¸ããæ¸ããããåå°ã§CSSè¨è¨ããã¼ãã¨ããè¬æ¼ãããæ©ä¼ãå¤ãããã¾ããã CSSã®é£ããã¨ããã®ã¯ãç³æ¬æ°ã«ããCSSã³ã¼ãã®è©ä¾¡ã«ã¤ãã¦ã®è¨äºã«ãæ¸ããã¦ããã®ã§ãããCSSã¯è¯ããæªããå³æ ¼ãªã³ã¼ãè¦ç´ã¯å°ãªãããã 宣è¨çã«æ¸ãã°ããã ãã§ã
(編注ï¼2020/08/18ãããã ãããã£ã¼ãããã¯ããã¨ã«è¨äºãä¿®æ£ãããã¾ããã) ç§ãã¯ã©ã¤ã¢ã³ãããããåãã質åã« ã@mixinã¨@extendãããããã©ã®ãããªæã«ä½¿ãã¹ãï¼ã ã¨ãããã®ãããã¾ãã âå¼æ°ã使ããªã@mixinã¯æªã§ããâã ããã¯ä»¥åããããçµé¨åã§ããåãã³ã¼ãã2ã¤ã®ã¤ã³ã¹ã¿ã³ã¹ã§éè¤ãããã ãã®@mixinã¯ä¸å¿«ã§ããããã¾ãããããã@extendã使ãã¹ãæã@mixinã使ãã¹ãæãããããè¦æ¥µãããã¨ã«ã¯ãã£ã¨æ·±ãæå³ãããã®ã§ãã ããã§ã¯è©³ããèå¯ãã¦ãããã¨ã«ãã¾ãããã ç§ã¯æ®æ®µã@extendã¯æ±ºãã¦ä½¿ããªãããã«ã¨ã¢ããã¤ã¹ãã¦ãã¾ãã@extendã«ã¯ãä¸è¦ããã¨ããé åçãªç¹å¾´ãããããããã®ã§ããã注æããªããã°ãããªãç¹ã¯ãã以ä¸ã«ããã¾ããè¨ã£ã¦ãã¾ãã° è¦ããåã ã ã¨ãããã¨ã§ãã ããã§ã@extendã使ã
ãStyleStatsããæ´»ç¨ãã¦CSSãè©ä¾¡ãããEvaluating CSSâFrontrend Conference ç³æ¬ å å¸ï¼Kaizen Platform, Inc...ï¼ æ¬è¨äºã¯ã2015å¹´2æ21æ¥ã«è¡ãããFrontrend Conferenceã®ãEvaluating CSSãã®å 容ãç´¹ä»ãã¾ãã ã¯ããã« ããã«ã¡ã¯ã@t32kã§ããä»æ¥ã¯Evaluating CSSã¨ããã¿ã¤ãã«ã§CSSã®è§£æãã¼ã«ãStyleStatsã«é¢ãã¦èª¬æãããã¨æãã¾ããã¡ãªã¿ã«Evaluateã¨ããã®ã¯ãè©ä¾¡ããã価å¤ãè¦æ¥µãããã¨ãã£ãæå³ã®åèªã§ãã 宣ä¼ã§ãããä»å¹´ããFrontend Weeklyã¨ããç¡æã®ã¡ã¼ã«ãã¬ã¸ã³ã¨ããããæµ·å¤ã®å½¹ç«ã¤ãªã½ã¼ã¹ãç´¹ä»ããã¦ã£ã¼ã¯ãªã¼ã¡ã¼ã«ããã£ã¦ã¾ãã®ã§ããã¡ããç»é²ããã ããã¨å¤§å¤ç§å¬ããã§ãã ãªãCSSã¯ãããªã«é£ããã®ãï¼ ã§
Share on Twitter Share on Google Share on Facebook Share on Weibo Share on Instapaper ScalaCSS ScalaCSS aims to bring type-safety and clarity to creating CSS using CSS maintaining CSS correctness of CSS You can create standalone CSS like SCSS/LESS, or you can create inline styles to be applied to directly without the need to manually manage class names. Being 100% Scala, you benefit from all the n
ç解ãã¦ãããããCSSã«ããã¤ã³ã©ã¤ã³ã¬ã¤ã¢ã¦ãã®ä»çµã¿ï¼font-sizeï¼line-heightç·¨ï¼Inline LayoutâFrontrend Conference é«æ´¥æ¸å£®ï¼æ ªå¼ä¼ç¤¾ãã¯ã»ã«ã°ãªããï¼ ãã®è¨äºã¯ãFrontrend Conferenceã®ã»ãã·ã§ã³ãInline layoutãã§ã話ããã¦ããã ããå 容ãåºã«ãé£è¼è¨äºï¼å ¨4åï¼ã¨ãã¦æ¸ãèµ·ããããã®ã§ããä»åã¯ç¬¬ï¼åç®ã§ãã ã¯ããã« Frontrend Conferenceã§ã¯ãçãããæ°ããæè¡ã«ã¤ãã¦è©±ãã¦ããä¸ãç§ããã¯CSS2.1ã®ã話ãããã¦ããã ãã¾ãããç§ã解説ããã®ã¯ãCSSãæ¸ãä¸ã§æ¬ ãããªãã以ä¸ã®4ã¤ã«ã¤ãã¦ã§ãã font-size line-height vertical-align inline-block ãã¬ã³ãã¨ã¯ã»ã©é ãå 容ã§ã¯ããã¾ãããå¤ãã®äººã«ã¨ã£ã¦ããªãã¨ãªãæè¦
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}