Movatterモバイル変換


[0]ホーム

URL:


拓樹 谷, profile picture
Uploaded by拓樹 谷
PDF, PPTX16,039 views

モダンなCSS設計パターンを考える

The document summarizes Hiroki Tani's presentation at the QCon Tokyo 2014 conference on modern CSS architecture. Some key points discussed include:- Adopting modular approaches like OOCSS and SMACSS to separate structure from skin/style and improve maintainability. - Using techniques like BEM naming to further decouple CSS from HTML.- Developing reusable CSS modules and components with flexible modifiers.- Maintaining styleguides and pattern libraries for consistent front-end development.

Embed presentation

Download as PDF, PPTX
QCon Tokyo 2014 ConferenceModern CSS ArchitectureHiroki TaniモダンなCSS設計パターンを考える
Hiroki TaniFront-end EngineerCyberAgent, Inc.
?Why Architecture
#news h2 { border-bottom: 1px solid black; padding: 1em 0.5em; font-size: 18px; font-weight: bold;}
#news h2 { border-bottom: 1px solid black; padding: 1em 0.5em; font-size: 18px; font-weight: bold;}!#faq .title { border-bottom: 1px solid black; padding: 1em 0.5em; font-size: 18px; font-weight: bold;}
#news h2 { border-bottom: 1px solid black; padding: 1em 0.5em; font-size: 18px; font-weight: bold;}!#faq .title { border-bottom: 1px solid black; padding: 1em 0.5em; font-size: 18px; font-weight: bold;}!#service .feature .title { border: 1px solid black; padding: 0.5em; font-size: 16px;}
.column_2 #inbox .list { ... }.column_3 #inbox .list { ... }.column_3 #inbox .list .name { ... }.column_3 #inbox .list .name p { ... }.column_3 #inbox .list .name.reply { ... }.column_3 #inbox .list .name.reply a { ... }body#top .column_3 #inbox .list.left { ... }
!important
Goals of Better CSS Architecture-Predictable-Reusable-Maintainable-Scalablehttp://article.enja.io/articles/css-architecture.html予測しやすい再利用しやすい保守しやすい拡張しやすい
Modular CSS
OOCSSNicole Sullivanhttps://github.com/stubbornella/oocss/wiki
OOCSS-Separate structure and skin-Separate container and content構造と見た目の分離コンテナとコンテンツの分離
Media object
<div class="media"> <div class="media-image">  <img src="/img/seminar/15/tani.jpg"> </div> <div class="media-body">  <p>...</p>  <ul>   <li><a>...</a></li>  </ul>  <p>...</p> </div></div>
<div class="media"> <div class="media-image">  <img src="/img/seminar/15/tani.jpg"> </div> <div class="media-body">  <p>...</p>  <ul>   <li><a>...</a></li>  </ul>  <p>...</p> </div></div>
<div class="media"> <div class="media-image">  <img src="/img/seminar/15/tani.jpg"> </div> <div class="media-body">  <p>...</p>  <ul>   <li><a>...</a></li>  </ul>  <p>...</p> </div></div>
.media { /* Clearfix */}.media-image { float: left; margin-right: 10px;}.media-image > img { display: block;}.media-body { overflow: hidden;}
<div class="media skin-a"> <div class="media-image">  <img src="/img/seminar/15/tani.jpg"> </div> <div class="media-body">  <p>...</p>  <ul>   <li><a>...</a></li>  </ul>  <p>...</p> </div></div>
<div class="media skin-b"> <div class="media-image">  <img src="/img/seminar/15/tani.jpg"> </div> <div class="media-body">  <p>...</p>  <ul>   <li><a>...</a></li>  </ul>  <p>...</p> </div></div>
?How to build modules
It depends.
Rule of Three‘Refactoring’http://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)
3, 6
3, 6, 9, 12, 15 ...
3, 6, 12, 24, 48 ...
3, 6, 9
3, 6, 9, 12, 15 ...
.fontSize10 { font-size: 10px}.colorRed { color: red}
<p class="fontSize18 colorRed">入力内容に誤りがあります。</p>
<p class="box radius10 fontSize18 colorRed">入力内容に誤りがあります。</p>
.fontSize18 { font-size: 18px}
.fontSize18 { font-size: 18px}!@media only screen and (max-width : 320px) { .fontSize18 {  font-size: 14px }}⚠
.colorRed { color: red}
.colorRed { color: orange;}⚠
.colorRed { color: orange; /* あとで直す */}⚠
⚠
?How to maintain modules
SMACSSJonathan Snookhttp://smacss.com/ja日本語、あります
SMACSS-Categorization-Naming Convention-Decoupling CSS from HTMLカテゴライズ命名規則HTMLとCSSの分離
SMACSS Categories-Base-Layout-Module-State-Theme
/* # Base */body, form {margin: 0;padding: 0;}a {color: #039;}a:hover {color: #03F; }
/* # Layout */#header {width: 960px;margin: auto;}.l-article {border: solid #CCC;border-width: 1px 0 0;}.l-grid {margin: 0;padding: 0;list-style-type: none;}.l-grid > li {display: inline-block;margin: 0 0 10px 10px; }
/* # State */.is-hidden { display: none;}.is-error { font-weight: bold; color: red;}.is-tab-active { border-bottom-color: transparent;}
/* # Theme *//* ## Spring Theme CSS */.theme-header { background-image: url("/theme/spring/header.png");}.theme-border { 1px solid pink; }
Message-boxhttp://cdpn.io/hKBkm
<div class="msg"><p>...</p></div>.msg {display: block;border: 1px solid #cccccc;border-radius: 8px;padding: 1em;background-color: #efefef;color: #333333;}
<div class="msg msg-error"><p>...</p></div>.msg {...}.msg-error {border: 1px solid #c0392b;background-color: #fe9282;}
<div class="msg msg-success"><p>...</p></div>.msg {...}.msg-success {border: 1px solid #27ae60;background-color: #99f3c9;}
<div class="msg msg-error"><h2>...</h2><p>...</p></div>
<div class="msg msg-error"><h2>...</h2><p>...</p></div>.msg h2 {font-size: inherit;font-weight: bold;}!.msg p {margin-top: 0.6em;}
.msg h2 {font-size: inherit;font-weight: bold;}!.msg ul,.msg p {margin-top: 0.6em;}⚠
<div class="msg msg-error"><h2 class="msg-title">...</h2><ul class="msg-body"><li>...</li><li>...</li></ul></div>
.msg-title {font-size: inherit;font-weight: bold;}!.msg-body {margin-top: 0.6em;}
<div class="msg msg-error"><p class="msg-title">...</p><ul class="msg-body"><li>...</li><li>...</li></ul></div>
<div class="msg msg-error"><h2 class="msg-title"><i class="msg-title-icon ico ico-label ico-alert"></i>...</h2><ul class="msg-body"><li>...</li><li>...</li></ul></div>
.msg-title-icon {vertical-align: -0.3em;}!.ico {display: inline-block;}!.ico-alert {background-image: url(...);width: 24px;height: 24px;}!.ico-label {margin-right: 0.3em;}
%ico {display: inline-block;}!%ico-alert {background-image: url(...);width: 24px;height: 24px;}!%ico-label {margin-right: 0.3em;}!.msg-error-icon {vertical-align: -0.3em;@extend %ico;@extend %ico-alert;@extend %ico-label;}
!.msg-error {border: 1px solid #c0392b;background-color: #fe9282;}
.msg-title {font-size: inherit;font-weight: bold;}.msg-body {margin-top: 0.6em;}
.msg {...}.msg-error {border: 1px solid #c0392b;background-color: #fe9282;}.msg-title {font-size: inherit;font-weight: bold;}
BEMYandexhttp://bem.info/
BEM stands for ...-Block-Element-Modifier
Block
Element
Modifier
.block { ...}.block__element { ...}.block_modifier { ...}.block__element_modifier { ...}
.nav { ...}.nav__item { ...}.nav_segmented { ...}.nav__item_segmented { ...}
.nav { ...}.nav__item { ...}.nav--segmented { ...}.nav__item--segmented { ...}http://enja.studiomohawk.com/2012/03/20/about-html-semantics-and-front-end-architecture/
.msg {...}.msg--error {border: 1px solid #c0392b;background-color: #fe9282;}
.msg__title {font-size: inherit;font-weight: bold;}.msg__body {margin-top: 0.6em;}.msg__title-icon {vertical-align: -0.3em;}
MCSS-Base-Project-cosmetichttp://operatino.github.io/MCSS/en/
FLOCSS-Foundation-Layout-Objecthttps://github.com/hiloki/flocss-Component-Project-Utility
Front-end Styleguide
Starbucks Style Guidehttp://www.starbucks.com/static/reference/styleguide/
MailChimp Pattern Libraryhttp://ux.mailchimp.com/patterns/
Twitter Bootstraphttp://getbootstrap.com
A Pattern Aparthttp://patterns.alistapart.com/
http://alistapart.com/blog/post/getting-started-with-pattern-librariesCode Example view
http://alistapart.com/blog/post/getting-started-with-pattern-librariesPatchwork view
Front-end Styleguide
Front-end StyleguideLiving
KSShttp://warpspire.com/kss/styleguides/
Kaleihttp://kaleistyleguide.com/
StyleDoccohttp://jacobrask.github.io/styledocco/
//// # 見出し//// 説明文を書きます。マークダウン形式です。//// ```// <button type="button" class="btn btn-default">// ``` で囲んだ部分にデモのHTMLを記述します。// </button>// ```!.btn {display: inline-block;...&:hover,&:focus {color: @btn-default-color;text-decoration: none;}}
$ styledocco -n "ProjectName" css/$ styledocco -n "ProjectName" -o "mydocs"$ styledocco -n "ProjectName" --preprocessor "lessc" less/
http://d.pr/v/46BF
⚏🎬 👤👤 ⚏🎬👤Building PagesSystems
Styleguide Driven Developmenthttp://www.stubbornella.org/content/2014/04/09/style-guide-driven-development/
Developer vs Designer ?
⚏🎬 👤👤
Developer with Designer
Best Practice
Best Practices
どんなに多くの人が貢献したとしてもどのコードも一人で書いたようにするhttps://github.com/necolas/idiomatic-css- Idiomatic CSSAll code in any code-base should look like a single persontyped it, even when many people are contributing to it.“”
壊れない完璧な設計を求めるのではなく壊れたときに勇気をもって修復できる設計を“”- Anonymous
Thanks.- twitter.com/hiloki- inkdesign.jp- slideshare.net/hiloki
Photo credit- http://www.flickr.com/photos/bpotstra/3490333174/sizes/l/- http://www.flickr.com/photos/bettybroadbent/3704523854/sizes/o/- http://www.flickr.com/photos/drewmaughan/8209503226/sizes/l/- http://www.flickr.com/photos/biodork/6849406792/- http://www.flickr.com/photos/43266097@N03/9444574320/sizes/l/- http://www.flickr.com/photos/90585146@N08/8234225693/sizes/l/- http://www.flickr.com/photos/lwr/6778863776/sizes/l/- http://www.flickr.com/photos/jezpage/4696962046/- http://www.flickr.com/photos/april-mo/8485249298/sizes/l/- http://www.flickr.com/photos/4st4roth/2366615948/- http://www.flickr.com/photos/sharman/4570412801/sizes/l/- http://www.flickr.com/photos/kaptainkobold/3771497484/- http://www.flickr.com/photos/laurie_pink/2549598674/sizes/l/- http://www.flickr.com/photos/dansdata/3266946102/- http://www.flickr.com/photos/ochre_jelly/6839227477/sizes/l/- http://www.flickr.com/photos/in-duce/2232109985/sizes/o/- http://www.flickr.com/photos/pgoyette/5911926699/sizes/z/- http://www.flickr.com/photos/conradoplg/10091603396/sizes/l/- http://www.flickr.com/photos/kaptainkobold/4441509147/sizes/l/

Recommended

PDF
モダンなCSS設計パターンを考える
KEY
Slow kinda sucks
PDF
Beyond CSS Architecture
PDF
Rapid Prototyping
PDF
CSSプリプロセッサの取扱説明書
PDF
Prototyping w/HTML5 and CSS3
PPTX
Rapid and Responsive - UX to Prototype with Bootstrap
PDF
Try Web Components
PDF
Rapid HTML Prototyping with Bootstrap - Chris Griffith
PDF
CSS framework By Palash
PDF
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
PDF
Progressive Prototyping w/HTML5, CSS3 and jQuery
TXT
Guia de-estudio-2
PPTX
Basics of Front End Web Dev PowerPoint
PDF
Critical Rendering Path
KEY
Html5 intro
PDF
HTML5 & CSS3 Flag
PDF
Html5 & CSS overview
PDF
LessCSS Presentation @ April 2015 GTALUG Meeting
PPTX
Xlrays online web tutorials
TXT
Html22
PDF
Slicing the web
PDF
Html5 ux london
PDF
Você precisa aprender Web
PDF
Real World Web Standards
 
PDF
Whirlwind Tour of SVG (plus RaphaelJS)
PDF
Class 4 handout w css3 using j fiddle
PPTX
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
PDF
なんでCSSすぐ死んでしまうん
PDF
悩まないコーディングをしよう! OOCSS,SMACSSを用いた、読みやすくてメンテナブルなCSS設計(Sass対応)

More Related Content

PDF
モダンなCSS設計パターンを考える
KEY
Slow kinda sucks
PDF
Beyond CSS Architecture
PDF
Rapid Prototyping
PDF
CSSプリプロセッサの取扱説明書
PDF
Prototyping w/HTML5 and CSS3
PPTX
Rapid and Responsive - UX to Prototype with Bootstrap
PDF
Try Web Components
モダンなCSS設計パターンを考える
Slow kinda sucks
Beyond CSS Architecture
Rapid Prototyping
CSSプリプロセッサの取扱説明書
Prototyping w/HTML5 and CSS3
Rapid and Responsive - UX to Prototype with Bootstrap
Try Web Components

What's hot

PDF
Rapid HTML Prototyping with Bootstrap - Chris Griffith
PDF
CSS framework By Palash
PDF
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
PDF
Progressive Prototyping w/HTML5, CSS3 and jQuery
TXT
Guia de-estudio-2
PPTX
Basics of Front End Web Dev PowerPoint
PDF
Critical Rendering Path
KEY
Html5 intro
PDF
HTML5 & CSS3 Flag
PDF
Html5 & CSS overview
PDF
LessCSS Presentation @ April 2015 GTALUG Meeting
PPTX
Xlrays online web tutorials
TXT
Html22
PDF
Slicing the web
PDF
Html5 ux london
PDF
Você precisa aprender Web
PDF
Real World Web Standards
 
PDF
Whirlwind Tour of SVG (plus RaphaelJS)
PDF
Class 4 handout w css3 using j fiddle
PPTX
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
Rapid HTML Prototyping with Bootstrap - Chris Griffith
CSS framework By Palash
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Progressive Prototyping w/HTML5, CSS3 and jQuery
Guia de-estudio-2
Basics of Front End Web Dev PowerPoint
Critical Rendering Path
Html5 intro
HTML5 & CSS3 Flag
Html5 & CSS overview
LessCSS Presentation @ April 2015 GTALUG Meeting
Xlrays online web tutorials
Html22
Slicing the web
Html5 ux london
Você precisa aprender Web
Real World Web Standards
 
Whirlwind Tour of SVG (plus RaphaelJS)
Class 4 handout w css3 using j fiddle
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development

Viewers also liked

PDF
なんでCSSすぐ死んでしまうん
PDF
悩まないコーディングをしよう! OOCSS,SMACSSを用いた、読みやすくてメンテナブルなCSS設計(Sass対応)
PDF
ヒューマンリーダブルな CSS 記述法(異次元編):2016年5月13日 CodeGrid 四周年記念パーティー
PDF
最強オブジェクト指向言語 JavaScript 再入門!
PDF
ゆるふわCSS3
PDF
コーディングを考慮したWebデザインガイドライン
PDF
WebデザイナーによるWebデザイナーのためのマーケティング入門
PPTX
制作会社の視点で見る デザイナーのキャリアパスとスキル
PDF
UXデザインの上流工程の考え方とプロセス  ~リサーチからアイデア発想そしてUIデザインへ
PDF
CSS の歩き方
PPTX
7 key recipes for data engineering
PDF
WEBデザイナーのためのエディタ入門 先生:金澤 直毅
KEY
WebデザイナーのためのGit勉強会 ~準備編~
PDF
Preparing for distributed system failures using akka #ScalaMatsuri
PDF
CSS設計のお勉強
PDF
Akka-chan's Survival Guide for the Streaming World
PDF
サルでもできるWebデザイン:SwapSkills
PDF
軽量マークアップ言語で気楽にマークアップ
PDF
エコなWebデザイナーになろう
PDF
WEBデザイナー3年目を終えて
なんでCSSすぐ死んでしまうん
悩まないコーディングをしよう! OOCSS,SMACSSを用いた、読みやすくてメンテナブルなCSS設計(Sass対応)
ヒューマンリーダブルな CSS 記述法(異次元編):2016年5月13日 CodeGrid 四周年記念パーティー
最強オブジェクト指向言語 JavaScript 再入門!
ゆるふわCSS3
コーディングを考慮したWebデザインガイドライン
WebデザイナーによるWebデザイナーのためのマーケティング入門
制作会社の視点で見る デザイナーのキャリアパスとスキル
UXデザインの上流工程の考え方とプロセス  ~リサーチからアイデア発想そしてUIデザインへ
CSS の歩き方
7 key recipes for data engineering
WEBデザイナーのためのエディタ入門 先生:金澤 直毅
WebデザイナーのためのGit勉強会 ~準備編~
Preparing for distributed system failures using akka #ScalaMatsuri
CSS設計のお勉強
Akka-chan's Survival Guide for the Streaming World
サルでもできるWebデザイン:SwapSkills
軽量マークアップ言語で気楽にマークアップ
エコなWebデザイナーになろう
WEBデザイナー3年目を終えて

Similar to モダンなCSS設計パターンを考える

PDF
A complete html and css guidelines for beginners
PDF
CSS - OOCSS, SMACSS and more
PDF
HTML and CSS Coding Standards
KEY
Stylesheets of the future with Sass and Compass
PDF
Css cheat sheet
PDF
SMACSS Workshop
KEY
前端开发理论热点面对面:从怎么看,到怎么做?
PDF
Accelerated Stylesheets
PDF
CSMess to OOCSS: Refactoring CSS with Object Oriented Design
PDF
CSS- Smacss Design Rule
PDF
LESS : The dynamic stylesheet language
PDF
Structuring your CSS for maintainability: rules and guile lines to write CSS
PPTX
CSS for Developers
PDF
More of less (take 2)
PDF
Big Design Conference: CSS3
KEY
Wrangling the CSS Beast with Sass
PDF
UI Realigning & Refactoring by Jina Bolton
KEY
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective, Ajax ...
PDF
Part 2 in depth guide on word-press coding standards for css &amp; js big
PPTX
CSS - chained classes
A complete html and css guidelines for beginners
CSS - OOCSS, SMACSS and more
HTML and CSS Coding Standards
Stylesheets of the future with Sass and Compass
Css cheat sheet
SMACSS Workshop
前端开发理论热点面对面:从怎么看,到怎么做?
Accelerated Stylesheets
CSMess to OOCSS: Refactoring CSS with Object Oriented Design
CSS- Smacss Design Rule
LESS : The dynamic stylesheet language
Structuring your CSS for maintainability: rules and guile lines to write CSS
CSS for Developers
More of less (take 2)
Big Design Conference: CSS3
Wrangling the CSS Beast with Sass
UI Realigning & Refactoring by Jina Bolton
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective, Ajax ...
Part 2 in depth guide on word-press coding standards for css &amp; js big
CSS - chained classes

More from 拓樹 谷

PDF
メンテナブルでありつづけるためのCSS設計
PDF
CSS設計の理想と現実
PDF
CSS Components
PDF
Thinking about CSS Architecture
PDF
High Performance Webdesign
PDF
Why Sass?
PDF
How to Win the Heart of CSS Boys
メンテナブルでありつづけるためのCSS設計
CSS設計の理想と現実
CSS Components
Thinking about CSS Architecture
High Performance Webdesign
Why Sass?
How to Win the Heart of CSS Boys

Recently uploaded

PDF
Creating Magical CSS-Only Image Tilt Effects No JavaScript Required.pdf
PPTX
Moho Pro 14.4 Crack for MacOS Works Until 2050 [Latest] pptx
PPTX
CleanMyMac X v5.2.8 Crack for MacOS Full Version [Latest] pptx
PDF
International Journal of Information Technology, Modeling and Computing (IJITMC)
PPTX
Driver Easy Pro Key 7.1.0.2641 Full Mac Crack Free Activated Download [2026]....
PPTX
WinRAR Crack 7.13 Final Mac Keygen 2026 Download [Latest] Software.pptx
PPTX
Wondershare Filmora 15.0.11 Crack for Mac Key Full Download [Latest] pptx
PPTX
NETWORKING SECURITY PRESENTATION FROM ALI).pptx
PDF
Architect Saleem khattak (Archi) Portfolio
PPTX
Dropshare 6.8.0 Crack for macOS Download
PDF
Cultural dimensions and global web user interface design
PPTX
CH 12 FASHION DESIGN AND MERCHANDIZING.pptx
PPTX
Become a Professional UI/UX Designer by Learning How to Create Beautiful, Use...
PDF
Casual Winter Collection 2024-25 Style Guid
 
PDF
PX vs EM vs REM - Battle of CSS Units - Which to Use When?
PDF
Criminal record certificate: no registration - College graduation Certified b...
PPTX
Test Powerpoint with embedded video.pptx
PPTX
Optimization of Lightweight Concrete Using Vermiculite, Silica Fume & Naphtha...
PPTX
THEORY OF ARCHITECTURE - LECTURE NOTES - SYMBOLISM
PPT
Affect of World Tourism on Climate Change.ppt
Creating Magical CSS-Only Image Tilt Effects No JavaScript Required.pdf
Moho Pro 14.4 Crack for MacOS Works Until 2050 [Latest] pptx
CleanMyMac X v5.2.8 Crack for MacOS Full Version [Latest] pptx
International Journal of Information Technology, Modeling and Computing (IJITMC)
Driver Easy Pro Key 7.1.0.2641 Full Mac Crack Free Activated Download [2026]....
WinRAR Crack 7.13 Final Mac Keygen 2026 Download [Latest] Software.pptx
Wondershare Filmora 15.0.11 Crack for Mac Key Full Download [Latest] pptx
NETWORKING SECURITY PRESENTATION FROM ALI).pptx
Architect Saleem khattak (Archi) Portfolio
Dropshare 6.8.0 Crack for macOS Download
Cultural dimensions and global web user interface design
CH 12 FASHION DESIGN AND MERCHANDIZING.pptx
Become a Professional UI/UX Designer by Learning How to Create Beautiful, Use...
Casual Winter Collection 2024-25 Style Guid
 
PX vs EM vs REM - Battle of CSS Units - Which to Use When?
Criminal record certificate: no registration - College graduation Certified b...
Test Powerpoint with embedded video.pptx
Optimization of Lightweight Concrete Using Vermiculite, Silica Fume & Naphtha...
THEORY OF ARCHITECTURE - LECTURE NOTES - SYMBOLISM
Affect of World Tourism on Climate Change.ppt

モダンなCSS設計パターンを考える


[8]ページ先頭

©2009-2025 Movatter.jp