Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Glue
Search
Jorge Bastida
June 05, 2012
Technology
7
760
Glue
Glue is a simple command line tool to generate CSS sprites.
Jorge Bastida
June 05, 2012
Tweet
Share
More Decks by Jorge Bastida
See All by Jorge Bastida
Streetlife Analytics
jorgebastida
1
280
Some non-obvious tips… Scaling Up
jorgebastida
1
280
La historia de todo lo que pudo salir mal... pero salió bien
jorgebastida
8
980
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
150
Other Decks in Technology
See All in Technology
アーキテクチャモダナイゼーションを実現する組織
satohjohn
1
1.1k
システム標準化PMOから ガバメントクラウドCoEへ
techniczna
1
150
エンジニアリングマネージャーの仕事
yuheinakasaka
0
120
1GB RAMのラズピッピで何ができるのか試してみよう / 20260319-rpijam-1gb-rpi-whats-possible
akkiesoft
0
590
新規事業×QAの挑戦:不確実性を乗りこなす!フェーズごとに求められるQAの役割変革
hacomono
PRO
0
130
"作る"から"使われる"へ:Backstage 活用の現在地
sbtechnight
0
220
20260311 ビジネスSWG活動報告(デジタルアイデンティティ人材育成推進WG Ph2 活動報告会)
oidfj
0
350
猫でもわかるKiro CLI(AI 駆動開発への道編)
kentapapa
0
270
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
13k
NewSQL_ ストレージ分離と分散合意を用いたスケーラブルアーキテクチャ
hacomono
PRO
4
410
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
200
Cortex Code CLI と一緒に進めるAgentic Data Engineering
__allllllllez__
0
500
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
Visualization
eitanlees
150
17k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
190
Utilizing Notion as your number one productivity tool
mfonobong
4
260
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
480
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
Building Adaptive Systems
keathley
44
3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
490
Designing for Timeless Needs
cassininazir
0
170
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