SlideShare a Scribd company logo
1 of 60
Object Oriented CSS

                      Graeme Blackwood
                      Creative Director
                      Deeson Online
                      twitter.com/graemeblackwood
Спонсоры
     Организатор      Генеральный спонсор




 Серебряный спонсор   Серебряный спонсор




 Бронзовый спонсор     Бронзовый спонсор




                                    2
Graeme Blackwood
Creative Director, Deeson Online


deeson-online.co.uk
@graemeblackwood
Object
Oriented
CSS
Props
•   Nicole Sullivan, http://www.stubbornella.org

•   Jonathan Snook (SMACSS), http://smacss.com

•   Everyone at http://thesassway.com

•   Chris Eppstein, http://compass-style.org

•   Kevin Poulton http://www.flickr.com/photos/kevinpoulton

•   And loads more!
Some misconceptions
OO CSS !=
OO Programming

But an OOP mindset can be 
applied to CSS
OOCSS does not
require any newer
technologies

It works in IE6 – no need for CSS3, 
HTML5 etc
Semantic markup is
very helpful, but
usually not essential

Semantic is better though!
The traditional approach
        to CSS
Style output
as needed
Each item / page 
individually...
Target styles by
drilling down
through nested
elements
Problems with
traditional CSS
Coding takes
a lot longer
It gets
bloated
It is difficult to read
and hard to reuse
Traditional CSS is
tough to maintain
Object Oriented CSS
A new way of thinking
Separate layout from theme(Use 
a grid system!)
Separate the container
from the content
Look for shared styles
You will see them everywhere
Why should
I care?
Reusable code
Faster
development
                        QuickTime™ and a
                      H.264 decompressor
                 are needed to see this picture.




Less effort to code
Easier to maintain
Less code,
smaller files
Getting started
Using a grid system?
You are already on the right track!
Use a reset
stylesheet
HTML5 boilerplate’s 
normalize.css
Set good base styles
To minimise later overrides

* {box­sizing: border­box} is pretty handy
Buildgood base stylesTo 
Set HTML prototypeswith 
Drupal in mind...
minimise later overrides
Clean up what Drupal
throws at you
Don’t just style,
theme!
Lose unnecessary
markup if it affects you
             Some divs are 
             totally pointless!
PHP code not for you?
I find Drupal modules like
Display Suite and Skinr helpful
Check out TWIG
We’re working on making Drupal 8 a lot 
easier to theme.

http://twig.sensiolabs.org/
Don’t be too obsessed
with perfect markup
Just enough is ok
“Now, this is just a simulation of what the blocks 
    will look like once they’re assembled”
Let’s look at some real
world applications...
.block = inherited base styles only.grid-4 = grid class.theme-a = theme
class, H3 and p inherit colour.padded is a class I add to the grid
framework for situations like this
<div class=”grid-4 theme-a block”>
  <h3>Block title</h3>
  <p>Hello world!</p>
</div>




.grid-4 comes from your grid framework

.theme-a {
  background-color: #580174;
  border-radius: 6px;
  color: #fff; //H3 and p inherit this
}
Carousel nav tabsObject is a Drupal menu 
– UL with a class of .sidebar­menu. Custom jQuery targets the ID.
Also used on a listingAnd it f
the container
99% of the styles are reused,
targeted through .right
.sidebar-menu only to flip the
active item
Carousel items
With a class of .product­box
Reused on listing
pages
Same layout as product
listings and carousel, flexed
to image size
What about
SASS and LESS?
Why bother with presentational classes 
in markup anymore?
Not everyone wants to use a CSS preprocessorAnd the mindset of reduce, reuse & recycle is just as important even with one
Use SASS wisely – it’s
another layer to debug
Be particularly careful
with nested selectors
http://thesassway.com/beginner/the­inception­rule

http://37signals.com/svn/posts/3003­css­taking­control­of­the­cascade
Disregarding the other
principles of OOCSS may
create pain later
You could end up with generated CSS bloated 
even more than if you had hand­coded it
Summary
•   OOCSS is as much a mindset as a technique

•   The principles are to reduce, reuse and recycle code

