2013/3/25 http://atnd.org/events/37175 ã®è³æã§ããRead less
2013/3/25 http://atnd.org/events/37175 ã®è³æã§ããRead less
SassãLessãStylusãªã©CSS Preprocessorã«é¢ããAdvent Calendarã§ããâ CSS Preprocessor Advent Calendar 2012 - Adventar ããã©ã¼ãã³ã¹ã®åå¼·ãã§ãã¦ãªããã¤Sass/Compassã®ãåå¼·ã«ããªããå¾ãªã·ãªã¼ãºã¾ããã®2åç®ãAdventã«ã¶ã¤ãã¦ããï¼ãããããã¨ã·ãªã¼ãºãã®ã®2ä½ç®ã¨ããã®ã¯é§ä½ã«ãªããã¡ã ãããããªãã¬ãã·ã£ã¼ã¯ãã®ãã¦ä¹±åå°ï¼ãã£ã¦ããYO! ããã¾ã§ã®ï¼ ããã©ã¼ãã³ã¹ããã¿ãSass/Compass 第1åï¼Nestingã¨@import - MOL ããã©ã¼ãã³ã¹ããã¿ãSass/Compass çªå¤ç·¨ï¼MSã¯éãã£ã - MOL CSS Spriteã®å©ç¹ã»æ¬ ç¹ ããã¤ããã©ã¼ãã³ã¹Webãµã¤ããã®æ¸ç±ã«ã¯ãé«éãµã¤ããå®ç¾ãã14ã®ã«ã¼ã«ãã¨ãããã®ãããããã®ä¸
çãããSass/Compass使ã£ã¦ã¾ããï¼ åã¯CSS Spriteãé¢åã ã£ãã®ã§ä½¿ãå§ãã¾ããã ã§ãCompassã®ããã¥ã¡ã³ããè¦ã¦ããããããè¨è¿°ãçºè¦ãã¾ããã Compass generates PNG files using a pure-ruby library called chunky_png. This library can be made faster by installing a simple C extension called oily_png. Add it to your Gemfile if you have one in your project: http://compass-style.org/help/tutorials/spriting/ ãã£ããè¨ãã¨ãããã©ã«ãã§PNGãã¡ã¤ã«ä½æããã¨ãã¯Ruby製㮠chunky_png 使ã
Compassã§CSSã¹ãã©ã¤ã Sassã®æ¡å¼µæ©è½ã§ããCompassãå©ç¨ããã¨CSS Spriteãç°¡åã«å©ç¨ã§ããã®ã§ããæ¹ãã¡ã¢æ¸ãã¬ãã«ã§æ¸ãã¦ããã¾ã(SassãCompassã詳ãããªãã®ã§ããããã¨ããã¯ããã³ããå ¥ãã¦ãã ãã)ã ã¾ãã¯Compassã§ç£è¦ãã¦ããç»è±¡ãã£ã¬ã¯ããªå (config.rbã®images_dirã§è¨å®ãã¦ãããã£ã¬ã¯ããª)ã«ä»»æã®ãã£ã¬ã¯ããªãä½æãã¦ã CSSã¹ãã©ã¤ãã§å©ç¨ããå ç»åãå ¥ãã¦ããã¾ãã ä»åã¯ç»è±¡ãã£ã¬ã¯ããªã¯ãimgãCSSã¹ãã©ã¤ãç¨ã®ãã£ã¬ã¯ããªã¯ãspriteãã¨ããå ç»åã¯ä»¥ä¸ã®ç»è±¡ã§ãã a.png b.png c.png 次ã«scsså ã§@importã§CSSã¹ãã©ã¤ãç¨ã®ãã£ã¬ã¯ããªã¨ãã¡ã¤ã«ãæå®ãã¾ãã @import "sprite/*.png"; ãããã³ã³ãã¤ã«ããã¨imgãã£ã¬ã¯ããªã«ãspr
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}