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
Sass for everyday's cooking
Search
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
240
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
golang-bob.pdf
iwatsukayura
0
120
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
160
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
280
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
580
phperだってパンチカードでコーディングしたい
o0h
PRO
0
270
すこし踏み込む CancellationToken
htkym
2
1.7k
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
140
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.3k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
160
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
960
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
260
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
470
How to make the Groovebox
asonas
2
2.5k
Building Applications with DynamoDB
mza
96
7.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Marketing to machines
jonoalderson
1
5.9k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
A better future with KSS
kneath
240
18k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
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