•   This is done through separating layout from theme

•   and the container from the content

•   It relies primarily on reused classes and markup

•   We are working on Drupal 8 to make it much easier to
    change markup. In the meantime, try Display Suite or Skinr
    for node theming
Summary

•   CSS preprocessors like SASS and LESS are great

•   But they create another layer to debug

•   And the code they generate can be very bloated

•   Preprocessors are not an excuse to be lazy

•   They still need to be used with an OO mindset
Спасибо за внимание

Вопросы?
            Graeme Blackwood
            Creative Director
            Deeson Online
            @graemeblackwood
Спонсоры
     Организатор      Генеральный спонсор




 Серебряный спонсор   Серебряный спонсор




 Бронзовый спонсор     Бронзовый спонсор




                                    60

More Related Content

What's hot

The way to be a developer "What I Need"
The way to be a developer "What I Need"The way to be a developer "What I Need"
The way to be a developer "What I Need"egyappassiut
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build themDick Olsson
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationBattle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationRachel Cherry
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designersPai-Cheng Tao
 
Adobe Source 2016 - Styleguides and AEM
Adobe Source 2016 - Styleguides and AEMAdobe Source 2016 - Styleguides and AEM
Adobe Source 2016 - Styleguides and AEMMichael Leroy
 
HTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ SearchcampHTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ SearchcampJames Mills
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSSRuss Weakley
 
Frontend django, Django Web 前端探索
Frontend django, Django Web 前端探索Frontend django, Django Web 前端探索
Frontend django, Django Web 前端探索Tim (文昌)
 
Hammersmith fundamentals html fundamentals
Hammersmith fundamentals   html fundamentalsHammersmith fundamentals   html fundamentals
Hammersmith fundamentals html fundamentalsMike Bradshaw
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersMelvin John
 
Steve Barman - CSS and WordPress
Steve Barman - CSS and WordPressSteve Barman - CSS and WordPress
Steve Barman - CSS and WordPressAnthony Montalbano
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計傳錡 蕭
 

What's hot (19)

The way to be a developer "What I Need"
The way to be a developer "What I Need"The way to be a developer "What I Need"
The way to be a developer "What I Need"
 
The web context
The web contextThe web context
The web context
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build them
 
CSS Modules
CSS ModulesCSS Modules
CSS Modules
 
CSS Systems
CSS SystemsCSS Systems
CSS Systems
 
Lightning fast sass
Lightning fast sassLightning fast sass
Lightning fast sass
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationBattle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
 
Adobe Source 2016 - Styleguides and AEM
Adobe Source 2016 - Styleguides and AEMAdobe Source 2016 - Styleguides and AEM
Adobe Source 2016 - Styleguides and AEM
 
HTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ SearchcampHTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ Searchcamp
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSS
 
Frontend django, Django Web 前端探索
Frontend django, Django Web 前端探索Frontend django, Django Web 前端探索
Frontend django, Django Web 前端探索
 
Designing with Drupal 8
Designing with Drupal 8Designing with Drupal 8
Designing with Drupal 8
 
Hammersmith fundamentals html fundamentals
Hammersmith fundamentals   html fundamentalsHammersmith fundamentals   html fundamentals
Hammersmith fundamentals html fundamentals
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
 
Steve Barman - CSS and WordPress
Steve Barman - CSS and WordPressSteve Barman - CSS and WordPress
Steve Barman - CSS and WordPress
 
Web
WebWeb
Web
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計
 

Viewers also liked

Drush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилDrush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилPVasili
 
Drupal and the keys to successful communities. Martin Mayer
Drupal and the keys to successful communities. Martin MayerDrupal and the keys to successful communities. Martin Mayer
Drupal and the keys to successful communities. Martin MayerPVasili
 
Практическое использование модуля Panels. Богуцкий Виктор
Практическое использование модуля Panels. Богуцкий ВикторПрактическое использование модуля Panels. Богуцкий Виктор
Практическое использование модуля Panels. Богуцкий ВикторPVasili
 
Michael turner a2 media coursework
Michael turner a2 media courseworkMichael turner a2 media coursework
Michael turner a2 media courseworkmiketurer262626
 
