Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Glue
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jorge Bastida
June 05, 2012
Technology
790
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Glue
Glue is a simple command line tool to generate CSS sprites.
Jorge Bastida
June 05, 2012
More Decks by Jorge Bastida
See All by Jorge Bastida
Streetlife Analytics
jorgebastida
1
300
Some non-obvious tips… Scaling Up
jorgebastida
1
310
La historia de todo lo que pudo salir mal... pero salió bien
jorgebastida
8
1k
Open Source Modern Web Development
jorgebastida
26
2.6k
Python + Django
jorgebastida
19
2.6k
Things that make me happy
jorgebastida
13
1.3k
Dajaxproject.com
jorgebastida
1
180
Other Decks in Technology
See All in Technology
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
インバスケット試験対策アプリを 作って見えたAIエージェント構築 ナレッジ2選
shichijoyuhi
1
130
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
810
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
4
1.1k
メルペイ 会計システム概要と歴史
mewuto
0
180
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
190
継続的なAIコスト最適化
bgpat
1
160
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
860
[2026-09-30]ロックンロールは鳴り止まないっ - 信頼性かまってちゃん - 「データ駆動を投げ捨ててまで。」追いかける信頼性改善に向けた取り組みの話
tosite
0
210
今こそ知りたいAmplifyGen2
mkdev10
2
150
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
340
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
400
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Abbi's Birthday
coloredviolet
4
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Odyssey Design
rkendrick25
PRO
2
860
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
390
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
460
The SEO Collaboration Effect
kristinabergwall1
1
590
Practical Orchestrator
shlominoach
192
12k
Transcript
Glue Glue $command-line-sprites $command-line-sprites @jorgebastida @jorgebastida gluecss.com
Sprites?
N 1
A .sprite-A{ ... }
A .sprite-A{ background-image: url(sprite.png); ... }
x:120px y:50px A .sprite-A{ background-image: url(sprite.png); background-position: -120px -50px; ...
}
A .sprite-A{ background-image: url(sprite.png); background-position: -120px -50px; width: 10px; height:
20px; ... } 20px 10px
A <div class=”sprite-A”></div>
Should I do this for each image?
Yes!
By hand #1
HARD, UNMAINTAINABLE. TEDIOUS AND
+ custom - manual css ∞time
Online #2
+ easy to use - internet - upgrade
STOP
None
Rebuild sprites should can must be part of the assets-rebuild
* for 99% of your sprites * “ ”
Rebuild assets happy path suggest .css .png + Build Sprites
/img/c/ .min.css .css site styles + .css = Compile styles /css/c/ .min.js site js .js + = Compile js /js/c/ ?
Glue Glue $command-line-sprites $command-line-sprites gluecss.com
Drop source images somewhere $ glue source output Party!
.sprite-icons-rainbow{ background-image:url(sprite.png); background-repeat:no-repeat; background-position: 247px 147px; width: 25px; height: 25px;
} ... fam fam fam
.glyphicons-187-more{ background-image:url(glyphicons.png); background-repeat:no-repeat; background-position: 212px 42px; width: 23px; height: 22px;
} ... glyphish
But... my sprites are complex...
--padding 5px
--padding only for some files? add.png add_10.png add_10-20.png add_10-5-20-4.png
--algorithm square vertical horizontal diagonal vertical right horizontal bottom
--ordering maxside width height area
Pseudo Classes pay.png pay_hover.png Think about this... It’s freaking cool
:)
--crop
--project sprites !"" actions # !"" add.png # $"" remove.png
!"" borders # !"" top_left.png # $"" top_right.png $"" icons !"" comment.png !"" new.png $"" rss.png
--cachebuster sprite_4d3ad.png sprite.png?4d3ad
etc... Watch Configuration files Margins less support OptiPNG integration Custom
CSS output Custom class names PNG8 ... It’s Python!
Thanks! Thanks! gluecss.com gluecss.com @jorgebastida @jorgebastida