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
Less is more
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sven Dahlstrand
May 16, 2012
Technology
360
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Less is more
Sven Dahlstrand
May 16, 2012
More Decks by Sven Dahlstrand
See All by Sven Dahlstrand
Ett smörgåsbord av smarta verktyg
svendahlstrand
0
910
Smarta lösningar i SiteVision
svendahlstrand
0
70
46elks
svendahlstrand
0
170
Internet of Things
svendahlstrand
2
110
Responsiv webbdesign
svendahlstrand
1
57
Internet of Things
svendahlstrand
1
180
Att testa dina SiteVision-portlets
svendahlstrand
1
140
Other Decks in Technology
See All in Technology
【CEDEC2026】次世代デジタルカードゲームのサーバー設計と運用 〜『Shadowverse: Worlds Beyond』の舞台裏~
cygames
PRO
1
1.3k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
MIRU 2026 チュートリアル
keisuke198619
0
910
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.3k
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
560
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
260
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
210
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
560
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
1.7k
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.2k
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
200
関東Kaggler会発表資料
takoi
1
220
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
The Curious Case for Waylosing
cassininazir
1
450
Writing Fast Ruby
sferik
630
63k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
380
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
Chasing Engaging Ingredients in Design
codingconduct
0
270
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
250
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Building Adaptive Systems
keathley
44
3.2k
Transcript
is more
CSS Jag
body { background: #5b83ad url("http://assets.example.com/images/background.png"); } .email-icon { background-image: url("http://assets.example.com/images/email.png");
border-color: #5b83ad; } Repetition - jobbigt att ändra Variabler @base-url: "http://assets.example.com/images"; @blue: #5b83ad; body { background: @blue url("@{base-url}/background.png"); } .email-icon { background-image: url("@{base-url}/email.png"); border-color: @blue; }
#information { background-color: #eeeeee; background-image: -webkit-linear-gradient(top, #eeeeee, #ffffff); background-image: -moz-linear-gradient(top,
#eeeeee, #ffffff); background-image: -ms-linear-gradient(top, #eeeeee, #ffffff); background-image: -o-linear-gradient(top, #eeeeee, #ffffff); } Mer repetition - svårt att återanvända .gradient (@from: #eee, @to: #fff) { background-color: @from; background-image: -webkit-linear-gradient(top, @from, @to); background-image: -moz-linear-gradient(top, @from, @to); background-image: -ms-linear-gradient(top, @from, @to); background-image: -o-linear-gradient(top, @from, @to); } #information { .gradient(#5b83ad, #fffff); } Mixins
.tweets { border-left: 2px solid blue; } .tweets ul {
list-style: none; margin: 0; padding: 0; } .tweets a { color: gray; display: block; } .tweets a:hover { color: blue; } Kan bli tydligare .tweets { border-left: 2px solid blue; ul { list-style: none; margin: 0; padding: 0; } a { color: gray; display: block; &:hover { color: blue; } } } Nästling
Allt det här och mer!
㟬Մ爱 WTF?!
i webbläsaren eller på servern LESS måste översättas
Ladda hem från lesscss.org less i stället för css Kom
igång! <link rel="stylesheet/less" type="text/css" href="styles.less"> <script src="less.js" type="text/javascript"></script>
Demo
Mindre repetition Enklare underhåll och återanvändning Inkludera less.js och kör
Sven Dahlstrand @svendahlstrand http://svendahlstrand.se