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
日本語でCSSを書きたい
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ikkou
February 12, 2016
Programming
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
日本語でCSSを書きたい
Meguro.es#2 の飛び込みLTで発表した資料です。
http://meguroes.connpass.com/event/25018/
ikkou
February 12, 2016
More Decks by ikkou
See All by ikkou
GitHub Copilot全社導入のその後とGitHub×ZOZOTOWNコラボレーションの舞台裏
ikkou
0
2.2k
Expectations for the Immersive Web: Insights from the WebXR Japanese Community
ikkou
0
290
WebXRの現状確認 2023 Autumn / Check the current status of WebXR 2023 Autumn
ikkou
3
2.6k
あなたの知らないARの可能性を空間レベルで拡げるVPSの世界 / The World of VPS
ikkou
1
6.2k
WebXR 最前線 2022 ~ メタバースとWeb3を添えて / WebXR Frontline 2022
ikkou
1
1.9k
メタバースの激流とXR業界のイマ / The Metaverse Torrent and the XR Industry Today
ikkou
0
2.2k
Recent Feature Topics on WebAR - 2021-06-06
ikkou
0
150
iOSではじめるWebAR 2021 - iOSDC Japan 2021 / webar-in-ios-2021
ikkou
1
5.1k
あなたの知らないSafariのExperimental Featuresの世界 - iOSDC Japan 2021 / Experimental Features in Safari You Didn't Know
ikkou
2
8.6k
Other Decks in Programming
See All in Programming
SREの越境 / SRE Collaboration
y0hgi
2
260
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.7k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
wkhtmltopdfの次どうするか問題2026
willnet
2
1.6k
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
350
Heart of Swift Concurrency
koher
0
940
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
140
Agents on Rails - Rails at Scale 2026
irinanazarova
0
130
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.9k
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
160
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
640
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Making the Leap to Tech Lead
cromwellryan
135
10k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Building AI with AI
inesmontani
PRO
1
1.2k
A Tale of Four Properties
chriscoyier
163
24k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
680
4 Signs Your Business is Dying
shpigford
187
23k
Transcript
ຊޠͰCSSΛॻ͖͍ͨ Meguro.es#2 in Drecom 2016/02/10
ྫ͑͜Μͳײ͡Ͱ……ɻ .foo { ෯: 200px; ߴ͞: 200px; എܠ৭: ࡩ৭; }
.bar { ৭: ҉ࠇ৭; ߦἧ͑: தԝدͤ; ଠ͞: ଠ͘; ߦߴ: 1.4; }
postcss-japanese-stylesheets
҆৺͍ͯͩ͘͠͞npmͷͰ͢
whoami • @ikkou • g1983ers • Drecom • Front-end Engineer?
• Meguro.esͷதͷਓ
postcss-japanese-stylesheets • PostCSS ͷϓϥάΠϯͱͯ͠ಈ࡞͠·͢ • Ұ෦ͷϓϩύςΟͱΛຊޠͰهड़Ͱ͖·͢ • ಛʹ৭ʹྗΛೖΕ͍ͯ·͢ • e.g.
҉ࠇ৭, ۚࢳ৭, ৭
PostCSS PostCSS is a tool for transforming styles with JS
plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more. ฏͨ͘ݴ͑ɺPostCSS ɺJavaScriptͷϓϥά ΠϯΛࣗ༝ʹΈ߹ΘͤͯɺCSSΛੜ͢Δπʔ ϧͰ͢
PostCSSͷϓϥάΠϯ ͨ͘͞Μ͋Γ·͢ʂ https://github.com/postcss/postcss/blob/ master/docs/plugins.md ͪͳΈʹ postcss-japanese-stylesheets ɺΧς ΰϦͱͯ͠ Fun ʹଐ͢ΔωλཁૉΛؚΉϓϥά
ΠϯͰ͢ɻ
PostCSSϓϥάΠϯͷ࡞Γํ var postcss = require('postcss'); module.exports = postcss.plugin('postcss-japanese-stylesheets', function (opts)
{ opts = opts || {}; return function (css) { css.eachDecl(function transformDecl(decl) { decl.prop = decl.prop.replace('৭', 'color'); }); }; }); postcss-japanese-stylesheets ͷΑ͏ͳɺจࣈྻ Λஔ͖͑Δఔͷ༰Ͱ͋Εɺ͜ͷΑ͏ʹࢸ ۃ؆୯ʹ࡞Δ͜ͱ͕ग़དྷ·͢
ରԠ͍ͯ͠ΔϓϥύςΟͷྫ • എܠը૾ -> background-image • ৭ -> color •
ߴ͞ -> height • ෯ -> width • ϑΥϯτ໊ -> font-family • ଠ͞ -> font-weight
ରԠ͍ͯ͠Δͷྫ • ໊ 465छྨ!! • தԝدͤ -> center • ۉׂ
-> justify • ଠ͍ | ଠ͘ -> bold and • !ॏཁ -> !important
PostCSSͷϓϥάΠϯ؆୯ʹ࡞Ε·͢
ٸ͖ΐɺࠓ࡞ͬͯࠓެ։͠·ͨ͠
npmͷެ։͋͘͠Γ·ͤΜ
ָ͍͠PostCSSϥΠϑΛ!!