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
Sass for everyday's cooking
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Takuji Ikeda
January 12, 2013
Programming
2k
21
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sass for everyday's cooking
Takuji Ikeda
January 12, 2013
More Decks by Takuji Ikeda
See All by Takuji Ikeda
20131101JAGAT_short.pdf
tikeda
1
230
UI for everyday's cooking
tikeda
39
18k
Patterns of UI Design
tikeda
3
1k
Web Fonts with Web Design
tikeda
6
6.5k
Other Decks in Programming
See All in Programming
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
390
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
110
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
Creating Composable Callables in Contemporary C++
rollbear
0
160
ふつうのFeature Flag実践入門
irof
8
4.2k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
150
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.5k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
800
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Navigating Weather and Climate Data
rabernat
0
230
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Ethics towards AI in product and experience design
skipperchong
2
310
Transcript
ΫοΫύουגࣜձࣾ αʔϏεσβΠϯ෦αʔϏεσβΠϯάϧʔϓ ా࢘ɹσβΠφʔ ຖͷྉཧͷͨΊͷSass $44/JUF-1
ࣗݾհ Sass Less,CSS ݄ʙ ʙ݄ ా࢘ @tikeda (scss)
None
None
Agenda ࠓ͢͜ͱ
ΫοΫύουͷ։ൃελΠϧͱ4BTT 4BTTΛͬͨࣗࣾσβΠϯϑϨʔϜϫʔΫ ຖͷྉཧͷͨΊͷ4BTTʁ
About Cookpad’s Coding Style ΫοΫύουͷ։ൃελΠϧͱSass
Engineer + Designer ࣌ 45ਓ
ΫοΫύουͷ։ൃελΠϧ •Sass / HamlʢσβΠφʔɾΤϯδχΞΘͣʣ •GitHubʢσβΠφʔɾΤϯδχΞΘͣʣ •ฏߦͯ͠ෳͷϓϩδΣΫτ͕ਐΉ •cookpad.comҎ֎ͷαʔϏεଓʑ։ൃ •σόΠεΘͣαʔϏε։ൃ •ૣ͍։ൃαΠΫϧʢ1ԿσϓϩΠʣ
UI UX user team Designer Engineer Directer Engineer Engineer Directer
Directer Engineer Designer Engineer
ΈΜͳͰ։ൃ Code Design Function Quality Speed
ΈΜͳͰ։ൃ Code (Sass) Design Function Quality Speed
None
$44 4$44DPEJOHTUZMF •Use a line break between selecters button, button:visited,
button:hover { } button, button:visited, button:hover { } #"% (00%
$44 4$44DPEJOHTUZMF •Use underscore in class names and ids •Don't
qualify ID Rules with tag names or classes button#backButton { } #back_button { } #"% (00%
•Add mixins at the beginning of selector class .comment {
@include border-radius(2px); @include box-shadow; color: $red; font-weight: bold; } (00% $44 4$44DPEJOHTUZMF
ίʔυϨϏϡʔ
ίʔυϨϏϡʔ ϧʔϧ͕͋ΔͷͰɺ !JODMVEFҰ൪্Ͱ͢ मਖ਼͠·͢
ίʔυϨϏϡʔ
ίʔυϨϏϡʔ ͜ͷϨϕϧͷΠϯσϯτͷ࣌վߦ͕ೖͬ ͍ͯͳͯ͘͏Ұݸਂ͍Ϩϕϧͩͱೖͬͯ ͍ΔͷͬͯԿ͔ҙਤ͕͋ΔͷͰ͠ΐ͏͔ʁ ΨΠυϥΠϯͩͱࢠཁૉͱଐੑͷؒʹ ۭߦ͋Γɺࢠཁૉ͕ฒͿ߹ۭߦ ͳͬ͠Ά͍ΜͰ͢ΑͶɻ !UBLVKJJLFEB͞ΜɺͲ͏Ͱ͠ΐ ͭͷ$44ϑΝΠϧͷதͰɺͲ͏͍͏ ߹ʹۭߦΛ͚͋Δͷ͔ͱ͍͏ϧʔϧ࣋ͪ
·͠ΐ͏ɻࠓޙ·ͱ·Γ͕ͳ͘ͳΔΑ͏Ͱ ͨ͠ΒΨΠυϥΠϯԽ͠·͢ɻ
4$44ߏ Sara Sara_settings cookpad.scss partial pages common extensions @import
4$44ߏ Sara Sara_settings cookpad.scss partial pages common extensions ݶఆϢʔβʔͳͲҰ࣌తͳػೳ༻ ԣஅతʹ͍ͬͯΔUIίϯϙʔωϯτ
ϖʔδ͝ͱͷελΠϧ༻ Sara͕·͔ͳ͑ͳ͍جຊελΠϧ @import
4$44ߏ Sara Sara_settings extension_a.scss @import extension_b_smartphone.scss
4$44ߏ Sara Sara_settings cookpad.scss partial pages common extensions ݶఆϢʔβʔͳͲҰ࣌తͳػೳ༻ ԣஅతʹ͍ͬͯΔUIίϯϙʔωϯτ
ϖʔδ͝ͱͷελΠϧ༻ Sara͕·͔ͳ͑ͳ͍جຊελΠϧ @import
Sara SassΛͬͨࣗࣾσβΠϯϑϨʔϜϫʔΫ
Sara?
皿 美�味しい料理を支える、 料理に合う美�しい皿
user team
team
None
None
None
ΫοΫύουͷσβΠϯͷநԽ
6*ίϯϙʔωϯτͷڞ༗
มʹΑΔΧϥʔίʔυͳͲͷཧ
σόΠεΛ·͍ͨͩΧϥʔϚωʔδ
৽αʔϏεࣾαʔϏεͷ֦ு
৽αʔϏεࣾαʔϏεͷ֦ு
4BSB'SBNFXPSL
4BSB'SBNFXPSL
4BSBNJYJO
4BSBNJYJO @include size(16px); @include size(64px, 32px); ؆୯αΠζࢦఆ
4BSBNJYJO @include absolute(10px, 5px, $z: 999); BCTPMVUFύοέʔδ
4BSBNJYJO @include button_generator($red); @include button_generator ( $button_bg_from, $button_bg_to: $button_bg_from, $button_border:
darken($button_bg_to, 7%), $button_text_shadow: darken($button_bg_to, 10%) ) ఆ൪ͷCVUUPO
4BSBNJYJO @include tooltip; @include tooltip ( $tooltip_width: 200px, $triangle_position: top,
// top, right, bottom, left $triangle_distance: 100px, $triangle_size: small, // small, large ) Ͳ͜ͰUPPMUJQ
1VMM3FRVFTU Good job!
3FDFOU5PQJD
3FDFOU5PQJD Sara Responsive
Sara Responsive 3FDFOU5PQJD Not so good yet ..
ࣦഊஊ
ϝΠϯͷ$44͕ޮ͍ͯͳ͍ʁ ࣦഊஊ *&ͷ$44ηϨΫλʔ্ݶ 4095Over *&ͰσβΠϯ่͕Εͯ·͢
$44ׂ͠·͔͢ʁ ͍͍ɺແବ͕͋ΔͣͳͷͰ ϦϑΝΫλϦϯά͠·͠ΐ͏Α ϜμͳJNQPSUFYUFOE͕ͳ͍͔ ௐ·͢ ରࡦ ೦ͷͨΊɺ։ൃڥͰ"MFSUͩ͠·͢
ରࡦ։ൃڥͰͷ"MFSU Good job!
ରࡦ4$44ݟ͠ FYUFOEΛNJYJOʹม͑ͨΒ ສߦͷ$44͕ສߦʹͳΓ·ͨ͠
$441SFQSPDFTTPSΛ͏ͱ $44ͷྔ͕૿͑Δʹ͋Γ·͢ɻ దࡐదॴɺదʹ͍·͠ΐ͏ɻ
Sass for everyday cooking ? ຖͷྉཧͷͨΊͷSass?
ྑ͖ΫοΫύουମݧͷఏڙ
ݕূ݁Ռͷө ݕ ূ @include button; @include button(#ef6074); more better
ݕূ݁Ռͷө ݕ ূ @include button; @include button(#ef6074); @include button; @include
button;
@mixin button ( $button_bg_from, $button_bg_to: $button_bg_from, $button_border: darken($button_bg_to, 7%), $button_text_shadow:
darken($button_bg_to, 10%) ){ text-shadow: 0 -1px 0 $button_text_shadow; @if ($button_border == 'none') { border: none; } @elseif ($button_border == '') { border: none; } @else { border: 1px solid $button_border; } background: $button_bg_to; @include gradient($button_bg_from, $button_bg_to); &:hover { @if ($button_border == 'none') { border: none; } @elseif ($button_border == '') { border: none; } @else { border: 1px solid $button_border; } border: 1px solid darken($button_border, 3%); @include gradient(darken($button_bg_from, 3%), darken($button_bg_to, 3%)); } } ୯ͳΔUIύʔπͰͳ ͘ඞཁͳ෦ͷ֦ுΛ ڐ༰͢Δ ݕূ݁Ռͷө
ྑ͖ΫοΫύουମݧͷఏڙ ܕʹΊͳ͍ॊೈੑߴ͍ σβΠϯϑϨʔϜϫʔΫ
ඒຯͦ͠͏ͳσβΠϯ
ྫ ɾ੨Θͳ͍ ɾϨγϐϖʔδͷϦϯΫ৭ ɾϨγϐը૾શ෦ࠨճΓ
ܦݧͱײੑʹج͍ͮͨσβΠϯͷ ΈʹΈࠐΉ ඒຯͦ͠͏ͳσβΠϯ
͍͢։ൃαΠΫϧ
จࣈ৭ എܠ৭ ϦϯΫ৭ Ϙʔμʔ৭ Ϩγϐ৭ ΞΫηϯτ৭ #3c3c3c #faf3e3 #330000 #F5F1E1
#889B00 #ff9933 4BTTΛͬͯมԽ
$branding_main: #4d2200 !default; $branding_accent: #ff9933 !default; $branding_support: #faf3e3 !default; $anchor:
#330000 !default; $anchor_visited: #845f4b !default; $body: #3c3c3c !default; $body_bg: $branding_support !default; $recipe_title: #889B00 !default; $default_border: darken($body_bg, 5%) !default; ιʔείʔυ͔Β ࢀরՄೳͳ ΨΠυϥΠϯ 4BTTΛͬͯมԽ
͍͢։ൃαΠΫϧ ϘτϜΞοϓܕͷσβΠϯΨΠυϥΠϯ
ϘτϜΞοϓܕͷσβΠϯΨΠυϥΠϯ ܦݧͱײੑʹج͍ͮͨσβΠϯͷ ΈʹΈࠐΉ ܕʹΊͳ͍ॊೈੑߴ͍ σβΠϯϑϨʔϜϫʔΫ
ϘτϜΞοϓܕͷσβΠϯΨΠυϥΠϯ ܦݧͱײੑʹج͍ͮͨσβΠϯͷ ΈʹΈࠐΉ ܕʹΊͳ͍ॊೈੑߴ͍ σβΠϯϑϨʔϜϫʔΫ
Coding Designing
Coding Designing
Ҏ্ɺ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ ΤϯδχΞσβΠφʔืूத ΫοΫύουͷαʔϏε։ൃʹ͝ڵຯ͕ ͋Δํɺؾܰʹ͓͕͚͍ͩ͘͞ʂ @tikedaɹ
[email protected]
Special Thanks Photo by
cookpad recipes and Flickr