RailsDM 2019 https://railsdm.github.io/#session-upinetree ãµãããã http://upinetree.hatenablog.com/entry/2019/03/27/233842 English version https://speakerdeck.com/upinetree/how-to-deal-with-technical-debt-of-css
17 January, 2018 Finding Dead CSS Written by Harry Roberts on CSS Wizardry. During a performance workshop I was running this week, I was reminded of a technique for finding dead CSS on a live site. Note that Iâm purposely not using the phrase âunused CSSâ, but âdead CSSââthe specific scenario Iâm describing looks a little like this: Imagine you have a large, long-running project that contains hund
CSS in JSã«å¤¢ãè¦ããããªããªãä¸çç¸ã§ã¯è¡ããªãã£ãã®ã§1ãwebpackã«ãããCSSã¨æ¬æ°ã§åãåã£ã¦ã¿ãã ãããã¾ã ç解ãçãã¨ããããã£ãã®ã§loader, pluginã¾ããã®é¢ä¿æ§ãæ´çããã ï¼åç½®ãï¼webpackã®åºç¤æ å ± cssé¢é£ã®æ¬é¡ã«ã¯ããåã«ãwebpackã®åºç¤ãå確èªããã Webpackã®ç¹å¾´ webpackã®ç¹å¾´çãªäºé ã¨ãã¦ãCSSãç»åãªã©ãjavascriptã§ãªããã¼ã¿ãåºæ¬çã«å ¨ã¦ãjavascriptã§æ±ã£ã¦ãã¾ããã¨ããäºãæããããã åçã®å¯¾æã¨ãã¦æããããbrowserifyãrollupã¯ãããã¾ã§ããjavascriptã®module解決ãã«ãã©ã¼ã«ã¹ãã¦ããã®ã«å¯¾ãã¦ãwebpackã¯å ¨ãéãæ¹åãåãã¦ãã loaderã¨pluginã®éã çµæ§ãããµãã«æ±ã£ã¦ããããä¸è¨ã®webpackã®åºæ¬é¨åãæ確ã«ãã¦è
CSSã¬ã¤ã¢ã¦ã[TIPS] position : absoluteã«ã¤ã㦠ãposition : absoluteãã¯positionããããã£ã®ãªãã®ï¼ã¤ã§ãããã¯ã¹è¦ç´ ã絶対çãªä½ç½®ã§é ç½®ããã position:absoluteã§æå®ãããããã¯ã¹ã¯ãä»ã®è¦ç´ ã¨ã®é¢ä¿ã¯åãé¢ããå¥ç©ã«ãªãã親ããã¯ã¹ä»¥å¤ã®ä»ã®ããã¯ã¹è¦ç´ ããå½±é¿ãä¸ååããªãã position:absoluteã«ã¯å¿ ãã親ãããããããã大äºã 親ã«ãããããã¯ã¹ã«ãpositionï¼staticã以å¤ã®positionæå®ããï¼ããã¦ãã¯relativeã§OKï¼ããã®ãªãã«åãå ¥ãã¦position:absoluteæå®ãããããtopããbottomããleftããrightãã®å¤ã¯ã親ããã¯ã¹ããã®è·é¢ã 親ããã¯ã¹ãæå®ããªããã°ããã©ã¦ã¶ã¦ã£ã³ãã¦ãã親ã«ãªãã çµè«ããè¨ãã¨ã親ããã¯ã¹ãããã©ã¦
margin ã®å¤ã«ã¯ autoï¼èªåï¼ãæå®ãããã¨ãã§ãã¾ãã ãã¼ã¸ã³ã¨ããã£ã³ã°ã®æå®ã«ã¤ãã¦ã¯ã以ä¸ã®ãã¼ã¸ãã覧ãã ããã ããã¯ã¹ã®ãã¼ã¸ã³ï¼å¤å´ã®ä½ç½ï¼ãæå®ãã ããã¯ã¹ã®ããã£ã³ã°ï¼å å´ã®ä½ç½ï¼ãæå®ãã ããã©ã«ãã®ä½ç½ãåãé¤ãæ¹æ³ ä¸è¬çãªãã©ã¦ã¶ã§ã¯ããªã¹ãã®å¨å²ã«é©åº¦ãªä½ç½ãè¨å®ããã¦ãã¾ãã ãã®ä½ç½ãåãé¤ãããå ´åã¯ãulè¦ç´ ï¼ã¾ãã¯olè¦ç´ ï¼ã«å¯¾ãã¦æ¬¡ã®ã¹ã¿ã¤ã«ãè¨å®ãã¾ãã ul { margin: 0 0 0 1em; padding: 0; } å·¦ãã¼ã¸ã³ã¯ãå°ãªãã¨ããªã¹ããã¼ã«ã¼1ã¤å以ä¸ã®å¤§ãããå¿ è¦ã§ããï¼ä»¥ä¸ã¯1ã¤ã®ç®å®ã§ãï¼ ulè¦ç´ ã«è¨å®ããå ´å ⦠1em ç¨åº¦ olè¦ç´ ã«è¨å®ããå ´å ⦠1.5em ï½ 2em ç¨åº¦ ãã¼ã¸ã³ã¨ããã£ã³ã°ã 0 ã«ãã¦ãå·¦ãã¼ã¸ã³ã«ã ãä¸è¨ã®å¤ãè¨å®ãããã¨ãã£ãæãã«ãªãã¾ãã ä½ç½ã®æ¯è¼ u
å¶ä½æã«æ¬ ãããªããªã»ããç¨ã®CSSããã¼ã¸ã®ã°ãªãããã¬ã¤ã¢ã¦ãã»ã³ã³ãã¼ãã³ããç¨æããããã¬ã¼ã ã¯ã¼ã¯ãã¯ãªãã¯ã»ã¿ãããããã¼ãã¹ã¯ãã¼ã«ã楽ãã¾ããã¢ãã¡ã¼ã·ã§ã³ãã¢ãã¤ã«ã«ããã¬ã³ããªã¼ãªCSSã§ã¤ããããã¢ã¤ã³ã³ãªã©ãã¼ãããç¨æããã®ã¯ããªã大å¤ãªCSSã®ä¾¿å©ãªãã¬ã¼ã ã¯ã¼ã¯ãç´¹ä»ãã¾ãã ãªã»ããç¨ã®CSSã¯ãã®3ç¨®é¡ ã¬ã¹ãã³ã·ã対å¿ã®å®çªãã¬ã¼ã ã¯ã¼ã¯ Material Designã«å¯¾å¿ãããã¬ã¼ã ã¯ã¼ã¯ ãã¾ãã¾ãªã¢ãã¡ã¼ã·ã§ã³ãç°¡åã«å®è£ ã§ããCSS ããããã¢ãã¡ã¼ã·ã§ã³ã使ã£ããã¼ã㼠使ããããã¢ã¤ã³ã³ãã©ã³ãã»Pure CSSã®ã¢ã¤ã³ã³ ãªã»ããç¨ã®CSSã¯ãã®3ç¨®é¡ HTMLã®åè¦ç´ ã®ãã©ã¦ã¶ãã¨ã«ç°ãªãå·®ç°ããªãããæå³ããéãã«å®è£ ã§ããããã¹ã¿ã¤ã«ããªã»ããããã¹ã¿ã¤ã«ã·ã¼ãã Reset CSS 2.0 HTMLã®åè¦ç´ ã®marginãpadd
ãã©ã¦ã¶ã®ã¹ã¿ã¤ã«ãåæåããCSSãªã»ããã®2012å¹´ã«äººæ°ã®ãã£ããã®ã¨ãã©ã®CSSãªã»ããã使ãã°ããã®ãå¤æãããã¤ã³ããCSSãªã»ãããä¸æã«ä½¿ããã¤ã³ããç´¹ä»ãã¾ãã CSS Reset ä¸è¨ã¯åãã¤ã³ããæ訳ãããã®ã§ãã 2012年人æ°ã®ãã£ãCSSãªã»ãã ã©ã®CSSãªã»ããã使ãã¹ããå¤æãããã¤ã³ã CSSãªã»ãããä¸æã«ä½¿ããã¤ã³ã 2012年人æ°ã®ãã£ãCSS Reset ã¾ãã¯ã2012å¹´ã«äººæ°ã®ãã£ãCSSãªã»ãã ãã¹ã5ï¼ CSS Resetçµç±ã§æããã¦ã³ãã¼ãããããã®ã§ãã Eric Meyer's "Reset CSS" 2.0 ã³ã¼ãã¨ããã¥ã¡ã³ã HTML5 Doctor CSS Reset ã³ã¼ãã¨ããã¥ã¡ã³ã Yahoo! (YUI 3) Reset CSS ã³ã¼ãã¨ããã¥ã¡ã³ã Universal Selector '*' Reset ã³
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}