SlideShare a Scribd company logo
백성훈Seonghoon Baek
CSS 와 BEM
CSS의 의미와 특징
CSS의 방법론과 BEM
CSS Modules
BEM과 CSS Modules
CSS
Presentation
Sizing
Positioning
CSS for Presentation
Painting
Responsive
CSS for Presentation
Functions
Dynamic control
CSS의 의미
CascadingStyleSheet
CascadingStyleSheet
inheritance
Cascade rules
user-agent
inheritance
Cascade rules
user-agent
selectors
inheritance
Cascade rules
user-agent
selectors
source order
inheritance
Cascade rules
user-agent
inline
selectors
source order
inheritance
Cascade rules
!important
user-agent
inline
selectors
source order
inheritance
Cascade rules
Cascading
user-agent
inline
selectors
inheritance
CSS의특징
!important
inline
selectors
source order
inheritance
Cascade rules
user-agent
CSS의 특징
GlobalNamespace
CSS의 확장
implicit dependencies
Dead Code
Global Namespace
Restyling
implicit dependencies
Dead Code
Global Namespace
CSS의 확장
Readable
less calculate
Sustainable
Isolation
Restyling
Design Methodology
Naming Convention / File Structure
Naming Convention
Naming Convention
.navigation > div
Naming Convention
> div.navigation
?
Naming Convention
1. 의미있는 단어로 지정해야 합니다.
Naming Convention
.navigation > div:not(.logo)
less calculate
.item
.item
.logo
.item
.navigation > div:not(.logo)
less calculate
.item
.item
.logo
.navigation > div:not(.logo)
.item
less calculate
.item
.item
.logo
.navigation > div:not(.logo)
.item
Event & Restyling
less calculate
2. 선택자의 복잡성은 웹 성능을 저하시킨다.
Naming Convention
1. 의미있는 단어로 이름을 짓자.
2. 선택자의 복잡성을 줄이자.
B E M
BEM ?
BEM ?
1. Unintentional dependencies
2. Long cascade rules
3. An out of control Classes
BEM ?
HTML-Interface
BEM ?
Block+Block+Block
Block+Block+Block
BEM ?
Block+Block+Block
BEM ?
Block
Element
Modifier
BEM ?
Block__Element—Modifier
BEM ?
Block__Element—Modifier
B- independentanywhereonthepage
BEM ?
B- independentanywhereonthepage = Component
BEM ?
BEM
.navigation
B- independentanywhereonthepage = Component
E- nomeaningonitsown,it’snameofapartforfunction
BEM ?
BEM
.navigation
.navigation__link
B- independentanywhereonthepage = Component
E- nomeaningonitsown,it’snameofapartforfunction
M-differentversionofablockoranelement
BEM ?
BEM
.navigation
.navigation__link
.navigation__link—active
1.Useclassnameselectoronly
A rules of BEM
2.Notagnameorids
3.Nodependencyonotherblocks/elementsonapage
.navigation
.navigation—item
.navigation—item__last
.navigation
.item:nth-last-child(1)
.item
BEM is
.navigation
.navigation—item
Readable
less calculate
Sustainable
Isolation
.navigation—item__last
BEM is
Preprocessor
BEM and
BEM and
BEM and
.navigation {
&—item {
&__last {
}
}
}
.navigation
.navigation—item
.navigation—item__last
SASS CSS
BEM Examples
BEM Examples
Navigation
BEM Examples
Navigation
Navigation__inner
Navigation__logo Navigation__links
BEM Examples
Navigation
Navigation__inner
Navigation__logo Navigation__linksNavigation__link—active Navigation__link
예제를 더 보기쉽게 박스
FileStructure
File Structure
File Structure
File Structure
ComponentDrivenDesign
File Structure
Component
Components
CSS
Javascript
HTML
CSS
Javascript
HTML
+
BME Examples
CSS와 BEM
CSS and BEM
CSS문제를 CSS로
개발자의 인지적 노력
Preprocessor
Out of CSS
Out of CSS
In Javascript
in javascript with Webpack
CSS와 BEM
Plugins in Webpack
CSS Modules in Webpack
CSS Modules in Webpack
header.scss
CSS Modules in Webpack
Filename Class HashComponent =
CSS Modules
Plugins
Readable
less calculate
Sustainable
Isolation
CSS Modules
CSS and CSS Modules
Webpack 학습, 제한적 환경
No more conflicts.
CSS in JS with Webpack
BEM과 CSS Modules
BEM과 CSS Modules
header__container___2TL19navigation__navigation-links
BEM과 CSS Modules
in CSS in Javascript
개발자의 인지적 노력 Webpack
별다른 도구 없이 웹팩, 바벨, 플러그인....
BEM과 CSS Modules
나에게 맞는 걸 선택하자.
implicit dependencies
Dead Code
Global Namespace
CSS를 이해하자
Readable
less calculate
Sustainable
Isolation
Restyling
CSS와 BEM
CSS의 의미와 특징
CSS의 방법론과 BEM
CSS Modules
BEM과 CSS Modules
Q & A
Github : https://github.com/Lutece
e-mail : lallaworld1st@gmail.com
발표 후 많은 분들이 질문을 해주셨는데 시간이 없어
모두 답변하지 못해 많이 아쉬웠습니다.
그래서 질문을 위한 저장소를 만들었습니다.
URL : https://github.com/Lutece/Ask-for-everything
이 곳에서 Issues에 질문을 올려주시면 시간이 되는대로 꼭 답변해드리겠습니다.
(저는 github를 상시에 확인합니다.)
경청해주신 모든 분들께 감사드립니다.
감사합니다.

