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
モダンなCSS設計パターンを考える
PDF
モダンなCSS設計パターンを考える
PDF
Try Web Components
PDF
CSSプリプロセッサの取扱説明書
KEY
Slow kinda sucks
PPTX
Rapid and Responsive - UX to Prototype with Bootstrap
PDF
Prototyping w/HTML5 and CSS3
PDF
Progressive Prototyping w/HTML5, CSS3 and jQuery
PDF
Html5 ux london
PDF
Rapid HTML Prototyping with Bootstrap - Chris Griffith
PDF
High-Quality JavaScript
PDF
Whirlwind Tour of SVG (plus RaphaelJS)
PPTX
iPhone Web Applications: HTML5, CSS3 & dev tips for iPhone development
PDF
CSS in React
PDF
Você precisa aprender Web
PDF
CSS in React - The Good, The Bad, and The Ugly
PPTX
PPTX
Basics of Front End Web Dev PowerPoint
PDF
CSS framework By Palash
PDF
WordPress-Templates mit Twig erstellen - PHPUGFFM
PDF
ActiveDOM
PDF
Intro to web dev
PDF
Real World Web Standards
 
PDF
Highly Maintainable, Efficient, and Optimized CSS
PDF
Guia de Sobrevivência JS no mundo Open Source
PDF
HTML5 & CSS3 Flag
PDF
The Thinking behind BEM
PDF
Bilder einbinden ist kein Thema, oder?
PDF
HTML5 Conference 2015 Design Sprint
PDF
Web of Technologies

More Related Content

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

What's hot

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

Viewers also liked

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

Similar to Beyond CSS Architecture

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

More from 拓樹 谷

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

Recently uploaded

PDF
SecureChain AI (SCAI) Token – Smart Contract Security Audit Report by EtherAu...
PPTX
Modern Claims Automation Solutions for Operational Agility
PDF
Resource-Levelled Critical-Path Analysis Balancing Time, Cost and Constraints
PPTX
AI Clinic Management Software for Pulmonology Clinics Bringing Clarity, Contr...
PDF
IT Estate Modernization: Transform Your Infrastructure for the Future .pdf
PDF
Advanced Prompt Engineering: The Art and Science
PDF
Here’s the case study that shows how companies lose ₹2–6 Cr annually due to m...
PDF
Data structure using C :UNIT-I Introduction to Data structures and Stacks BCA...
PPTX
Magnet-AXIOM_overview_tool_cyber_tool.pptx
PDF
Operating System (OS) :UNIT-I Introduction to Operating System BCA SEP SEM-II...
PPTX
Why Your Business Needs Snowflake Consulting_ From Data Silos to AI-Ready Cloud
 
PDF
Influence Without Power - Why Empathy is Your Best Friend.pdf
PDF
Intelligent CRM for Insurance Brokers: Managing Clients with Precision
PPTX
Deep Dive into Durable Functions, presented at Cloudbrew 2025
DOCX
How to Change Classic SharePoint to Modern SharePoint (An Updated Guide)
PPTX
#15 All About Anypoint MQ - Calicut MuleSoft Meetup Group
PPTX
Managed Splunk Partner vs In-House: Cost, Risk & Value Comparison
PDF
How Does AI Improve Location-Based Mobile App Development for Businesses.pdf
PDF
How Modern Custom Software is Revolutionizing Mortgage Lending Processes -Ma...
PDF
Virtual Study Circles Innovative Ways to Collaborate Online.pdf
SecureChain AI (SCAI) Token – Smart Contract Security Audit Report by EtherAu...
Modern Claims Automation Solutions for Operational Agility
Resource-Levelled Critical-Path Analysis Balancing Time, Cost and Constraints
AI Clinic Management Software for Pulmonology Clinics Bringing Clarity, Contr...
IT Estate Modernization: Transform Your Infrastructure for the Future .pdf
Advanced Prompt Engineering: The Art and Science
Here’s the case study that shows how companies lose ₹2–6 Cr annually due to m...
Data structure using C :UNIT-I Introduction to Data structures and Stacks BCA...
Magnet-AXIOM_overview_tool_cyber_tool.pptx
Operating System (OS) :UNIT-I Introduction to Operating System BCA SEP SEM-II...
Why Your Business Needs Snowflake Consulting_ From Data Silos to AI-Ready Cloud
 
Influence Without Power - Why Empathy is Your Best Friend.pdf
Intelligent CRM for Insurance Brokers: Managing Clients with Precision
Deep Dive into Durable Functions, presented at Cloudbrew 2025
How to Change Classic SharePoint to Modern SharePoint (An Updated Guide)
#15 All About Anypoint MQ - Calicut MuleSoft Meetup Group
Managed Splunk Partner vs In-House: Cost, Risk & Value Comparison
How Does AI Improve Location-Based Mobile App Development for Businesses.pdf
How Modern Custom Software is Revolutionizing Mortgage Lending Processes -Ma...
Virtual Study Circles Innovative Ways to Collaborate Online.pdf

Beyond CSS Architecture


[8]ページ先頭

©2009-2025 Movatter.jp