Lessons from the movie lagaan
Lessons from the movie lagaanLessons from the movie lagaan
Lessons from the movie lagaanSonam Jain
 

Viewers also liked (7)

Drush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилDrush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек Михаил
 
Drupal and the keys to successful communities. Martin Mayer
Drupal and the keys to successful communities. Martin MayerDrupal and the keys to successful communities. Martin Mayer
Drupal and the keys to successful communities. Martin Mayer
 
Практическое использование модуля Panels. Богуцкий Виктор
Практическое использование модуля Panels. Богуцкий ВикторПрактическое использование модуля Panels. Богуцкий Виктор
Практическое использование модуля Panels. Богуцкий Виктор
 
Album cover planning
Album cover planningAlbum cover planning
Album cover planning
 
Album cover final
Album cover finalAlbum cover final
Album cover final
 
Michael turner a2 media coursework
Michael turner a2 media courseworkMichael turner a2 media coursework
Michael turner a2 media coursework
 
Lessons from the movie lagaan
Lessons from the movie lagaanLessons from the movie lagaan
Lessons from the movie lagaan
 

Similar to Object oriented css. Graeme Blackwood

Object oriented css graeme blackwood
Object oriented css graeme blackwoodObject oriented css graeme blackwood
Object oriented css graeme blackwooddrupalconf
 
Object Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable developmentObject Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable developmentGraeme Blackwood
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourOsama Ghandour Geris
 
Css week11 2019 2020 for g10 by eng.osama ghandour
Css week11 2019 2020 for g10 by eng.osama ghandourCss week11 2019 2020 for g10 by eng.osama ghandour
Css week11 2019 2020 for g10 by eng.osama ghandourOsama Ghandour Geris
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS TroubleshootingDenise Jacobs
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Mediacurrent
 
6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable10Clouds
 
CSS Framework + Progressive Enhacements
CSS Framework + Progressive EnhacementsCSS Framework + Progressive Enhacements
CSS Framework + Progressive EnhacementsMario Hernandez
 
The Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital CampThe Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital Campcanarymason
 
Css masterclass book
Css masterclass bookCss masterclass book
Css masterclass bookPhoenix
 
Drupaldelphia Shortcuts Cheats And Cheap Stunts
Drupaldelphia  Shortcuts Cheats And Cheap StuntsDrupaldelphia  Shortcuts Cheats And Cheap Stunts
Drupaldelphia Shortcuts Cheats And Cheap Stuntscanarymason
 
Oooh shiny
Oooh shinyOooh shiny
Oooh shinywcto2017
 
WordCamp NYC - DRY CSS
WordCamp NYC - DRY CSSWordCamp NYC - DRY CSS
WordCamp NYC - DRY CSSJer Clarke
 
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeCreating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeAcquia
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of LayoutStephen Hay
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeSuzanne Dergacheva
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...Jer Clarke
 

Similar to Object oriented css. Graeme Blackwood (20)

Object oriented css graeme blackwood
Object oriented css graeme blackwoodObject oriented css graeme blackwood
Object oriented css graeme blackwood
 
Object Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable developmentObject Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable development
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
 
Css week11 2019 2020 for g10 by eng.osama ghandour
Css week11 2019 2020 for g10 by eng.osama ghandourCss week11 2019 2020 for g10 by eng.osama ghandour
Css week11 2019 2020 for g10 by eng.osama ghandour
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable
 
CSS Framework + Progressive Enhacements
CSS Framework + Progressive EnhacementsCSS Framework + Progressive Enhacements
CSS Framework + Progressive Enhacements
 
The Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital CampThe Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital Camp
 
Css masterclass book
Css masterclass bookCss masterclass book
Css masterclass book
 
Css
CssCss
Css
 
Drupaldelphia Shortcuts Cheats And Cheap Stunts
Drupaldelphia  Shortcuts Cheats And Cheap StuntsDrupaldelphia  Shortcuts Cheats And Cheap Stunts
Drupaldelphia Shortcuts Cheats And Cheap Stunts
 
Oooh shiny
Oooh shinyOooh shiny
Oooh shiny
 
