Movatterモバイル変換


[0]ホーム

URL:


拓樹 谷, profile picture
Uploaded by拓樹 谷
11,221 views

Beyond CSS Architecture

The document is a slideshow presentation about CSS architecture techniques. It discusses object-oriented CSS (OOCSS), block element modifier (BEM), CSS preprocessor extensions of BEM, responsive design patterns, style guide generators, specificity graphs, critical path CSS extraction, and the potential of web components. The presentation emphasizes building modular, reusable CSS components and establishing consistent CSS methodologies and architectures.

Embed presentation

Downloaded 85 times
https://www.flickr.com/photos/stn1978/8899794454/Beyond CSS ArchitectureHiroki Tani, HTML5 Conference, Room B
Hiroki Tani@hiloki, Frontend Developer
https://frontendweekly.tokyo/@cssradar @t32k @hiloki
Vertical align
.selector {property: value;}
.selector {property: value;}
.author {…}Hiroki Tani
.author { ... }.login-user { ... }Hiroki TaniKoji Ishimoto
.author { ... }.login-user { ... }.comment-author { ... }
.author,.login-user,.comment-author {/* 共通のスタイル */}.author { ... }.login-user { ... }.comment-author { ... }
.author,.login-user,.comment-author,.entry-item,.bookmark,.more-uis… { ... }
OOCSSby Nicole Sullivanhttps://www.flickr.com/photos/premshree/3444104640/
.media { ... }.author { ... }.login-user { ... }Hiroki TaniKoji Ishimoto
.media {overflow: hidden; /* Clearfix */margin:10px;}.media .bd {overflow:hidden;}.media .img {float:left;margin-right: 10px;}.media .img img {display:block;}.media .imgExt {float:right; margin-left: 10px;}
<div class=“media author"><a class="img"><img /></a><div class="bd">...</div></div>
<div class="media author">...</div><div class=“media login-user">...</div>
BEMby Yandex
https://bem.info/
Hiroki TaniHiroki TaniBlockElementModifier
.media {overflow: hidden;margin:10px;}.media .bd {overflow:hidden;}.media .img {float:left;margin-right: 10px;}.media .img img {display:block;}.media .imgExt {float:right; margin-left: 10px;}
.media {overflow: hidden;margin:10px;}.media__body {overflow:hidden;}.media__image {float:left;margin-right: 10px;}.media__image img {display:block;}.media__image_extra {float:right; margin-left: 10px;}
<div class=“media author"><a class="img"><img /></a><div class="bd">...</div></div>
<div class=“media author"><a class="media__image"><img /></a><div class="media__body">...</div></div>
.media { /* 0,0,1,0 */overflow: hidden;margin:10px;}.media__body { /* 0,0,1,0 */overflow:hidden;}.media__image { /* 0,0,1,0 */float:left;margin-right: 10px;}.media__image img { /* 0,0,1,1 */display:block;}.media__image_extra { /* 0,0,1,0 */float:right; margin-left: 10px;}
<div class="media author"><a class="media__image author__image"><img /></a><div class="media__body">...</div></div>
“”Not all semantics need to be content-derived. Class names cannot be “unsemantic”.Whatever names are being used: they have meaning, they have purpose.Nicolas Gallagherhttp://nicolasgallagher.com/about-html-semantics-front-end-architecture/
CSS Preprocessor
<div class="author Media"><div class="author__image Media__image Avatar"><img src="author.jpg"></div><div class="author__body Media__body">...</div></div>
%Media {/* Media styles... */}%Media__image {/* Media image styles... */}%Media__body {/* Media body styles... */}%Avatar {/* Avatar styles... */}
.author {@extend %Media;/* .author styles... */}.author-image {@extend %Media__image;@extend %Avatar;/* .author-image styles... */}.author-body {@extend %Media__body;/* .author-body styles... */}
<div class="author Media"><div class="author-image Media__image Avatar"><img src="author.jpg"></div><div class="author-body Media__body">...</div></div>
.login-user {@extend %Media;/* .login-user styles... */}.login-user-image {@extend %Media__image;@extend %Avatar;/* .login-user-image styles... */}.login-user-body {@extend %Media__body;/* .login-user-body styles... */}
<div class="login-user"><div class="login-user-image"><img src="user.jpg"></div><p class="login-user-name">...</p></div>
.author, .login-user { /* Media styles... */ }.author-image, .login-user-image { /* Media image styles... */ }.author-body, .login-user-body { /* Media body styles... */ }.author-image, .login-user-image { /* Avatar styles... */ }.author { /* .author styles... */ }.author-image { /* .author-image styles... */ }.author-body { /* .author-body styles... */ }.login-user { /* .login-user styles... */ }.login-user-image { /* .login-user-image styles... */ }.login-user-body { /* .login-user-body styles... */ }
%Media.author .login-user
%Media.author .login-user {@extend .author;}
%Media.author.login-user.comment-author.entry-item.bookmark.more-uis
%Media.author.login-user.comment-author.entry-item.bookmark.more-uis
%Media.author.login-user.comment-author.entry-item.bookmark.more-uis
.mod_listType1 section,.mod_listType3 section,.mod_listType4section,.mod_listType5 section,.mod_listType7 section,.mod_listType8section{margin-bottom:1em}.mod_listType1 h1,.mod_listType3h1,.mod_listType4 h1,.mod_listType5 h1,.mod_listType7 h1,.mod_listType8h1{margin:0 0 .5em .5em;font-size:15px;-webkit-text-shadow:0 1px 0rgba(255,255,255,.75);text-shadow:0 1px 0rgba(255,255,255,.75)}.mod_listType1 ul,.mod_listType3ul,.mod_listType4 ul,.mod_listType5 ul,.mod_listType7 ul,.mod_listType8ul{background-color:#fff;border:1px solid#c3c3c3;overflow:hidden;border-radius:12px}.mod_listType1 ulli,.mod_listType3 ul li,.mod_listType4 ul li,.mod_listType5 ulli,.mod_listType7 ul li,.mod_listType8 ul li{border-top:#C3C3C2 1pxsolid;margin-top:-1px;margin-bottom:1px;font-size:16px}.mod_listType1ul li:first-child a.disable,.mod_listType1 ul li:last-childa.disable,.mod_listType3 ul li:first-child a.disable,.mod_listType3 ulli:last-child a.disable,.mod_listType4 ul li:first-childa.disable,.mod_listType4 ul li:last-child a.disable,.mod_listType5 ul
.mod_listType1 section,.mod_listType3 section,.mod_listType4section,.mod_listType5 section,.mod_listType7 section,.mod_listType8section{margin-bottom:1em}.mod_listType1 h1,.mod_listType3h1,.mod_listType4 h1,.mod_listType5 h1,.mod_listType7 h1,.mod_listType8h1{margin:0 0 .5em .5em;font-size:15px;-webkit-text-shadow:0 1px 0rgba(255,255,255,.75);text-shadow:0 1px 0rgba(255,255,255,.75)}.mod_listType1 ul,.mod_listType3ul,.mod_listType4 ul,.mod_listType5 ul,.mod_listType7 ul,.mod_listType8ul{background-color:#fff;border:1px solid#c3c3c3;overflow:hidden;border-radius:12px}.mod_listType1 ulli,.mod_listType3 ul li,.mod_listType4 ul li,.mod_listType5 ulli,.mod_listType7 ul li,.mod_listType8 ul li{border-top:#C3C3C2 1pxsolid;margin-top:-1px;margin-bottom:1px;font-size:16px}.mod_listType1ul li:first-child a.disable,.mod_listType1 ul li:last-childa.disable,.mod_listType3 ul li:first-child a.disable,.mod_listType3 ulli:last-child a.disable,.mod_listType4 ul li:first-childa.disable,.mod_listType4 ul li:last-child a.disable,.mod_listType5 ul440kbgziped
https://amcss.github.io/
<!-- class --><a class="btn btn-primary btn-lg">Large primary button</a><!-- attribute --><a am-Button="primary large">Large primary button</a>
[am-Button] {...}[am-Button~="primary"] {...}[am-Button~="large"] {...}
See also:CSS: Using every declaration just onceYACPhttps://developers.google.com/speed/articles/optimizing-csshttp://morishitter.hatenablog.com/entry/2014/12/02/000135http://hail2u.net/blog/webdesign/oocss-drawbacks-and-gifts-of-every-declaration-just-once.html
“”We’re not designing pages, we’re designing systems of components.Stephen Hay
http://smacss.com/
https://github.com/hiloki/flocss
ITCSSby Harry Roberts a.k.a. CSS Wizardlyhttps://www.flickr.com/photos/stn1978/8899794454/
http://itcss.io/
https://speakerdeck.com/dafed/managing-css-projects-with-itcss
SettingToolsGenericBaseObjectsComponentsTrumps
!"" _base.links.scss!"" _base.page.scss!"" _base.quotes.scss!"" _base.type.scss!"" _components.ads.scss!"" ...!"" _components.promo.scss!"" _components.pull-quote.scss!"" _components.site-nav.scss!"" _components.sprites.scss!"" _objects.wrappers.scss!"" _settings.colors.scss!"" _settings.global.scss!"" _tools.aliases.scss!"" _tools.mixins.scss!"" _trumps.show-hide.scss!"" _trumps.widths-responsive.scss#"" csswizardry.scss
/*** #SETTINGS*/@import "bower_components/inuit-defaults/settings.defaults";@import "settings.global";@import "settings.colors";@import "bower_components/inuit-responsive-settings/settings.responsive";/*** #TOOLS*/@import "bower_components/inuit-functions/tools.functions";@import "bower_components/inuit-mixins/tools.mixins";@import "tools.mixins";@import "bower_components/inuit-responsive-tools/tools.responsive";@import "tools.aliases";/*** #GENERIC*/@import "bower_components/inuit-normalize/generic.normalize";@import "bower_components/inuit-reset/generic.reset";@import "bower_components/inuit-box-sizing/generic.box-sizing";@import "bower_components/inuit-shared/generic.shared";
http://bradfrost.com/See also:Atomic DesignFUN CSShttp://bradfrost.com/blog/post/atomic-web-design/http://benfrain.com/fun-css-naming-convention-explained/
Styleguide
http://ux.mailchimp.com/patterns/
http://styleguides.io/examples.html
StyleguideStatic
StyleguideLivingGenerator
http://trulia.github.io/hologram/
/*doc---title: Buttonsname: buttoncategory: Base CSS---Button styles can be applied to any element. Typically you'llwant touse either a `<button>` or an `<a>` element:```html_example<button class="btn btnDefault">Click</button><a class="btn btnPrimary" href="http://trulia.com">Trulia!</a>```*/
/*doc---title: Buttonsname: buttoncategory: Base CSS---Button styles can be applied to any element. Typically you'llwant touse either a `<button>` or an `<a>` element:```html_example<button class="btn btnDefault">Click</button><a class="btn btnPrimary" href="http://trulia.com">Trulia!</a>```*/
http://bradfrost.com/See also:Pattern LabFrontnotehttp://patternlab.io/http://frontainer.com/frontnote/
Specificity Graph
http://csswizardry.com/2014/10/the-specificity-graph/
SpecificityLocation in Stylesheet
SpecificityLocation in Stylesheetul {margin: 0;}
SpecificityLocation in Stylesheet.item {border: 1px solid #999;}
SpecificityLocation in Stylesheet.item.selected {background: #eee;}
SpecificityLocation in Stylesheet.heading {font-size: 24px;}
SpecificityLocation in Stylesheet#feature {background: #FC0;}
SpecificityLocation in Stylesheet#feature .heading {color: #000;}
http://jonassebastianohlsson.com/specificity-graph/
See also:Specificity graphCSS specificity graphshttp://snook.ca/archives/html_and_css/specificity-graphshttps://decadecity.net/blog/2014/11/26/css-specificity-graphs
Statistical tool
http://www.stylestats.org/
http://cssstats.com
See also:CSS DigParkerhttp://cssdig.com/https://github.com/katiefenn/parker
https://developers.google.com/web/fundamentals/performance/critical-rendering-path
http://goo.gl/ycf4WU
https://developers.google.com/speed/pagespeed/insights/
http://www.smashingmagazine.com/
http://jonassebastianohlsson.com/criticalpathcssgenerator/
BeforeAfterhttp://goo.gl/9DbbVs
http://bradfrost.com/See also:PentohouseCriticalCritical CSShttps://github.com/pocketjoso/penthousehttps://github.com/addyosmani/criticalhttps://github.com/filamentgroup/criticalcss
http://webcomponents.org/
“ ”Every line of CSS you write is a suggestion.Jeremy Keithhttps://adactio.com/journal/7653
https://www.flickr.com/photos/pgoyette/5911926699/Thankstwitter.com/hilokigithub.com/hiloki

Recommended

PDF
Progressive Prototyping w/HTML5, CSS3 and jQuery
KEY
Slow kinda sucks
PDF
モダンなCSS設計パターンを考える
PDF
モダンなCSS設計パターンを考える
PDF
Prototyping w/HTML5 and CSS3
PPTX
Rapid and Responsive - UX to Prototype with Bootstrap
PDF
Try Web Components
PDF
CSSプリプロセッサの取扱説明書
PDF
Intro to web dev
PDF
Rapid HTML Prototyping with Bootstrap - Chris Griffith
PDF
CSS in React - The Good, The Bad, and The Ugly
PDF
CSS framework By Palash
PDF
CSS in React
PPTX
Basics of Front End Web Dev PowerPoint
PDF
Highly Maintainable, Efficient, and Optimized CSS
PDF
HTML5 & CSS3 Flag
PDF
WordPress-Templates mit Twig erstellen - PHPUGFFM
PDF
Html5 ux london
PPTX
PDF
Bilder einbinden ist kein Thema, oder?
PDF
The Thinking behind BEM
PDF
Whirlwind Tour of SVG (plus RaphaelJS)
PDF
Você precisa aprender Web
PDF
Guia de Sobrevivência JS no mundo Open Source
PPTX
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
PDF
Real World Web Standards
 
PDF
ActiveDOM
PDF
High-Quality JavaScript
PDF
【ハンズオン】jQuery+HTML5 APIでスライドショーを作ろう
PDF
人と向き合うプロトタイピング

More Related Content

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

What's hot

PDF
Intro to web dev
PDF
Rapid HTML Prototyping with Bootstrap - Chris Griffith
PDF
CSS in React - The Good, The Bad, and The Ugly
PDF
CSS framework By Palash
PDF
CSS in React
PPTX
Basics of Front End Web Dev PowerPoint
PDF
Highly Maintainable, Efficient, and Optimized CSS
PDF
HTML5 & CSS3 Flag
PDF
WordPress-Templates mit Twig erstellen - PHPUGFFM
PDF
Html5 ux london
PPTX
PDF
Bilder einbinden ist kein Thema, oder?
PDF
The Thinking behind BEM
PDF
Whirlwind Tour of SVG (plus RaphaelJS)
PDF
Você precisa aprender Web
PDF
Guia de Sobrevivência JS no mundo Open Source
PPTX
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
PDF
Real World Web Standards
 
PDF
ActiveDOM
PDF
High-Quality JavaScript
Intro to web dev
Rapid HTML Prototyping with Bootstrap - Chris Griffith
CSS in React - The Good, The Bad, and The Ugly
CSS framework By Palash
CSS in React
Basics of Front End Web Dev PowerPoint
Highly Maintainable, Efficient, and Optimized CSS
HTML5 & CSS3 Flag
WordPress-Templates mit Twig erstellen - PHPUGFFM
Html5 ux london
Bilder einbinden ist kein Thema, oder?
The Thinking behind BEM
Whirlwind Tour of SVG (plus RaphaelJS)
Você precisa aprender Web
Guia de Sobrevivência JS no mundo Open Source
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
Real World Web Standards
 
ActiveDOM
High-Quality JavaScript

Viewers also liked

PDF
【ハンズオン】jQuery+HTML5 APIでスライドショーを作ろう
PDF
人と向き合うプロトタイピング
PDF
コーディングを考慮したWebデザインガイドライン
PDF
コンポーネント指向と余白の設計
PDF
Webライティング11のルール
PDF
あなたのチームの「いい人」は機能していますか?
PDF
誰に何を伝える?わたしの デザインコンセプトの 作り方、探し方
PDF
CSS設計の理想と現実
PDF
Polymerで作る次世代ウェブサイト
PDF
Web of Technologies
PDF
課題を導き出す魔法のシートの作り方
PDF
HTML5 Conference 2015 Design Sprint
【ハンズオン】jQuery+HTML5 APIでスライドショーを作ろう
人と向き合うプロトタイピング
コーディングを考慮したWebデザインガイドライン
コンポーネント指向と余白の設計
Webライティング11のルール
あなたのチームの「いい人」は機能していますか?
誰に何を伝える?わたしの デザインコンセプトの 作り方、探し方
CSS設計の理想と現実
Polymerで作る次世代ウェブサイト
Web of Technologies
課題を導き出す魔法のシートの作り方
HTML5 Conference 2015 Design Sprint

Similar to Beyond CSS Architecture

PPTX
Css3
PDF
Lab 7 CSS (Cascading Style Sheets) CSS Neew .pdf
PPTX
Introducing Cascading Style Sheets
PDF
Html standards presentation
PDF
Create a landing page
PDF
Front End Best Practices
DOCX
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
PDF
SMACSS Workshop
PDF
Making Links Magical Again with CSS
PDF
Class 4 handout two column layout w mobile web design
PDF
Accelerated Stylesheets
PPT
Css best practices style guide and tips
PPT
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
PDF
CSS- Smacss Design Rule
PPTX
Introduction to CSS3
 
PDF
Responsive web design
PDF
OOScss Architecture For Rails Apps
PDF
Building Better Responsive Websites
PDF
More of less (take 2)
Css3
Lab 7 CSS (Cascading Style Sheets) CSS Neew .pdf
Introducing Cascading Style Sheets
Html standards presentation
Create a landing page
Front End Best Practices
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
SMACSS Workshop
Making Links Magical Again with CSS
Class 4 handout two column layout w mobile web design
Accelerated Stylesheets
Css best practices style guide and tips
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
CSS- Smacss Design Rule
Introduction to CSS3
 
Responsive web design
OOScss Architecture For Rails Apps
Building Better Responsive Websites
More of less (take 2)

More from 拓樹 谷

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

Recently uploaded

PDF
Advanced Prompt Engineering: The Art and Science
PDF
SecureChain AI (SCAI) Token – Smart Contract Security Audit Report by EtherAu...
PDF
Blueprint to build quality before the code exists - StackConnect Milan 2025
PDF
How Does AI Improve Location-Based Mobile App Development for Businesses.pdf
PDF
Imed Eddine Bouchoucha | computer engineer | software Architect
PPTX
Application Security – Static Application Security Testing (SAST)
PPT
This-Project-Demonstrates-How-to-Create.ppt
PDF
API_SECURITY CONSULTANCY SERVICES IN USA
PPTX
Struggling with Pentaho Limitations How Helical Insight Solves Them.pptx
PDF
How Modern Custom Software is Revolutionizing Mortgage Lending Processes -Ma...
PPTX
GDS Integration Solution | GDS Integration Service
DOCX
How to Change Classic SharePoint to Modern SharePoint (An Updated Guide)
PDF
Database Management Systems(DBMS):UNIT-I Introduction to Database(DBMS) BCA S...
PPTX
Managed Splunk Partner vs In-House: Cost, Risk & Value Comparison
PDF
Why Zoho Notebook’s AI-Fueled Upgrade Matters for Knowledge Workers in 2026
PPTX
#15 All About Anypoint MQ - Calicut MuleSoft Meetup Group
PDF
Data structure using C :UNIT-I Introduction to Data structures and Stacks BCA...
PDF
Resource-Levelled Critical-Path Analysis Balancing Time, Cost and Constraints
PDF
Operating System (OS) :UNIT-I Introduction to Operating System BCA SEP SEM-II...
PPTX
Lecture 3 - Scheduling - Operating System
Advanced Prompt Engineering: The Art and Science
SecureChain AI (SCAI) Token – Smart Contract Security Audit Report by EtherAu...
Blueprint to build quality before the code exists - StackConnect Milan 2025
How Does AI Improve Location-Based Mobile App Development for Businesses.pdf
Imed Eddine Bouchoucha | computer engineer | software Architect
Application Security – Static Application Security Testing (SAST)
This-Project-Demonstrates-How-to-Create.ppt
API_SECURITY CONSULTANCY SERVICES IN USA
Struggling with Pentaho Limitations How Helical Insight Solves Them.pptx
How Modern Custom Software is Revolutionizing Mortgage Lending Processes -Ma...
GDS Integration Solution | GDS Integration Service
How to Change Classic SharePoint to Modern SharePoint (An Updated Guide)
Database Management Systems(DBMS):UNIT-I Introduction to Database(DBMS) BCA S...
Managed Splunk Partner vs In-House: Cost, Risk & Value Comparison
Why Zoho Notebook’s AI-Fueled Upgrade Matters for Knowledge Workers in 2026
#15 All About Anypoint MQ - Calicut MuleSoft Meetup Group
Data structure using C :UNIT-I Introduction to Data structures and Stacks BCA...
Resource-Levelled Critical-Path Analysis Balancing Time, Cost and Constraints
Operating System (OS) :UNIT-I Introduction to Operating System BCA SEP SEM-II...
Lecture 3 - Scheduling - Operating System

Beyond CSS Architecture


[8]ページ先頭

©2009-2025 Movatter.jp