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
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
Rust で関数型ドメインモデリング
takonda
0
170
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
290
hackers_champloo_2026_tidb
makocchi
0
170
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
180
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
120
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
280
How to Design Configuration for Rails Applications
willnet
1
840
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
310
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
ウォンテッドリーの最近のプロダクトと技術の紹介
stomk
0
130
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
120
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
570
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
How to train your dragon (web standard)
notwaldorf
96
6.9k
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