WordCamp NYC - DRY CSS
WordCamp NYC - DRY CSSWordCamp NYC - DRY CSS
WordCamp NYC - DRY CSS
 
LESS is More
LESS is MoreLESS is More
LESS is More
 
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeCreating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
 
Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
 

More from PVasili

Как зарабатывать друпал разработчику. Клют Иван
Как зарабатывать друпал разработчику. Клют ИванКак зарабатывать друпал разработчику. Клют Иван
Как зарабатывать друпал разработчику. Клют ИванPVasili
 
Easy authcache 2 кэширование для pro. Родионов Игорь
Easy authcache 2   кэширование для pro. Родионов ИгорьEasy authcache 2   кэширование для pro. Родионов Игорь
Easy authcache 2 кэширование для pro. Родионов ИгорьPVasili
 
Business friendly Drupal, Павел Прищепа
Business friendly Drupal, Павел ПрищепаBusiness friendly Drupal, Павел Прищепа
Business friendly Drupal, Павел ПрищепаPVasili
 
построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...
построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...
построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...PVasili
 
инструкция по оптимизации сайтов на Drupal херени даниэл
инструкция по оптимизации сайтов на Drupal херени даниэлинструкция по оптимизации сайтов на Drupal херени даниэл
инструкция по оптимизации сайтов на Drupal херени даниэлPVasili
 
фотосток на Drupal+maestro Житарёв Антон
фотосток на Drupal+maestro Житарёв Антонфотосток на Drupal+maestro Житарёв Антон
фотосток на Drupal+maestro Житарёв АнтонPVasili
 
Непрерывная интеграция шаг к непрерывному деплою. Родионов Игорь
Непрерывная интеграция шаг к непрерывному деплою. Родионов ИгорьНепрерывная интеграция шаг к непрерывному деплою. Родионов Игорь
Непрерывная интеграция шаг к непрерывному деплою. Родионов ИгорьPVasili
 
Drupal и мобильные устройства, Комелин Константин
Drupal и мобильные устройства, Комелин КонстантинDrupal и мобильные устройства, Комелин Константин
Drupal и мобильные устройства, Комелин КонстантинPVasili
 
Кеширование на высоконагруженном Drupal сайте. Архаров Роман
Кеширование на высоконагруженном Drupal сайте. Архаров РоманКеширование на высоконагруженном Drupal сайте. Архаров Роман
Кеширование на высоконагруженном Drupal сайте. Архаров РоманPVasili
 
Опыт построения компании-разработчика Интернет проектов на Drupal
Опыт построения компании-разработчика Интернет проектов на DrupalОпыт построения компании-разработчика Интернет проектов на Drupal
Опыт построения компании-разработчика Интернет проектов на DrupalPVasili
 
Свой проект на drupal.org от идеи до первого релиза.
Свой проект на drupal.org от идеи до первого релиза.Свой проект на drupal.org от идеи до первого релиза.
Свой проект на drupal.org от идеи до первого релиза.PVasili
 
Интеграция Яндекс Сервер
Интеграция Яндекс СерверИнтеграция Яндекс Сервер
Интеграция Яндекс СерверPVasili
 
Microsoft , Azure и Drupal
Microsoft , Azure и DrupalMicrosoft , Azure и Drupal
Microsoft , Azure и DrupalPVasili
 
Нагрузочное тестирование проектов на Drupal с использованием Apache JMeter
Нагрузочное тестирование проектов на Drupal с использованием Apache JMeterНагрузочное тестирование проектов на Drupal с использованием Apache JMeter
Нагрузочное тестирование проектов на Drupal с использованием Apache JMeterPVasili
 
Поисковая оптимизация интернет-магазины на базе Drupal Commerce
Поисковая оптимизация интернет-магазины на базе Drupal CommerceПоисковая оптимизация интернет-магазины на базе Drupal Commerce
Поисковая оптимизация интернет-магазины на базе Drupal CommercePVasili
 
Инструментарий продвинутого командного разработчика
Инструментарий продвинутого командного разработчикаИнструментарий продвинутого командного разработчика
Инструментарий продвинутого командного разработчикаPVasili
 
