ãã®èšäºã¯ KAYAC Advent Calendar 2021 17æ¥ç®ã®èšäºã§ãã
æšæ¥ã¯ã¿ããšããã«ãã Unityãçšããèäœã®é²åã«ã€ã㊠ã§ããã
ãã®èšäºããã£ããèŠçŽãããš
- GitHubã®Issue, Pull Requestã«ã€ããããðãªã¢ã¯ã·ã§ã³ã¯ãç®ã«ãããšããã©ããªãæããã
- ãŠãŒã¶ãŒCSSã§çµµæåãéæ¹é ããŠãèŠãç®ã®ããã©ãã軜æžããŠã¿ã
- éæ¹é ãç°¡åã«è©ŠããChromeæ¡åŒµãäœã£ãŠã¿ãŸãã
ã¯ããã«
ããã«ã¡ã¯ïŒæè¡éšã®çè°·ã§ããTonamelãšããWebãµãŒãã¹ã§ããã³ããšã³ããšã³ãžãã¢ããã£ãŠããŸããNuxt.jsãComposition APIã§æžãã€ã€ãæè¿ã¯æ°èŠæ©èœéçºã«ãããã³ã³ããŒãã³ãã®ããã©ãŒãã³ã¹æ¹åã«åãçµãã§ããŸãããªãªãŒã¹ããããæè¡ããã°ã«ãã®ä»¶ããã²æžããŠã¿ããã§ããã
Tonamelã®æè¡çãªè©±ã«ã€ããŠã¯ãåãããŒã ã®å§«éãããæžãã13æ¥ç®ã®èšäºã詳ããã®ã§ããã²ã芧ãã ããïŒ
ããŠããã®ããã°ãã芧ã«ãªã£ãŠããæ¹ã§ããã°ãGitHubã¯ãåç¥ããšæãããŸããGitHubã§ã¯Issue, Pull Requeståã³ãã®ã³ã¡ã³ãã«ãªã¢ã¯ã·ã§ã³ãã€ããããšãã§ããŸãã
ãã®ãªã¢ã¯ã·ã§ã³ã¯ããžãã£ããªãã®ã倧åã§ãããäŸå€çã«ãã¬ãã£ããªãã¥ã¢ã³ã¹ãå«ããã®ãå«ãŸããŠããŸãã
ãããã®ãªã¢ã¯ã·ã§ã³ã¯å€§èŠæš¡OSSã®Issueã«ãããè°è«ã§ãã°ãã°èŠãããããšãããããšãã«ð(thumbsdown)ã®çµµæåã¯ç²ããŠããæã«èŠããããšããŠãããšãªã£ãŠããŸãããšããããŸãã
æ¬èšäºã§ã¯ããããéæ¹é ããããšã§å¯ŸåŠããŠã¿ãŸãã
CSSã§æ¹é ããŠã¿ã
GitHubã¯Webã¢ããªã±ãŒã·ã§ã³ã§ããããããŠãŒã¶ãŒåŽããCSSãåœãŠãããšãã§ããŸãããŸãã¯CSSãåœãŠã察象ãšãªãèŠçŽ ãç¹å®ããŠã¿ãŸãããïŒ
Developer Toolsã§HTMLãœãŒã¹ãèŠãŠã¿ããšãçµµæåã¯g-emoji
ãšããèŠçŽ *1ã§æç»ãããŠãããthumbsdownã®çµµæåã¯alias
å±æ§ã«thumbs down
ãåœãã£ãŠããããšãããããŸãã
ã€ãã§ã«ãªã¢ã¯ã·ã§ã³éžæéšåãæ¬æäžã®çµµæåãèŠãŠã¿ããšããã¡ãã«ã¯alias
å±æ§ã«"-1"
ãåœãŠãããŠããããã§ãã
ãããã¯CSSã»ã¬ã¯ã¿ã«ãã£ãŠä»¥äžã®ããã«æå®ããããšãã§ããŸãã
g-emoji[alias="thumbs down"], g-emoji[alias="-1"]
Developer Toolsã§å®éã«è©ŠããŠã¿ããšãããŸãæå®ã§ããŠããŸããïŒ
ãããªãéæ¹é ãž
æ¶ãã ãã§ã¯å³æ°ãªãã®ã§ãCSSã¢ãã¡ãŒã·ã§ã³ãçšããŠæ¹é ããŠã¿ãŸããã
StylusãUser CSSãªã©ã§ä»¥äžã®CSSãé©çšããããšã§ããã€ã§ãéæ¹é ãããthumbsdownãèŠãããšãã§ããŸãã
åã
g-emoji[alias="thumbs down"], g-emoji[alias="-1"] { display: inline-block; animation: spin 0.25s cubic-bezier(0, 0.5, 0.5, 1) infinite; } @keyframes spin { 0% { transform: rotate(0deg) scale(0.8); } 50% { transform: rotate(180deg) scale(1.2); } 100% { transform: rotate(360deg) scale(0.8); } }
åã+éãã
g-emoji[alias="thumbs down"], g-emoji[alias="-1"] { display: inline-block; animation: spin-wiggle 0.35s cubic-bezier(0, 0.5, 0.5, 1) infinite; } @keyframes spin-wiggle { 0% { transform: translate(0px, 0px) rotate(0deg) scale(0.8); } 20% { transform: translate(4px, 0px) rotate(72deg); } 40% { transform: translate(0px, -4px) rotate(144deg) scale(1.2); } 60% { transform: translate(-4px, 0px) rotate(216deg); } 80% { transform: translate(0px, 4px) rotate(288deg) scale(0.8); } 100% { transform: translate(0px, 0px) rotate(360deg); } }
äœè«ã§ããããã©ãã©ã®ããŒãã¬ãŒã ãæã€transform
ã®ã¢ãã¡ãŒã·ã§ã³ãããæãã«åæããæ段ãèŠã€ãããããèŠèã®çã§ãã¿æžãããŠããŸããCSSã¢ãã¡ãŒã·ã§ã³ã«è©³ããæ¹ãããã£ããã£ãã解決çã䌺ã£ãŠã¿ããã§ãâŠâŠïŒ
åã+éãã+ã¬ã€ã³ããŒ
g-emoji[alias="thumbs down"], g-emoji[alias="-1"] { display: inline-block; animation: spin-wiggle 0.35s cubic-bezier(0, 0.5, 0.5, 1) infinite, rainbow 1s linear infinite; } /* spin-wiggle ã®keyframesã¯åè¿°ã®ãã®ã䜿ã */ @keyframes rainbow { 0% { filter: hue-rotate(0deg); } 50% { filter: hue-rotate(180deg); } 100% { filter: hue-rotate(360deg); } }
éæ¹é ãç°¡åã«è©ŠããChromeæ¡åŒµãäœã£ãŠã¿ã
ãããã®éæ¹é ãããç°¡åã«é©çšã§ããããã«ããããã¢ããã«ãããšãã§ã¯ãèšå®ç»é¢ãè¿œå ããŠChromeæ¡åŒµãšããŠå ¬éããŠã¿ãŸããïŒ
â»ã€ã³ã¹ããŒã«çŽåŸã¯ãªãã·ã§ã³ãå šãŠãªãã«ãªã£ãŠããããããããã¢ããã®èšå®ç»é¢ããåé ç®ããªã³ã«ããäžã§ãªããŒãããé¡ãããŸã
ãœãŒã¹ã³ãŒããå ¬éããŠãããŸãã
ãããã«
äžçºãã¿ã«ãèŠãããã®éæ¹é ã§ã¯ãããŸãããå®éã«äœ¿ã£ãŠã¿ããšthumbsdownãªã¢ã¯ã·ã§ã³ãžã®ãŠããšããæèŠãã¢ã€ããšããæ°æã¡ã¯è»œæžãããŠãããããªæ°ãããŸãã å®äŸã¯å°ã 掟æã§ã¯ãããŸããããããŸãç®ã«ããããªãç©ã«ã€ããŠã¯ãŠãŒã¶ãŒCSSãChromeæ¡åŒµã«ãã£ãŠè»œæžããããšãã§ããããšããããšãæ¬èšäºã§äŒããããã幞ãã§ãã
æåŸãŸã§ãèªã¿ããã ããããããšãããããŸããïŒ
è¿œèš
å è¡äºäŸããªãã調æ»ãããšããã2019幎ã®æç¹ã§åãã³ã³ã»ãããå®çŸãããŠããæ¹ãããã£ããããŸãããåœèšäºã§èšåããããŠãããšããæèŠãããªãæ·±ãèšèªåãããŠããã®ã§ããã¡ããæ¯éåç §ãã ããïŒ
*1:GitHubã«ãã£ãŠéçºããããçµµæåã®ãã©ãŒã«ããã¯ã«å¯Ÿå¿ããOSSã®ããã§ãã https://github.com/github/g-emoji-element