More Related Content

PDF
redis 소개자료 - 네오클로바
PDF
AWS OpsWorksハンズオン
PDF
스타트업 사례로 본 로그 데이터 분석 : Tajo on AWS
PPTX
클라우드 컴퓨팅 환경에서의 미터링 공개용
PDF
[네이버클라우드플랫폼 온라인 교육 시리즈] 네이버클라우드플랫폼 CLI 소개 및 활용
PDF
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
PDF
네이버 클라우드 플랫폼의 서비스 전략(공공, Cloud Connect)
PDF
[2018] MySQL 이중화 진화기
redis 소개자료 - 네오클로바
AWS OpsWorksハンズオン
스타트업 사례로 본 로그 데이터 분석 : Tajo on AWS
클라우드 컴퓨팅 환경에서의 미터링 공개용
[네이버클라우드플랫폼 온라인 교육 시리즈] 네이버클라우드플랫폼 CLI 소개 및 활용
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
네이버 클라우드 플랫폼의 서비스 전략(공공, Cloud Connect)
[2018] MySQL 이중화 진화기

What's hot (20)

PDF
ksqlDB로 실시간 데이터 변환 및 스트림 처리
PDF
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
PDF
[2017 AWS Startup Day] AWS 비용 최대 90% 절감하기: 스팟 인스턴스 Deep-Dive
PPTX
서비스 모니터링 구현 사례 공유 - Realtime log monitoring platform-PMon을 ...
PPTX
How to Optimize Your Metadata and Taxonomy
PDF
Aws Architecture Fundamentals
PDF
왜 네이버클라우드플랫폼인가?(박기은 CTO) - 대구 Cloud Innovation summit
PDF
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
PDF
AWS Black Belt Online Seminar 2016 AWS CloudFormation
PDF
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
PDF
MSA 전략 2: 마이크로서비스, 어떻게 구현할 것인가?
PDF
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
PPTX
Kubernetes introduction
PDF
PDSを実現するにあたっての技術動向の紹介 (OAuth, OpenID Connect, UMAなど)
PDF
20191127 AWS Black Belt Online Seminar Amazon CloudWatch Container Insights で...
PPTX
RedisConf17- Using Redis at scale @ Twitter
PDF
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
PDF
고객의 플랫폼/서비스를 개선한 국내 사례 살펴보기 – 장준성 AWS 솔루션즈 아키텍트, 강산아 NDREAM 팀장, 송영호 야놀자 매니저, ...
PDF
서버리스 기반 데이터베이스 모델링 및 운영 노하우 알아보기 - 변규현 SW 엔지니어, 당근마켓 / 김선형 CTO, 티클 :: AWS Sum...
PDF
The benefits of BEM CSS
ksqlDB로 실시간 데이터 변환 및 스트림 처리
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...
[2017 AWS Startup Day] AWS 비용 최대 90% 절감하기: 스팟 인스턴스 Deep-Dive
서비스 모니터링 구현 사례 공유 - Realtime log monitoring platform-PMon을 ...
How to Optimize Your Metadata and Taxonomy
Aws Architecture Fundamentals
왜 네이버클라우드플랫폼인가?(박기은 CTO) - 대구 Cloud Innovation summit
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
AWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
MSA 전략 2: 마이크로서비스, 어떻게 구현할 것인가?
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
Kubernetes introduction
PDSを実現するにあたっての技術動向の紹介 (OAuth, OpenID Connect, UMAなど)
20191127 AWS Black Belt Online Seminar Amazon CloudWatch Container Insights で...
RedisConf17- Using Redis at scale @ Twitter
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
고객의 플랫폼/서비스를 개선한 국내 사례 살펴보기 – 장준성 AWS 솔루션즈 아키텍트, 강산아 NDREAM 팀장, 송영호 야놀자 매니저, ...
서버리스 기반 데이터베이스 모델링 및 운영 노하우 알아보기 - 변규현 SW 엔지니어, 당근마켓 / 김선형 CTO, 티클 :: AWS Sum...
The benefits of BEM CSS
Ad