Приём платежей для CMS
Приём платежей для CMSПриём платежей для CMS
Приём платежей для CMSPVasili
 
Системы управления взаимоотношениями с клиентами. Drupal CRM.
Системы управления взаимоотношениями с клиентами. Drupal CRM.Системы управления взаимоотношениями с клиентами. Drupal CRM.
Системы управления взаимоотношениями с клиентами. Drupal CRM.PVasili
 
Увеличение качества и прибыльности проекта для разработчика.
Увеличение качества и прибыльности проекта для разработчика.Увеличение качества и прибыльности проекта для разработчика.
Увеличение качества и прибыльности проекта для разработчика.PVasili
 
Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...
Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...
Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...PVasili
 

More from PVasili (20)

Как зарабатывать друпал разработчику. Клют Иван
Как зарабатывать друпал разработчику. Клют ИванКак зарабатывать друпал разработчику. Клют Иван
Как зарабатывать друпал разработчику. Клют Иван
 
Easy authcache 2 кэширование для pro. Родионов Игорь
Easy authcache 2   кэширование для pro. Родионов ИгорьEasy authcache 2   кэширование для pro. Родионов Игорь
Easy authcache 2 кэширование для pro. Родионов Игорь
 
Business friendly Drupal, Павел Прищепа
Business friendly Drupal, Павел ПрищепаBusiness friendly Drupal, Павел Прищепа
Business friendly Drupal, Павел Прищепа
 
построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...
построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...
построение внутренней ссылочной структуры сайта на Drupal 7 (seo). Костин ...
 
инструкция по оптимизации сайтов на Drupal херени даниэл
инструкция по оптимизации сайтов на Drupal херени даниэлинструкция по оптимизации сайтов на Drupal херени даниэл
инструкция по оптимизации сайтов на Drupal херени даниэл
 
фотосток на Drupal+maestro Житарёв Антон
фотосток на Drupal+maestro Житарёв Антонфотосток на Drupal+maestro Житарёв Антон
фотосток на Drupal+maestro Житарёв Антон
 
Непрерывная интеграция шаг к непрерывному деплою. Родионов Игорь
Непрерывная интеграция шаг к непрерывному деплою. Родионов ИгорьНепрерывная интеграция шаг к непрерывному деплою. Родионов Игорь
Непрерывная интеграция шаг к непрерывному деплою. Родионов Игорь
 
Drupal и мобильные устройства, Комелин Константин
Drupal и мобильные устройства, Комелин КонстантинDrupal и мобильные устройства, Комелин Константин
Drupal и мобильные устройства, Комелин Константин
 
Кеширование на высоконагруженном Drupal сайте. Архаров Роман
Кеширование на высоконагруженном Drupal сайте. Архаров РоманКеширование на высоконагруженном Drupal сайте. Архаров Роман
Кеширование на высоконагруженном Drupal сайте. Архаров Роман
 
Опыт построения компании-разработчика Интернет проектов на Drupal
Опыт построения компании-разработчика Интернет проектов на DrupalОпыт построения компании-разработчика Интернет проектов на Drupal
Опыт построения компании-разработчика Интернет проектов на Drupal
 
Свой проект на drupal.org от идеи до первого релиза.
Свой проект на drupal.org от идеи до первого релиза.Свой проект на drupal.org от идеи до первого релиза.
Свой проект на drupal.org от идеи до первого релиза.
 
Интеграция Яндекс Сервер
Интеграция Яндекс СерверИнтеграция Яндекс Сервер
Интеграция Яндекс Сервер
 
Microsoft , Azure и Drupal
Microsoft , Azure и DrupalMicrosoft , Azure и Drupal
Microsoft , Azure и Drupal
 
Нагрузочное тестирование проектов на Drupal с использованием Apache JMeter
Нагрузочное тестирование проектов на Drupal с использованием Apache JMeterНагрузочное тестирование проектов на Drupal с использованием Apache JMeter
Нагрузочное тестирование проектов на Drupal с использованием Apache JMeter
 
