SlideShare a Scribd company logo
The Thinking behind BEM
({
name: "Varvara Stepanova",
email: "toivonen@yandex-team.ru",
twitter: "@toivonens"
});

2
Search
Images

Video

Realty

Blogs

Apps

Jobs

• Russia
• Turkey
• Ukraine
• Belarus
Maps
• Kazakhstan
• Azerbaijan
3

Social

• 2000 devs
• 150+ frontenders
• 100+ services
Mail

Marketplace

etc.
The thinking behind BEM
#b_ #askbem @bem_en
UI Framework Team Leader
Varvara Stepanova

Recommended for you

Convidar para page !!
Convidar para page !!Convidar para page !!
Convidar para page !!

The document programmatically adds audio and buttons to a webpage. It likes and follows Facebook pages and profiles, invites friends to like a page, and displays status updates.

#tnc
ASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server Database

ASP.Net using Visual Studio.net to move data to and from a SQL Server Database. (C#, HTML, CSS) Send an Email from a transaction.

sqlt-sqlc#
Jquery 5
Jquery 5Jquery 5
Jquery 5

The document discusses various jQuery UI widgets including tabbed panels, accordion panels, date pickers, sliders, and progress bars. It provides instructions on how to set up and configure each widget with examples of the required HTML, JavaScript, and options. The widgets can be used to create interactive user interfaces for applications.

jquery
Block • Element • Modifier
5
Page of independent blocks

6
Page of independent blocks
page.html

<body class="page">
<div class="header">
<img class="logo" ... />
<div class="search">...</div>
<div class="menu">...</div>
</div>
<div class="layout">
<div class="sidebar">...</div>
<div class="menu">...</div>
</div>
</body>
7
Block with elements

8

Recommended for you

The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)

This document summarizes a high level web framework called go-start that was created for the Go programming language. Some key points: - It aims to provide a high level framework like Django or Rails that is easy to setup and deploy while staying true to Go conventions. - It uses MVC architecture and prefers Go syntax over template languages for views. It includes HTML5 Boilerplate, jQuery and handles external dependencies. - Views can be defined using Go syntax and DOM representations on the server. Common widgets like lists, tables and forms are provided at a higher level. - Models are Go structs with validation via reflection and shared between forms and the MongoDB database. - Routing

golang
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンな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.

css
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書

The document discusses CSS preprocessors like Sass, LESS, and Stylus. It explains that preprocessors allow for features not available in regular CSS like variables, nesting, mixins and more. It provides examples of how preprocessors make CSS more modular and reusable by allowing things like defining colors as variables and creating mixins for common CSS properties. The document is intended to teach developers how to use preprocessors to write more efficient CSS code.

csscssプリプロセッサcss preprocessor
Block with elements
page.html

<div class="tabbed-pane">
<ul>
<li class="tabbed-pane__tab">Tab1</li>
<li class="tabbed-pane__tab">Tab2</li>
</ul>
<div class="tabbed-pane__panel">
...
</div>
</div>

9
Modifiers change blocks and elements
<div class="
tabbed-pane
tabbed-pane_theme_blue">
...
</div>
<div class="
tabbed-pane
tabbed-pane_to_bottom">
...
</div>
10
http://bem.info
11
Thinking of...
1. Development semantics
2. Doing magic
3. Design philosophy

Recommended for you

J Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham SiddiquiJ Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham Siddiqui

JQuery is a JavaScript library that makes it easier to use JavaScript on websites. It allows developers to select HTML elements and perform actions on them with simple method calls. Some key points covered include how to include JQuery in an HTML page, common selectors to select elements, and examples of using JQuery to modify CSS styles and handle events like clicks and hovers. Events in JQuery allow responding to user actions, and methods like hide(), show(), toggle() allow changing the visibility of elements.

itinformation technologyjquery
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL

After a brief introduction into the history of Database Management Systems different types of NoSQL data stores are characterized. Theoretical background information about sharding mechanisms, horizontal scaling and the CAP theorem are getting explained. After a comparison of different NoSQL stores you will get to know the pros and cons of the different approaches and you will learn how to take the decision for the best fitting database in your project.

mongodbgoogle bigtablekey value database
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...

Troy Lea's presentation on JavaScript and jQuery - Nagios XI Tips, Tricks and How-To. The presentation was given during the Nagios World Conference North America held Oct 13th - Oct 16th, 2014 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/conference

conferencenagios world conferencenwcna
Development semantics
Block, element, modifier

14
CSS

pseudoCSS