Similar to CSS와 BEM (20)

PPTX
The Cascade is Dead
PDF
HTML and CSS Coding Standards
PDF
BEM Methodology — @Frontenders Ticino —17/09/2014
PDF
Styling Components with JavaScript: MelbCSS Edition
PDF
Css Systems
PDF
How to write css
PDF
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
PDF
OOCSS, SMACSS or BEM, what is the question...
PDF
OOCSS, SMACSS or BEM?
PDF
Learn SUIT: CSS Naming Convention
PDF
CSS & eCSStender [CSS Summit 2011]
KEY
Sass Essentials at Mobile Camp LA
PPTX
Rock Solid CSS Architecture
KEY
Authoring Stylesheets with Compass & Sass
PDF
Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
PDF
Giacomo Zinetti - 1001 ways to write CSS today - Codemotion Rome 2019
PPTX
SCSS Implementation
PPTX
Mastering CSS for Backend Developers.pptx
PPT
CSS Methodology
The Cascade is Dead
HTML and CSS Coding Standards
BEM Methodology — @Frontenders Ticino —17/09/2014
Styling Components with JavaScript: MelbCSS Edition
Css Systems
How to write css
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
OOCSS, SMACSS or BEM, what is the question...
OOCSS, SMACSS or BEM?
Learn SUIT: CSS Naming Convention
CSS & eCSStender [CSS Summit 2011]
Sass Essentials at Mobile Camp LA
Rock Solid CSS Architecture
Authoring Stylesheets with Compass & Sass
Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
Giacomo Zinetti - 1001 ways to write CSS today - Codemotion Rome 2019
SCSS Implementation
Mastering CSS for Backend Developers.pptx
CSS Methodology
Ad

More from 성훈 백 (6)

PDF
GDSC_백성훈.pdf
PDF
Frontend test-environment 이해하기
PDF
GraphQL이란?
PDF
Css system
PDF
Es6 module
PDF
CSS Rendering - 1
GDSC_백성훈.pdf
Frontend test-environment 이해하기
GraphQL이란?
Css system
Es6 module
CSS Rendering - 1

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
Tartificialntelligence_presentation.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
MIND Revenue Release Quarter 2 2025 Press Release
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
A comparative analysis of optical character recognition models for extracting...
Empathic Computing: Creating Shared Understanding
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Assigned Numbers - 2025 - Bluetooth® Document
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars

CSS와 BEM