Поисковая оптимизация интернет-магазины на базе Drupal Commerce
Поисковая оптимизация интернет-магазины на базе Drupal CommerceПоисковая оптимизация интернет-магазины на базе Drupal Commerce
Поисковая оптимизация интернет-магазины на базе Drupal Commerce
 
Инструментарий продвинутого командного разработчика
Инструментарий продвинутого командного разработчикаИнструментарий продвинутого командного разработчика
Инструментарий продвинутого командного разработчика
 
Приём платежей для CMS
Приём платежей для CMSПриём платежей для CMS
Приём платежей для CMS
 
Системы управления взаимоотношениями с клиентами. Drupal CRM.
Системы управления взаимоотношениями с клиентами. Drupal CRM.Системы управления взаимоотношениями с клиентами. Drupal CRM.
Системы управления взаимоотношениями с клиентами. Drupal CRM.
 
Увеличение качества и прибыльности проекта для разработчика.
Увеличение качества и прибыльности проекта для разработчика.Увеличение качества и прибыльности проекта для разработчика.
Увеличение качества и прибыльности проекта для разработчика.
 
Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...
Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...
Drupal vs Бизнес: почему Drupal лучше любого framework и как его правильно го...
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Object oriented css. Graeme Blackwood

Editor's Notes

  1. Harder to maintain Bloated code is harder to read due to the sheer volume of it If the style of something changes, every instance has to be updated individually, and on bigger sites, this often means something getting missed until the client complains – not cool Adding features to / scaling up a website simply bloats the CSS
  2. So what’s the solution?
  3. What does this involve?
  4. Less likely to break other parts of your site when you change things. Navigating through the code is easier Less conflicting styles Code won’t be littered with importants Scale it right up
  5. CEM
  6. Your love affair with object oriented CSS is about to begin
  7. If not, this is the first step toward OOCSS. It could be a grid system you wrote yourself, or one like 960gs, blueprint etc. In fact, I recommend using a responsive grid system.
  8. I probably don’t have to say this... Boilerplate’s CSS works even if you’re not using HTML5 Better than Eric Meyer’s reset.css, which causes problems with Drupal.
  9. Good base styles are particularly important for typography. It may even be worth separating your typographic styles into a separate stylesheet. Border-box is incredibly useful for controlling sizes when needing to use padding and borders. And it works in IE7!
  10. Focus on getting the code right before tackling Drupal’s way Helps me really understand my frontend code before I theme But think of the developers/themers if you’re not the one doing the implementation
  11. Controversial It can feel faster to just style the output and forget about it But this means all the downsides already mentioned will become realities Once classes start going in, the theme falls into place rapidly It is just as fast, and the more you do, the faster it gets
  12. Drupal’s output is currently not very semantic Fortunately this is starting to improve thanks to you guys I find Display Suite a massive help, and it is very simple to learn I output views as HTML Lists and then theme them to add my classes
  13. Notice how it reads like normal language too
  14. The grid-4 class provides the div with its layout styles The theme-a class provides it with its theme Because the base styles for H3s and Ps don’t have colours assigned, they will inherit the colour in the theme
  15. It flexes to the container No extra styling, markup changes or classes needed
  16. CSS authoring frameworks like Compass and preprocessors like SASS and LESS can make life for the frontend dev a lot easier They are also a great way to get your head into Object Oriented CSS (the SCSS syntax is closer to normal CSS so I recommend using that) Variables, mixins, nesting etc can formalise the whole Object Oriented approach Compass Generating vendor prefixes for you is particularly handy!
  17. But for those that aren’t ready to make the move to a new way of authoring CSS, the principles I have been discussing will work right now.
  18. Firebug is generated CSS You have to trace back through to the SASS to fix
  19. Not only is SASS another layer to debug if something isn’t working properly (particularly for cross-browser testing) It can also make things nasty with nested selectors and overrides – the very things OOCSS is trying to avoid.
  20. Also CSS preprocessors shouldn’t just be used to facilitate a new type of lazy coding. I have seen some generated CSS files three times the size of hand-coded ones – that’s over 110Kb or 5,000 lines for a file that could be 35Kb/1,700 lines or so.