.t-pane {
width: 200px;
&_theme {
&_blue {
background: #9cf;
}
}
&__tab {
display: inline-block;
}
15

.t-pane {
width: 200px;
}
.t-pane_theme_blue {
background: #9cf;
}
.t-pane__tab {
display: inline-block;
}
Take a block, take its element, do this!
JavaScript

$block('tabbed-pane')
.elem('tab')
.click(...);
$block('tabbed-pane')
.setMod('view', 'flipped');
$block('tabbed-pane')
.elem('tab')
.setMod('current');

16

Recommended for you

Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners

Are you new to Joomla! template designing and keen to learn how to go about creating one? This is beginner-level training for Joomla! template developers conducted on 2 Oct 2010 for free. Slashes and Dots provide Joomla training on demand basis and free Joomla! related training from time to time

jomsocialjoomla trainingjoomla template design
Stole16
Stole16Stole16
Stole16

The document appears to be a collection of HTML code snippets and text relating to stock charts, floor monitors, orders, buttons, images, tables, forms and text editors. It includes code for things like drop down menus, modals, overlays and text formatting. The document contains a variety of technical HTML and code examples but lacks a clear overall purpose or narrative.

TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08

TinyMCE is a WYSIWYG HTML editor that can be easily embedded into web pages. It allows editing content directly in the browser and includes features like plugins, themes, and customization options. The document provides instructions on how to initialize TinyMCE, manipulate content programmatically, handle loading and saving, configure options, and create custom plugins.

editortinymcejavascript
Multiple technologies
tabbed-pane/
tabbed-pane.css
tabbed-pane.js
tabbed-pane.bemhtml
tabbed-pane.md
logo/
logo.png
logo.css
logo.bemhtml
logo.md
17

search/
search__autocomplete.css
search__autocomplete.js
search__autocomplete.md
search.css
search.js
search.bemhtml
search.md
Blocks are consistent components
...
<div class="tabbed-pane"> ... </div>
...

• internal structure
• associated view
• corresponding behavior
18
Doing magic
Doing magic

Robots and people

Who serves whom?!

Recommended for you

WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML Semantics

Many (most?) developers make the effort to choose HTML elements that best describe the structure and semantics of the content. They then use CSS to set the layout for the visual design. What they don’t know is how browsers use that CSS to break the HTML semantics. I will demonstrate issues and offer unfortunate workarounds.

htmlcssbrowsers
Module design & UI Dev patterns
Module design & UI Dev patternsModule design & UI Dev patterns
Module design & UI Dev patterns

The document discusses common issues that arise when designers and developers work together to build interfaces without proper design systems, standards and collaboration processes in place. It provides examples of code produced by two different developers to style similar promotional widgets, showing problems like duplication, overuse of IDs, fragile CSS and lack of reuse. The examples are meant to illustrate how inconsistent approaches between designers and developers can lead to quality, maintenance and technical issues if interfaces are not built from agreed upon specifications.

htmlcsssass
CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics

Developers who choose HTML elements that best describe a screen’s structure and semantics often don’t know how browsers use their CSS to break those semantics.

cssaccessibilityhtml
Заголовок (не длинней одной строки)

Do we like what robots like?
Tidy CSS code
• YUI Compressor
• clean-css
• Microsoft
• SASS
• CSS Tidy
• Slimmer
• Stilys
• whatever
22

:link:hover,:visited:hover{color:#f00!important}:link{
wbr{display:inline-block}body{font:.8em Arial,Helve
serif;position:relative;z-index:0;margin:0;padding:0
0;color:#000;background:#fff}*{font-size:100%;marg
weight:normal;padding:0}table{border-collapse:coll
align:left;vertical-align:top;border-collapse:collapse
ol,ul,li{padding:0}code,input,textarea{font-family:Ar
a{text-decoration:none}:link,:visited{text-decoration
img,fieldset{border:0}b{font-weight:normal}i{font-s
size:100%;width:100%;border-collapse:collapse}.hea
gc,.head-c,.head-gr,.head-r{padding:0;vertical-align
2%}.head-gap{display:block;visibility:hidden;width:2
gap{width:3.1em}.head-l{width:12%;padding-top:1e
gl{width:4%}.head-c{width:60%}.head-gr{width:
4%}:link{color:#1a3dc1}:link:hover,:visited:hover{colo
CSS best practices
/* Use shorthand */
#super-box {
margin-top: 9px;
margin-right: 8px;
margin-bottom: 0;
margin-left: 5px;
margin: 9px 8px 0 5px;
}
/* Numeric font-weight */
p.about {
font-weight: bold;
font-weight: 700;
}
23

/* Shorter color code */
li.menu {
color: yellow;
color: #FF0;
background-color: #F00;
background-color: red;
}

/* Combine selectors */
h1, h2, h3 {
text-decoration: none;
}
bem.info/tools/csso
BEFORE
.test1 {
border: none;
background-color: red;
margin-top: 2em;
margin-left: 4px;
margin-bottom:3px;
margin-right: 0.1em;
font-weight: bold;
}

AFTER
.test1 {
background-color: red;
margin: 2em .1em 3px 4px;
font-weight: 700
}

.test2 {
border: none;
}
.test3 {
margin-top: 2em;
margin-bottom: 2em;
margin-right: 2em;
margin-left: 2em;
background-color: #FF0000;
font-weight: normal;
}

24

.test1, .test2 {
border: none
}
.test3 {
margin: 2em;
background-color: red;
font-weight: 400
}

Recommended for you

Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools

The document discusses various front-end development tools including HTML preprocessors like HAML and Slim, CSS preprocessors like Sass and SCSS, and the CoffeeScript programming language. It provides examples and comparisons of the syntax of these tools, outlines pros like cleaner and more concise code, and notes that some may require learning a new syntax.

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

This document discusses modern CSS architecture patterns. It introduces concepts like OOCSS, SMACSS, and BEM for organizing CSS in a modular, scalable and maintainable way. It provides examples of how to build reusable CSS modules and maintain them through techniques like naming conventions, categorization and decoupling CSS from HTML. The presentation emphasizes goals of building predictable, reusable, maintainable and scalable CSS architecture.

csscss architecture
Magpie InsurTech Award Presentation
Magpie InsurTech Award PresentationMagpie InsurTech Award Presentation
Magpie InsurTech Award Presentation

This document discusses how insurers can adapt to changes in technology by offering insurance as a service rather than just a product. It introduces Magpie, a company that provides digital services and apps to help insurers personalize the customer experience, increase revenue through upsells and cross-sells, and generate data insights. Magpie's core products include apps, digital services, smart tech, and platforms that can be deployed quickly and configured to work with an insurer's existing app or as a standalone branded solution.

digital insuranceinsurtech
Modular or solid?

25
human
@import url(blocks/header.css);
@import url(blocks/layout.css);
@import url(blocks/menu.css);
@import url(blocks/search.css);
@import url(blocks/button.css);
@import url(blocks/text.css);
@import url(blocks/footer.css);

blocks/
button.css
footer.css
header.css
layout.css
menu.css
search.css

26

browser
.header {
background: #000;
color: #fff;
font-size: 1.5em;
}
.layout { ... }
.menu { ... }
.search__input {
width: 100%;
margin: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.search_button {
margin: 0;
}
CSS flattening with Borschik
index.css

@import url(blocks/header/header.css);
@import url(blocks/menu/menu.css);
...
_index.css

.header {
...
}
.menu {
...
}
27
CSS flattening with Borschik
blocks/my-block/my-block.css

.my-block {
background: url(bg.png);
}
pages/_index.css

/* Included blocks/my-block/my-block.css */
.my-block
background: url(../blocks/my-block/bg.png);
}
...

28

Recommended for you

Cultural Considerations
Cultural ConsiderationsCultural Considerations
Cultural Considerations

Why is context 'King' when it comes to designing engaging experiences? In this talk, I take a look at how culture shapes user experience, sharing insights from software delivery gigs I've been a part of in Africa, Europe, South Asia, and the Middle East. A conversation starter for beginners and advanced practitioners alike.

user experienceglobalizationcontext
Presentation final
Presentation finalPresentation final
Presentation final

This document discusses information and communication technology (ICT) and contains several sections on related topics: 1. It begins with a brief definition of ICT and lists two authors. 2. Several sections then discuss challenges with communication technologies across contexts, identifying information and determining appropriate design principles when learning from different groups. 3. One section analyzes how politics can create asymmetrical integration of health e-infrastructure systems in India, providing an example of a flexible tool that was compatible in various situations over time. 4. Integration of library loan systems is also briefly mentioned.

An approach for managing and semantically enriching the publication of Linked...
An approach for managing and semantically enriching the publication of Linked...An approach for managing and semantically enriching the publication of Linked...
An approach for managing and semantically enriching the publication of Linked...

With the growth of e-government programs, the available data to citizens is growing in volume every day. However, to make these data a useful source of information, to be referenced and integrated more easily by different applications, they should be published according to the best practices of Linked Open Data, using standards for description (RDF) and identification (URI) of data resources on the web. The main goal of this work is to propose a platform and approach to support the exposure, sharing and association of data resources in the form of Linked Open Data, offering a user-friendly environment to stimulate the publication of data and their association to other existing data. Central functionalities to be included are data cleaning, transformation, linking, annotation and referencing to terminology mechanisms. http://andrefreitas.org/papers/SBBD-Workshop-eGov-preprint.pdf Kelli de Faria Cordeiro, Fabricio Firmino de Faria, Bianca de Oliveira Pereira, André Freitas, João Vitor Villas Boas Freitas, Ana Christina Bringuente, Lucas de Oliveira Arantes, Rodrigo Calhau, Veruska Zamborlini, Maria Luiza Machado Campos, Giancarlo Guizzardi, An Approach for Managing and Semantically Enriching the Publication of Linked Open Governmental Data, 3rd Workshop of Applied Computing in Electronic Government (WCGE), In WEBMEDIA/SBBD, 2011

egovernmentlinked data
JavaScript flattening with Borschik
index.js

/*borschik:include:blocks/menu/menu.js*/
/*borschik:include:blocks/tabbed-pane/tabbed-pane.js*/
...
_index.js

/* Included blocks/menu/menu.js */

(function($) {
$block('menu').elem('item').on('click', function() {
$(this).toggleMod('state', 'current');
});
})(jQuery);
29
Borschik freezes images
blocks/my-block/my-block.css

.my-block {
background: url(bg.png);
}
pages/_index.css

/* Included blocks/my-block/my-block.css */
.my-block {
background:
url(_freeze/jUK5O9GsS2gPWOhRMeBxR0GThf0.png);
}
...

30
bit.ly/about-borschik
Borschik. Simply powerful :-)

31
Code interfaces, not languages
general CSS
HTML

.head { ... }
.menu { ... }
<!DOCTYPE html>
.menu__item { ... }
<html>
.phone { ... }
<head>
.layout
<title>Awesome online bookshop</title> { ... }
...
<link rel="stylesheet" href="style.css"/>
<script src="magic.js"></script>
</head>
CSS for IE
<body>
<div class="head">
.menu { ... }
<ul class="menu">
.menu__item { ... }
<li class="menu__item"><a href="/">Home</a></li>
.button { ... }
<li class="menu__item"><a href="/news">News</a></li>
...
...
JavaScript
</ul>
<div class="phone">+3 71 1234567</div>
(function($) {
</div>
$block('menu').elem('item').on('click', function() {
<div class="layout">
$(this).toggleMod('state', 'current');
...
});
})(jQuery);
...

32

Recommended for you

Targetes retallables: Síl·labari per Català i Castellà.
 Targetes retallables: Síl·labari per Català i Castellà. Targetes retallables: Síl·labari per Català i Castellà.
Targetes retallables: Síl·labari per Català i Castellà.

This document provides a table listing syllables in Catalan and Spanish. It displays syllables in both languages organized by their initial consonant sounds to allow for comparison of syllable structure between the two languages. The table contains over 200 syllables starting with all consonant sounds in both Catalan and Spanish.

material ''aprendre a llegir''. català i castell
Session 2 - Q&A
Session 2 - Q&ASession 2 - Q&A
Session 2 - Q&A

This document discusses the Internet of Services and wearable devices in Asia by 2020. It includes a poll asking what percentage of people in Asia will be using a wearable device by 2020, with answers ranging from less than 1% to over 10%. The document also references a video demonstration of services by Emmanuel La Pierre, Vice President of Sales.

assistance servicesdigital insuranceinternet of things
Code interfaces, not languages
BEM tree
{
block: 'page',
content: [
{
block: 'head',
content: [
{ block: 'logo' },
{
block: 'search',
...
},
{ block: 'menu' }
]
}
33
Supply a browser with magic outcome
page.html
<!DOCTYPE html><html class="i-ua_js_no iua_css_standart"><head><meta charset=UTF-8"><meta httppage.css
equiv="X-UA-Compatible" content="IE=EmulateIE7,
IE=edge"><script type="text/javascript">//<!-:link:hover,:visited:hover{color:#f00!important}:link{color:#1a3dc1}
;(function(d,e,c,r)
wbr{display:inline-block}body{font:.8em Arial,Helvetica,sans{e=d.documentElement;c="className";r="replace";e[c]=e[c][r]("ipage.js
serif;position:relative;z-index:0;margin:0;padding:0 0 1em
ua_js_no","i-ua_js_yes");if(d.compatMode!
0;color:#000;background:#fff}*{font-size:100%;margin:0}
jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||
="CSS1Compat")e[c]=e[c][r]("i-ua_css_standart","ih1,h2,h3,h4,h5,h6{font-weight:normal;padding:0}table{border{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof
ua_css_quirks")}(document));
collapse:collapse}th,td{padding:0;text-align:left;verticalm.expires=="number"||m.expires.toUTCString)){var f;if(typeof
//--></script><link rel="stylesheet"
align:top;border-collapse:collapse}ol,ul{list-style:none}
m.expires=="number"){f=new Date();f.setTime(f.getTime()+
ol,ul,li{padding:0}code,input,textarea{font(m.expires*24*60*60*1000))}else{f=m.expires}e=";
family:Arial,Helvetica,sans-serif}a{textexpires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var
decoration:none}:link,:visited{text-decoration:underline}a
g=m.domain?"; domain="+(m.domain):"";var a=m.secure?";
secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].j
oin("")}else{var d=null;if(document.cookie&&document.cookie!="")
{var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var
34
Introducing magic into development

developer

35

building
process

browser
Building process

› bem make

› bem server

Production

Development

• rebuild the whole
project

36

• live edit
• partial rebuild
• tracking changes

Recommended for you

Гид Российского Покупателя 2012
Гид Российского Покупателя 2012Гид Российского Покупателя 2012
Гид Российского Покупателя 2012
Teste Matemática Probabilidades
Teste Matemática ProbabilidadesTeste Matemática Probabilidades
Teste Matemática Probabilidades

Este documento presenta un modelo de prueba para seleccionar una fecha. Contiene tres líneas que indican la selección de una fecha en tres pasos diferentes.

Prasasti Selaras ( Company Profile Training )
Prasasti Selaras ( Company Profile Training )Prasasti Selaras ( Company Profile Training )
Prasasti Selaras ( Company Profile Training )
bem.info/tools
37
Design philosophy
39
40

Recommended for you

Web app
Web appWeb app
Web app

The 12th Five Year Plan targets increasing education levels and employment opportunities in India. For education, goals include achieving a mean years of schooling of 7, eliminating gaps in enrollment, increasing secondary and senior secondary enrollment rates, and reducing dropout rates and literacy gaps. For employment, goals include creating 50 million new non-farm jobs, increasing the skilled workforce to 50 million, and doubling training capacity from 4.5 million annually. Charts show current and targeted figures for education indicators like enrollment rates and budget allocation across areas.

hackthon3dxamlapp1
Гид Российского Покупателя. Том I
Гид Российского Покупателя. Том IГид Российского Покупателя. Том I
Гид Российского Покупателя. Том I
Support Anna
Support AnnaSupport Anna
Support Anna

Support Anna Hajare.

anna hajarevivek singlacorruption
Independent CSS blocks

bit.ly/bem-riga-2012
What you can borrow from Yandex front-end dev
• blocks
– are not affected by parents
– do not affect children
• developer
– names blocks with CSS classes
– keeps off tag selectors
– avoids cascade
41
Imperative vs declarative programming

COULD YOU PLEASE
?
42
Declarations in CSS
file1.css

.button {
background-color: red;
font-size: 1.5em;
}
file2.css

.button {
background-color: green;
margin: .2em;
}
43
Declarative JavaScript
file1.js

BEM.DOM.decl('button', {
/* Basic block implementation */
});
file2.js

BEM.DOM.decl('button', {
/* Extending block implementation */
});
44

Recommended for you

Introduction of abm
Introduction of abmIntroduction of abm
Introduction of abm

Agent-based modeling is a powerful simulation modeling technique that has seen a number of applications in the last few years, including applications to real-world business problems

abmagent based modeling
ProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
ProvenMentor-Professional-Diploma-in-Digital-Marketing-BrochureProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
ProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure

The document provides an overview of the Professional Diploma in Digital Marketing programme offered by the Digital Marketing Institute. The 10-module programme covers key areas of digital marketing including search engine optimization, paid search marketing, email marketing, social media marketing, mobile marketing, and analytics. Each module is taught by practitioner-lecturers and focuses on current industry practices to provide students with real-world skills and knowledge sought by employers. Upon completing the programme, students will be equipped to effectively plan and implement digital marketing strategies for organizations.

Assessment techniques overview
Assessment techniques overviewAssessment techniques overview
Assessment techniques overview

This document provides an overview of various assessment techniques that can be used to evaluate student learning and development. It discusses pre-created testing instruments, quasi-experiments, ratings of skills, capstone/culminating activities, observation, narrative/journaling, portfolios, word clouds, visual collections, tracking, checklists, surveys, interviews, focus groups, concept maps, and rubrics. For each technique, it provides a brief description and notes on implementation and use. The document aims to inform readers on different assessment options and considerations for each approach.

Declarative JavaScript
BEM.DOM.decl('button', {
onSetMode: {
'active' : {
'yes' : function() { /* Do smth when active */ },
'no' : function() { /* Do smth else when not */ }
}
}
});
45

<input class="button button_active_no" ... />
button_active_yes"
Combinatorics

46
simple & simple
=
complex
47
Extended by a modifier
button.css

.button {
background-color: red;
font-size: 1.5em;
}
button_size_large.css

.button_size_large {
font-size: 3em;
}
<input class="button button_size_large" ... />
48

Recommended for you

Session 6 - Poll
Session 6 - PollSession 6 - Poll
Session 6 - Poll

This document discusses the results of a poll asking what people think is the biggest challenge when transforming an existing insurance company. The poll options were legacy tech, legacy management thinking, getting approval for new investment with uncertain outcome, and organizational silos. It then introduces a tech demo on digital quality assurance by Tanupriya Teriar, Delivery Head of Insurance and Test Automation Services at Quality Kiosk.

transformational approachesdigital insurance
Los fármacos
Los fármacosLos fármacos
Los fármacos

Este documento describe la historia y el desarrollo de los fármacos. Explica que los fármacos son sustancias químicas que se usan para tratar enfermedades y que su historia se remonta a antiguos textos médicos como el Papiro Ebers. Luego detalla las cuatro fases de los ensayos clínicos para probar la seguridad y eficacia de nuevos fármacos antes de su aprobación, y también discute algunas ventajas e inconvenientes de los fármacos modernos.

Portafolio 1
Portafolio 1Portafolio 1
Portafolio 1

José David Arciniegas Alvear is an industrial designer from Bogotá, Colombia with experience in social projects and interdisciplinary team coordination. He has skills in innovative project development, strategic management, and sustainable approaches. His areas of expertise include services design, social design, production management, strategic design management, communication projects, and cultural/craft products. He is capable, experienced in research, formulation and implementation of social projects using creative methodologies.

Extended by a modifier
button.js

BEM.DOM.decl('button', {
/* Basic implementation for all the buttons */
});

button_size_large.js

BEM.DOM.decl({ block: 'button', mod: 'size', val: 'large'}, {
/* Additional implementation for large sized buttons */
});

<input class="button button_size_large" ... />
49
Extended by a block level
library-blocks/button/button.css
library-blocks/

.button {
background-color: red;
font-size: 1.5em;

button/
button.css
button.js
}
menu/
search/
tabbed-pane/

blocks/button/button.css
.button {

blocks/
button/
button.css

background-color: green;
padding: .2em;
}

50
Extended by a block level
library-blocks/button/button.js
library-blocks/

BEM.DOM.decl('button', {

button/
button.css
button.js

/* Basic implementation
for all the buttons*/
});

menu/
search/
tabbed-pane/
blocks/
button/
button.js

blocks/button/button.js
BEM.DOM.decl('button', {
/* Additional implementation
for the buttons of the project */
});

51
Large profit of small things

• larger entities made up from smaller ones
– code re-use
– consistency
• everything is a block

52

Recommended for you

โปรพอลิส
โปรพอลิสโปรพอลิส
โปรพอลิส

Propolis is a resinous material that honey bees collect from leaf buds and use as glue in their hives. It has antibiotic, probiotic, and anti-inflammatory properties due to its flavonoid content, and can help reduce histamine release from mast cells and boost NK cell activity due to its antioxidant effects.

Semantic UI Introduction
Semantic UI IntroductionSemantic UI Introduction
Semantic UI Introduction

Semantic UI is a front-end framework for building responsive layouts using HTML and CSS classes. It contains over 50 UI elements and components like buttons, menus, modals, shapes, and grids that can be used to rapidly prototype and design websites. Some key benefits of Semantic UI include ease of use, beautiful default styling, and a large collection of useful modules. However, it has a larger file size than some other frameworks and less browser support.

semantic-ui html5 frontend-framework frontend
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks

This document provides an overview of Object Oriented CSS (OOCSS), HTML5, and web performance. It discusses what OOCSS is, how to implement it, and why it is useful. It also briefly covers some HTML5 forms and communication features. Finally, it examines how to improve website speed. The goal is to look at these topics and discuss elegant and lean CSS as opposed to "fat sack of crap" code.

cssinternethtml5
Revelations

• Development semantics
• Magic building tricks
• Declarativeness
• Combinatory methods
• Block levels and libraries
53
code more to code less

54
Varvara Stepanova
UI Framework Team Lead
toivonen@yandex-team.ru
@toivonens

Thank you
#b_
#askbem
@bem_en
56

?

Recommended for you

Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012

APEX& jQuery Mobile Binnenkort zal Oracle versie de lang aangekondigde upgrade naar release 4.2 van Oracle Application Express beschikbaar maken. Een van de meest besproken nieuwe features die voor dit nieuwe release zijn aangekondigd is de integratie van het jQuery Mobile framework. Met de integratie van dit framework zal het mogelijk worden om met APEX applicaties te ontwikkelen, die geschikt zijn voor mobiele toestellen. Wat is en hoe werkt jQuery Mobile en wat betekend dit voor het ontwikkelen in APEX. Dat zijn de onderwerpen die de presentatie aan bod komen. En waarom wachten tot het release van 4.2. Het is namelijk nu al mogelijk om jQuery Mobile in APEX te integreren en gebruiken. Hoe, wordt in een demo getoond. Deze sessie is waarschijnlijk de enige waarin u gevraagd zal worden om uw mobile telefoon aan te laten staan.

application expressjquery mobileapex
Bem methodology
Bem methodologyBem methodology
Bem methodology

This document provides an overview of the BEM (Block Element Modifier) methodology for organizing CSS code. It discusses the concepts of blocks, elements, and modifiers. It also covers advantages like namespacing and shared UI language. Finally, it discusses tools and frameworks for BEM including BEMHTML, CSSO, Emmet, and inuit.css.

cssbemmodularity
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2

This document discusses jQuery Mobile and Sencha Touch, which are frameworks for building rich mobile web applications. It provides an overview of key features of each framework. jQuery Mobile is built on jQuery and uses a modular library approach with markup-driven configuration. It supports features like progressive enhancement, pages, transitions between pages, disabling AJAX loading, back buttons, themes, toolbars, footers, buttons, lists, forms, and touch events. Sencha Touch is a JavaScript framework that supports components, data access and MVC patterns, forms, scrolling, touch events, theming, and charts. It uses an application architecture with stores, models, and views. It supports common UI elements like lists, nested

appssencha touchhtml5

More Related Content

What's hot

How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
vathur
 
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of codeSummit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Angel Borroy López
 
Xxx
XxxXxx
Xxx
syfwan
 
Convidar para page !!
Convidar para page !!Convidar para page !!
Convidar para page !!
Jhonny Batista
 
ASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server Database
Christopher Singleton
 
Jquery 5
Jquery 5Jquery 5
The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)
ungerik
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える
拓樹 谷
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書
拓樹 谷
 
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham SiddiquiJ Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
Muhammad Ehtisham Siddiqui
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
Arnd Kleinbeck
 
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios
 
Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners
Slashes & Dots Sdn Bhd
 
Stole16
Stole16Stole16
Stole16
rworldoffice
 
TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08
Andy Gelme
 
WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML Semantics
Adrian Roselli
 
Module design & UI Dev patterns
Module design & UI Dev patternsModule design & UI Dev patterns
Module design & UI Dev patterns
Dale Sande
 
CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
Adrian Roselli
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
Netguru
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える
拓樹 谷
 

What's hot (20)

How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
 
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of codeSummit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
 
Xxx
XxxXxx
Xxx
 
Convidar para page !!
Convidar para page !!Convidar para page !!
Convidar para page !!
 
ASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server Database
 
Jquery 5
Jquery 5Jquery 5
Jquery 5
 
The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書
 
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham SiddiquiJ Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
 
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
 
Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners
 
Stole16
Stole16Stole16
Stole16
 
TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08
 
WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML Semantics
 
Module design & UI Dev patterns
Module design & UI Dev patternsModule design & UI Dev patterns
Module design & UI Dev patterns
 
CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える
 

Viewers also liked

Magpie InsurTech Award Presentation
Magpie InsurTech Award PresentationMagpie InsurTech Award Presentation
Magpie InsurTech Award Presentation
The Digital Insurer
 
Cultural Considerations
Cultural ConsiderationsCultural Considerations
Cultural Considerations
David Peter Simon
 
Presentation final
Presentation finalPresentation final
Presentation final
lyonka02
 
An approach for managing and semantically enriching the publication of Linked...
An approach for managing and semantically enriching the publication of Linked...An approach for managing and semantically enriching the publication of Linked...
An approach for managing and semantically enriching the publication of Linked...
greco_ufrj
 
Targetes retallables: Síl·labari per Català i Castellà.
 Targetes retallables: Síl·labari per Català i Castellà. Targetes retallables: Síl·labari per Català i Castellà.
Targetes retallables: Síl·labari per Català i Castellà.
Silvia Nieto
 
Session 2 - Q&A
Session 2 - Q&ASession 2 - Q&A
Session 2 - Q&A
The Digital Insurer
 
Гид Российского Покупателя 2012
Гид Российского Покупателя 2012Гид Российского Покупателя 2012
Гид Российского Покупателя 2012
Asti Group Exhibition Company
 
Teste Matemática Probabilidades
Teste Matemática ProbabilidadesTeste Matemática Probabilidades
Teste Matemática Probabilidades
Maria Catarina Santos
 
Prasasti Selaras ( Company Profile Training )
Prasasti Selaras ( Company Profile Training )Prasasti Selaras ( Company Profile Training )
Prasasti Selaras ( Company Profile Training )
Fathia Irena
 
Web app
Web appWeb app
Web app
Amit Saharana
 
Гид Российского Покупателя. Том I
Гид Российского Покупателя. Том IГид Российского Покупателя. Том I
Гид Российского Покупателя. Том I
Asti Group Exhibition Company
 
Support Anna
Support AnnaSupport Anna
Support Anna
Vivek Singla
 
Introduction of abm
Introduction of abmIntroduction of abm
Introduction of abm
yudiyasik
 
ProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
ProvenMentor-Professional-Diploma-in-Digital-Marketing-BrochureProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
ProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
Rob Firmin
 
Assessment techniques overview
Assessment techniques overviewAssessment techniques overview
Assessment techniques overview
Gavin Henning
 
Session 6 - Poll
Session 6 - PollSession 6 - Poll
Session 6 - Poll
The Digital Insurer
 
Los fármacos
Los fármacosLos fármacos
Los fármacos
anaromera236
 
Portafolio 1
Portafolio 1Portafolio 1
Portafolio 1
Jose Arciniegas
 
โปรพอลิส
โปรพอลิสโปรพอลิส
โปรพอลิส
Rpg Thailand
 

Viewers also liked (20)

Magpie InsurTech Award Presentation
Magpie InsurTech Award PresentationMagpie InsurTech Award Presentation
Magpie InsurTech Award Presentation
 
Cultural Considerations
Cultural ConsiderationsCultural Considerations
Cultural Considerations
 
Presentation final
Presentation finalPresentation final
Presentation final
 
An approach for managing and semantically enriching the publication of Linked...
An approach for managing and semantically enriching the publication of Linked...An approach for managing and semantically enriching the publication of Linked...
An approach for managing and semantically enriching the publication of Linked...
 
Presa itog 3
Presa itog 3Presa itog 3
Presa itog 3
 
Targetes retallables: Síl·labari per Català i Castellà.
 Targetes retallables: Síl·labari per Català i Castellà. Targetes retallables: Síl·labari per Català i Castellà.
Targetes retallables: Síl·labari per Català i Castellà.
 
Session 2 - Q&A
Session 2 - Q&ASession 2 - Q&A
Session 2 - Q&A
 
Гид Российского Покупателя 2012
Гид Российского Покупателя 2012Гид Российского Покупателя 2012
Гид Российского Покупателя 2012
 
Teste Matemática Probabilidades
Teste Matemática ProbabilidadesTeste Matemática Probabilidades
Teste Matemática Probabilidades
 
Prasasti Selaras ( Company Profile Training )
Prasasti Selaras ( Company Profile Training )Prasasti Selaras ( Company Profile Training )
Prasasti Selaras ( Company Profile Training )
 
Web app
Web appWeb app
Web app
 
Гид Российского Покупателя. Том I
Гид Российского Покупателя. Том IГид Российского Покупателя. Том I
Гид Российского Покупателя. Том I
 
Support Anna
Support AnnaSupport Anna
Support Anna
 
Introduction of abm
Introduction of abmIntroduction of abm
Introduction of abm
 
ProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
ProvenMentor-Professional-Diploma-in-Digital-Marketing-BrochureProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
ProvenMentor-Professional-Diploma-in-Digital-Marketing-Brochure
 
Assessment techniques overview
Assessment techniques overviewAssessment techniques overview
Assessment techniques overview
 
Session 6 - Poll
Session 6 - PollSession 6 - Poll
Session 6 - Poll
 
Los fármacos
Los fármacosLos fármacos
Los fármacos
 
Portafolio 1
Portafolio 1Portafolio 1
Portafolio 1
 
โปรพอลิส
โปรพอลิสโปรพอลิส
โปรพอลิส
 

Similar to The Thinking behind BEM

Semantic UI Introduction
Semantic UI IntroductionSemantic UI Introduction
Semantic UI Introduction
Christen Gjølbye Christensen
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
crokitta
 
Bem methodology
Bem methodologyBem methodology
Bem methodology
Andrew Rota
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 
Bootstrap
BootstrapBootstrap
Bootstrap
Sarvesh Kushwaha
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
Ron Reiter
 
Atomic design con pattern lab
Atomic design con pattern labAtomic design con pattern lab
Atomic design con pattern lab
UX Nights
 
HTML5
HTML5HTML5
Front-end Rails-приложений приложений, основанный на БЭМ
Front-end Rails-приложений приложений, основанный на БЭМFront-end Rails-приложений приложений, основанный на БЭМ
Front-end Rails-приложений приложений, основанный на БЭМ
Александр Ежов
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
PalashBajpai
 
Diseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Diseño de Sistemas de Diseño con Atomic Design y Pattern LabDiseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Diseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Mauricio Angulo Sillas
 
Praktik Pengembangan Konten E-Learning HTML5 Sederhana
Praktik Pengembangan Konten E-Learning HTML5 SederhanaPraktik Pengembangan Konten E-Learning HTML5 Sederhana
Praktik Pengembangan Konten E-Learning HTML5 Sederhana
Muhammad Yusuf
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI Composition
Alexey Gravanov
 
Design Systems, Pattern Libraries & WordPress
Design Systems, Pattern Libraries & WordPressDesign Systems, Pattern Libraries & WordPress
Design Systems, Pattern Libraries & WordPress
Jesse James Arnold
 
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
Christopher Schmitt
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
Rob Bontekoe
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
Jonathan Snook
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
Andrew Rota
 
[edUi] HTML5 Workshop
[edUi] HTML5 Workshop[edUi] HTML5 Workshop
[edUi] HTML5 Workshop
Christopher Schmitt
 

Similar to The Thinking behind BEM (20)

Semantic UI Introduction
Semantic UI IntroductionSemantic UI Introduction
Semantic UI Introduction
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Bem methodology
Bem methodologyBem methodology
Bem methodology
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
Atomic design con pattern lab
Atomic design con pattern labAtomic design con pattern lab
Atomic design con pattern lab
 
HTML5
HTML5HTML5
HTML5
 
Front-end Rails-приложений приложений, основанный на БЭМ
Front-end Rails-приложений приложений, основанный на БЭМFront-end Rails-приложений приложений, основанный на БЭМ
Front-end Rails-приложений приложений, основанный на БЭМ
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
 
Diseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Diseño de Sistemas de Diseño con Atomic Design y Pattern LabDiseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Diseño de Sistemas de Diseño con Atomic Design y Pattern Lab
 
Praktik Pengembangan Konten E-Learning HTML5 Sederhana
Praktik Pengembangan Konten E-Learning HTML5 SederhanaPraktik Pengembangan Konten E-Learning HTML5 Sederhana
Praktik Pengembangan Konten E-Learning HTML5 Sederhana
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI Composition
 
Design Systems, Pattern Libraries & WordPress
Design Systems, Pattern Libraries & WordPressDesign Systems, Pattern Libraries & WordPress
Design Systems, Pattern Libraries & WordPress
 
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
 
[edUi] HTML5 Workshop
[edUi] HTML5 Workshop[edUi] HTML5 Workshop
[edUi] HTML5 Workshop
 

More from Varya Stepanova

Design systems on the web
Design systems on the webDesign systems on the web
Design systems on the web
Varya Stepanova
 
SC5 Style Guide Generator
SC5 Style Guide GeneratorSC5 Style Guide Generator
SC5 Style Guide Generator
Varya Stepanova
 
BEM it! Introduction to BEM
BEM it! Introduction to BEMBEM it! Introduction to BEM
BEM it! Introduction to BEM
Varya Stepanova
 
BEM it! Introduction to BEM methodology
BEM it! Introduction to BEM methodologyBEM it! Introduction to BEM methodology
BEM it! Introduction to BEM methodology
Varya Stepanova
 
Maintainable Frontend Development with BEM
Maintainable Frontend Development with BEMMaintainable Frontend Development with BEM
Maintainable Frontend Development with BEM
Varya Stepanova
 
BEM. What you can borrow from Yandex frontend dev
BEM. What you can borrow from Yandex frontend devBEM. What you can borrow from Yandex frontend dev
BEM. What you can borrow from Yandex frontend dev
Varya Stepanova
 
Тема для WordPress в БЭМ
Тема для WordPress в БЭМТема для WordPress в БЭМ
Тема для WordPress в БЭМ
Varya Stepanova
 
Шаблонизатор BEMHTML
Шаблонизатор BEMHTMLШаблонизатор BEMHTML
Шаблонизатор BEMHTML
Varya Stepanova
 
Использование библиотеки bem-bl
Использование библиотеки bem-blИспользование библиотеки bem-bl
Использование библиотеки bem-bl
Varya Stepanova
 
JavaScript в БЭМ терминах
JavaScript в БЭМ терминахJavaScript в БЭМ терминах
JavaScript в БЭМ терминах
Varya Stepanova
 
Использование библиотеки bem-bl
Использование библиотеки bem-blИспользование библиотеки bem-bl
Использование библиотеки bem-bl
Varya Stepanova
 

More from Varya Stepanova (12)

Design systems on the web
Design systems on the webDesign systems on the web
Design systems on the web
 
SC5 Style Guide Generator
SC5 Style Guide GeneratorSC5 Style Guide Generator
SC5 Style Guide Generator
 
BEM it! Introduction to BEM
BEM it! Introduction to BEMBEM it! Introduction to BEM
BEM it! Introduction to BEM
 
BEM it! Introduction to BEM methodology
BEM it! Introduction to BEM methodologyBEM it! Introduction to BEM methodology
BEM it! Introduction to BEM methodology
 
Modular development
Modular developmentModular development
Modular development
 
Maintainable Frontend Development with BEM
Maintainable Frontend Development with BEMMaintainable Frontend Development with BEM
Maintainable Frontend Development with BEM
 
BEM. What you can borrow from Yandex frontend dev
BEM. What you can borrow from Yandex frontend devBEM. What you can borrow from Yandex frontend dev
BEM. What you can borrow from Yandex frontend dev
 
Тема для WordPress в БЭМ
Тема для WordPress в БЭМТема для WordPress в БЭМ
Тема для WordPress в БЭМ
 
Шаблонизатор BEMHTML
Шаблонизатор BEMHTMLШаблонизатор BEMHTML
Шаблонизатор BEMHTML
 
Использование библиотеки bem-bl
Использование библиотеки bem-blИспользование библиотеки bem-bl
Использование библиотеки bem-bl
 
JavaScript в БЭМ терминах
JavaScript в БЭМ терминахJavaScript в БЭМ терминах
JavaScript в БЭМ терминах
 
Использование библиотеки bem-bl
Использование библиотеки bem-blИспользование библиотеки bem-bl
Использование библиотеки bem-bl
 

Recently uploaded

Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 

Recently uploaded (20)

Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 

The Thinking behind BEM

  • 2. ({ name: "Varvara Stepanova", email: "toivonen@yandex-team.ru", twitter: "@toivonens" }); 2
  • 3. Search Images Video Realty Blogs Apps Jobs • Russia • Turkey • Ukraine • Belarus Maps • Kazakhstan • Azerbaijan 3 Social • 2000 devs • 150+ frontenders • 100+ services Mail Marketplace etc.
  • 4. The thinking behind BEM #b_ #askbem @bem_en UI Framework Team Leader Varvara Stepanova
  • 5. Block • Element • Modifier 5
  • 7. Page of independent blocks page.html <body class="page"> <div class="header"> <img class="logo" ... /> <div class="search">...</div> <div class="menu">...</div> </div> <div class="layout"> <div class="sidebar">...</div> <div class="menu">...</div> </div> </body> 7
  • 9. Block with elements page.html <div class="tabbed-pane"> <ul> <li class="tabbed-pane__tab">Tab1</li> <li class="tabbed-pane__tab">Tab2</li> </ul> <div class="tabbed-pane__panel"> ... </div> </div> 9
  • 10. Modifiers change blocks and elements <div class=" tabbed-pane tabbed-pane_theme_blue"> ... </div> <div class=" tabbed-pane tabbed-pane_to_bottom"> ... </div> 10
  • 12. Thinking of... 1. Development semantics 2. Doing magic 3. Design philosophy
  • 15. CSS pseudoCSS .t-pane { width: 200px; &_theme { &_blue { background: #9cf; } } &__tab { display: inline-block; } 15 .t-pane { width: 200px; } .t-pane_theme_blue { background: #9cf; } .t-pane__tab { display: inline-block; }
  • 16. Take a block, take its element, do this! JavaScript $block('tabbed-pane') .elem('tab') .click(...); $block('tabbed-pane') .setMod('view', 'flipped'); $block('tabbed-pane') .elem('tab') .setMod('current'); 16
  • 18. Blocks are consistent components ... <div class="tabbed-pane"> ... </div> ... • internal structure • associated view • corresponding behavior 18
  • 20. Doing magic Robots and people Who serves whom?!
  • 21. Заголовок (не длинней одной строки) Do we like what robots like?
  • 22. Tidy CSS code • YUI Compressor • clean-css • Microsoft • SASS • CSS Tidy • Slimmer • Stilys • whatever 22 :link:hover,:visited:hover{color:#f00!important}:link{ wbr{display:inline-block}body{font:.8em Arial,Helve serif;position:relative;z-index:0;margin:0;padding:0 0;color:#000;background:#fff}*{font-size:100%;marg weight:normal;padding:0}table{border-collapse:coll align:left;vertical-align:top;border-collapse:collapse ol,ul,li{padding:0}code,input,textarea{font-family:Ar a{text-decoration:none}:link,:visited{text-decoration img,fieldset{border:0}b{font-weight:normal}i{font-s size:100%;width:100%;border-collapse:collapse}.hea gc,.head-c,.head-gr,.head-r{padding:0;vertical-align 2%}.head-gap{display:block;visibility:hidden;width:2 gap{width:3.1em}.head-l{width:12%;padding-top:1e gl{width:4%}.head-c{width:60%}.head-gr{width: 4%}:link{color:#1a3dc1}:link:hover,:visited:hover{colo
  • 23. CSS best practices /* Use shorthand */ #super-box { margin-top: 9px; margin-right: 8px; margin-bottom: 0; margin-left: 5px; margin: 9px 8px 0 5px; } /* Numeric font-weight */ p.about { font-weight: bold; font-weight: 700; } 23 /* Shorter color code */ li.menu { color: yellow; color: #FF0; background-color: #F00; background-color: red; } /* Combine selectors */ h1, h2, h3 { text-decoration: none; }
  • 24. bem.info/tools/csso BEFORE .test1 { border: none; background-color: red; margin-top: 2em; margin-left: 4px; margin-bottom:3px; margin-right: 0.1em; font-weight: bold; } AFTER .test1 { background-color: red; margin: 2em .1em 3px 4px; font-weight: 700 } .test2 { border: none; } .test3 { margin-top: 2em; margin-bottom: 2em; margin-right: 2em; margin-left: 2em; background-color: #FF0000; font-weight: normal; } 24 .test1, .test2 { border: none } .test3 { margin: 2em; background-color: red; font-weight: 400 }
  • 26. human @import url(blocks/header.css); @import url(blocks/layout.css); @import url(blocks/menu.css); @import url(blocks/search.css); @import url(blocks/button.css); @import url(blocks/text.css); @import url(blocks/footer.css); blocks/ button.css footer.css header.css layout.css menu.css search.css 26 browser .header { background: #000; color: #fff; font-size: 1.5em; } .layout { ... } .menu { ... } .search__input { width: 100%; margin: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .search_button { margin: 0; }
  • 27. CSS flattening with Borschik index.css @import url(blocks/header/header.css); @import url(blocks/menu/menu.css); ... _index.css .header { ... } .menu { ... } 27
  • 28. CSS flattening with Borschik blocks/my-block/my-block.css .my-block { background: url(bg.png); } pages/_index.css /* Included blocks/my-block/my-block.css */ .my-block background: url(../blocks/my-block/bg.png); } ... 28
  • 29. JavaScript flattening with Borschik index.js /*borschik:include:blocks/menu/menu.js*/ /*borschik:include:blocks/tabbed-pane/tabbed-pane.js*/ ... _index.js /* Included blocks/menu/menu.js */ (function($) { $block('menu').elem('item').on('click', function() { $(this).toggleMod('state', 'current'); }); })(jQuery); 29
  • 30. Borschik freezes images blocks/my-block/my-block.css .my-block { background: url(bg.png); } pages/_index.css /* Included blocks/my-block/my-block.css */ .my-block { background: url(_freeze/jUK5O9GsS2gPWOhRMeBxR0GThf0.png); } ... 30
  • 32. Code interfaces, not languages general CSS HTML .head { ... } .menu { ... } <!DOCTYPE html> .menu__item { ... } <html> .phone { ... } <head> .layout <title>Awesome online bookshop</title> { ... } ... <link rel="stylesheet" href="style.css"/> <script src="magic.js"></script> </head> CSS for IE <body> <div class="head"> .menu { ... } <ul class="menu"> .menu__item { ... } <li class="menu__item"><a href="/">Home</a></li> .button { ... } <li class="menu__item"><a href="/news">News</a></li> ... ... JavaScript </ul> <div class="phone">+3 71 1234567</div> (function($) { </div> $block('menu').elem('item').on('click', function() { <div class="layout"> $(this).toggleMod('state', 'current'); ... }); })(jQuery); ... 32
  • 33. Code interfaces, not languages BEM tree { block: 'page', content: [ { block: 'head', content: [ { block: 'logo' }, { block: 'search', ... }, { block: 'menu' } ] } 33
  • 34. Supply a browser with magic outcome page.html <!DOCTYPE html><html class="i-ua_js_no iua_css_standart"><head><meta charset=UTF-8"><meta httppage.css equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=edge"><script type="text/javascript">//<!-:link:hover,:visited:hover{color:#f00!important}:link{color:#1a3dc1} ;(function(d,e,c,r) wbr{display:inline-block}body{font:.8em Arial,Helvetica,sans{e=d.documentElement;c="className";r="replace";e[c]=e[c][r]("ipage.js serif;position:relative;z-index:0;margin:0;padding:0 0 1em ua_js_no","i-ua_js_yes");if(d.compatMode! 0;color:#000;background:#fff}*{font-size:100%;margin:0} jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m|| ="CSS1Compat")e[c]=e[c][r]("i-ua_css_standart","ih1,h2,h3,h4,h5,h6{font-weight:normal;padding:0}table{border{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof ua_css_quirks")}(document)); collapse:collapse}th,td{padding:0;text-align:left;verticalm.expires=="number"||m.expires.toUTCString)){var f;if(typeof //--></script><!--[if gt IE 9]><!--><link rel="stylesheet" align:top;border-collapse:collapse}ol,ul{list-style:none} m.expires=="number"){f=new Date();f.setTime(f.getTime()+ ol,ul,li{padding:0}code,input,textarea{font(m.expires*24*60*60*1000))}else{f=m.expires}e="; family:Arial,Helvetica,sans-serif}a{textexpires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var decoration:none}:link,:visited{text-decoration:underline}a g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].j oin("")}else{var d=null;if(document.cookie&&document.cookie!="") {var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var 34
  • 35. Introducing magic into development developer 35 building process browser
  • 36. Building process › bem make › bem server Production Development • rebuild the whole project 36 • live edit • partial rebuild • tracking changes
  • 39. 39
  • 40. 40
  • 41. Independent CSS blocks bit.ly/bem-riga-2012 What you can borrow from Yandex front-end dev • blocks – are not affected by parents – do not affect children • developer – names blocks with CSS classes – keeps off tag selectors – avoids cascade 41
  • 42. Imperative vs declarative programming COULD YOU PLEASE ? 42
  • 43. Declarations in CSS file1.css .button { background-color: red; font-size: 1.5em; } file2.css .button { background-color: green; margin: .2em; } 43
  • 44. Declarative JavaScript file1.js BEM.DOM.decl('button', { /* Basic block implementation */ }); file2.js BEM.DOM.decl('button', { /* Extending block implementation */ }); 44
  • 45. Declarative JavaScript BEM.DOM.decl('button', { onSetMode: { 'active' : { 'yes' : function() { /* Do smth when active */ }, 'no' : function() { /* Do smth else when not */ } } } }); 45 <input class="button button_active_no" ... /> button_active_yes"
  • 48. Extended by a modifier button.css .button { background-color: red; font-size: 1.5em; } button_size_large.css .button_size_large { font-size: 3em; } <input class="button button_size_large" ... /> 48
  • 49. Extended by a modifier button.js BEM.DOM.decl('button', { /* Basic implementation for all the buttons */ }); button_size_large.js BEM.DOM.decl({ block: 'button', mod: 'size', val: 'large'}, { /* Additional implementation for large sized buttons */ }); <input class="button button_size_large" ... /> 49
  • 50. Extended by a block level library-blocks/button/button.css library-blocks/ .button { background-color: red; font-size: 1.5em; button/ button.css button.js } menu/ search/ tabbed-pane/ blocks/button/button.css .button { blocks/ button/ button.css background-color: green; padding: .2em; } 50
  • 51. Extended by a block level library-blocks/button/button.js library-blocks/ BEM.DOM.decl('button', { button/ button.css button.js /* Basic implementation for all the buttons*/ }); menu/ search/ tabbed-pane/ blocks/ button/ button.js blocks/button/button.js BEM.DOM.decl('button', { /* Additional implementation for the buttons of the project */ }); 51
  • 52. Large profit of small things • larger entities made up from smaller ones – code re-use – consistency • everything is a block 52
  • 53. Revelations • Development semantics • Magic building tricks • Declarativeness • Combinatory methods • Block levels and libraries 53
  • 54. code more to code less 54
  • 55. Varvara Stepanova UI Framework Team Lead toivonen@yandex-team.ru @toivonens Thank you