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
日本語でCSSを書きたい
Search
ikkou
February 12, 2016
Programming
0
450
日本語でCSSを書きたい
Meguro.es#2 の飛び込みLTで発表した資料です。
http://meguroes.connpass.com/event/25018/
ikkou
February 12, 2016
Tweet
Share
More Decks by ikkou
See All by ikkou
GitHub Copilot全社導入のその後とGitHub×ZOZOTOWNコラボレーションの舞台裏 / GitHub ZOZOTOWN
ikkou
0
1.4k
Expectations for the Immersive Web: Insights from the WebXR Japanese Community
ikkou
0
67
WebXRの現状確認 2023 Autumn / Check the current status of WebXR 2023 Autumn
ikkou
3
2.2k
あなたの知らないARの可能性を空間レベルで拡げるVPSの世界 / The World of VPS
ikkou
1
4.9k
WebXR 最前線 2022 ~ メタバースとWeb3を添えて / WebXR Frontline 2022
ikkou
1
1.7k
メタバースの激流とXR業界のイマ / The Metaverse Torrent and the XR Industry Today
ikkou
0
1.9k
Recent Feature Topics on WebAR - 2021-06-06
ikkou
0
74
iOSではじめるWebAR 2021 - iOSDC Japan 2021 / webar-in-ios-2021
ikkou
1
4.2k
あなたの知らないSafariのExperimental Featuresの世界 - iOSDC Japan 2021 / Experimental Features in Safari You Didn't Know
ikkou
2
7.4k
Other Decks in Programming
See All in Programming
PRレビューのお供にDanger
stoticdev
1
240
TCAを用いたAmebaのリアーキテクチャ
dazy
0
230
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.2k
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
300
GoとPHPのインターフェイスの違い
shimabox
2
220
Introduction to C Extensions
sylph01
3
120
Generating OpenAPI schema from serializers throughout the Rails stack - Kyobashi.rb #5
envek
1
430
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.9k
Learning Kotlin with detekt
inouehi
1
200
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
350
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
160
バッチを作らなきゃとなったときに考えること
irof
2
560
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Raft: Consensus for Rubyists
vanstee
137
6.8k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
115
51k
Visualization
eitanlees
146
15k
Fireside Chat
paigeccino
35
3.2k
Bash Introduction
62gerente
611
210k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
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ϥΠϑΛ!!