SlideShare a Scribd company logo
1 of 63
Color Me Flexible
New options for colorable D7 themes

              by @stevenmerrill

         steven@treehouseagency.com

            http://dgo.to/@smerrill
The Color Module
The Color Module

• Core module
The Color Module

• Core module

• New D7 core themes must support it
The Color Module

• Core module

• New D7 core themes must support it

• Nearly unchanged from Drupal 5 to 6
What’s Changed?
What’s Changed?

• Mainly, colors in .png files.
What’s Changed?

• Mainly, colors in .png files.

• Lots of information available at
  http://drupal.org/node/
  108459 regarding exactly
  what color.module can do and
  how Garland is assembled.
What’s Changed?
What’s Changed?
• The stylesheet also gets
  rewritten.
What’s Changed?
• The stylesheet also gets
  rewritten.

• CSS files are processed by a
  regex that splits up the file into
  chunks whenever it finds the
  pattern #aaaaaa or #aaa.
What’s Changed?
• The stylesheet also gets
  rewritten.

• CSS files are processed by a
  regex that splits up the file into
  chunks whenever it finds the
  pattern #aaaaaa or #aaa.

• The CSS parser stops when it
  hits a comment with the text
  “Color Module: Don’t Touch”.
Color Shifting




   (Check out the _color_rewrite_stylesheet() and
 _color_shift() functions in color.module to see this.)
Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
  specifies 5 colors: base, link, top,
  bottom, text.




                       (Check out the _color_rewrite_stylesheet() and
                     _color_shift() functions in color.module to see this.)
Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
  specifies 5 colors: base, link, top,
  bottom, text.

• These determine how colors shift:




                       (Check out the _color_rewrite_stylesheet() and
                     _color_shift() functions in color.module to see this.)
Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
  specifies 5 colors: base, link, top,
  bottom, text.

• These determine how colors shift:

• Exact matches are replaced.




                       (Check out the _color_rewrite_stylesheet() and
                     _color_shift() functions in color.module to see this.)
Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
  specifies 5 colors: base, link, top,
  bottom, text.

• These determine how colors shift:

• Exact matches are replaced.

• ‘a’ selectors are shifted towards
  ‘link’.




                       (Check out the _color_rewrite_stylesheet() and
                     _color_shift() functions in color.module to see this.)
Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
  specifies 5 colors: base, link, top,
  bottom, text.

• These determine how colors shift:

• Exact matches are replaced.

• ‘a’ selectors are shifted towards
  ‘link’.

• ‘color: [blah]’ declarations are shifted
  towards ‘text’.



                         (Check out the _color_rewrite_stylesheet() and
                       _color_shift() functions in color.module to see this.)
Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
  specifies 5 colors: base, link, top,
  bottom, text.

• These determine how colors shift:

• Exact matches are replaced.

• ‘a’ selectors are shifted towards
  ‘link’.

• ‘color: [blah]’ declarations are shifted
  towards ‘text’.

• All others are shifted towards ‘base’.

                         (Check out the _color_rewrite_stylesheet() and
                       _color_shift() functions in color.module to see this.)
D5 / D6 Shortcomings




    Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!

• 5 colors tops




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!

• 5 colors tops

  • Special meanings for most




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!

• 5 colors tops

  • Special meanings for most

• Image recoloring is not always
  the answer




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!

• 5 colors tops

  • Special meanings for most

• Image recoloring is not always
  the answer

• Hardcoded preview HTML
  and JavaScript


              Credit: http://www.flickr.com/photos/foxtongue/23281162/
What Themers Want




  Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
What Themers Want
• More colors!




             Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
What Themers Want
• More colors!

• Customizable labels for said
  colors




             Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
What Themers Want
• More colors!

• Customizable labels for said
  colors

• Use of CSS3 gradients and
  progressive enhancement




             Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
What Themers Want
• More colors!

• Customizable labels for said
  colors

• Use of CSS3 gradients and
  progressive enhancement

• “Quality meals at affordable
  prices”
  – (http://dgo.to/@johnvsc)

             Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
Improvements in D7




 All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
Improvements in D7

• An unlimited number of
  customizable colors with
  labels that show up in the UI.




         All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
Improvements in D7

• An unlimited number of
  customizable colors with
  labels that show up in the UI.

• ‘base’, ‘link’ and ‘text’ still
  maintain their magic color-
  shifting prowess.




          All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
Customizable Previews




       Same deal. Check our core CVS.
Customizable Previews

• Each theme may now provide
  its own preview HTML, CSS
  and JavaScript files.




                    Same deal. Check our core CVS.
Garland’s Preview HTML
Garland’s Preview HTML

• Three divs
Garland’s Preview HTML

• Three divs

• An h2
Garland’s Preview HTML

• Three divs

• An h2

•Ap
Garland’s Preview HTML

• Three divs

• An h2

•Ap

• An a
Bartik’s Preview
Bartik’s Preview


• A tad bit more.
Bartik, cont’d
Bartik, cont’d

• Hi-fidelity live preview
Bartik, cont’d

• Hi-fidelity live preview

• Includes your site’s logo
Bartik, cont’d

• Hi-fidelity live preview

• Includes your site’s logo

  • JS magic at the top of
    color.inc
Not In Use
Not In Use

• PNG recoloring
Not In Use

• PNG recoloring

• color.module gradients
Not In Use

• PNG recoloring

• color.module gradients

• base color shifting
CSS3!
We don’t need no stinkin’ PNG files.
Limitations / D8 Roadmap
Limitations / D8 Roadmap


• Colors must be unique to be
  searched and replaced
Relevant Issues
• http://drupal.org/node/683026

• http://drupal.org/node/833154

• http://drupal.org/node/769922

• http://drupal.org/node/762462

• http://drupal.org/node/801446

• http://drupal.org/node/762474
                I know you love reading issue queues.
Relevant Issues
• http://drupal.org/node/776684

• http://drupal.org/node/778880

• http://drupal.org/node/693504

• http://drupal.org/node/700170

• http://drupal.org/node/762468

• http://drupal.org/node/845742
                       I sure do.
Thanks




Community plumbing, baby.
Thanks
• @jensimmons and the whole international group
  who worked on Bartik




                 Community plumbing, baby.
Thanks
• @jensimmons and the whole international group
  who worked on Bartik

• Members of the Busy and Corolla groups who
  chimed in on these issues




                 Community plumbing, baby.
Thanks
• @jensimmons and the whole international group
  who worked on Bartik

• Members of the Busy and Corolla groups who
  chimed in on these issues

• Dries and webchick for committing
  color.module patches

                 Community plumbing, baby.
Questions?

More Related Content

What's hot

Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)Sean Cribbs
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elementsIn a Rocket
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / InheritanceIn a Rocket
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - Ivincentleeuwen
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for cssshabab shihan
 
Perfect Styling - How to write better CSS
Perfect Styling - How to write better CSSPerfect Styling - How to write better CSS
Perfect Styling - How to write better CSSArtem Tabalin
 
Schema Design for Riak
Schema Design for RiakSchema Design for Riak
Schema Design for RiakSean Cribbs
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal ThemingJohn Albin Wilkins
 
Web ninja html & css
Web ninja   html & cssWeb ninja   html & css
Web ninja html & cssAlfi Rizka
 
Extensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions PortlandExtensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions PortlandExtensis
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Developmentkmloomis
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
Customizing the Appearance and HTML Output of Visualforce Pages
Customizing the Appearance and HTML Output of VisualforcePages Customizing the Appearance and HTML Output of VisualforcePages
Customizing the Appearance and HTML Output of Visualforce Pages Mohammed Safwat Abu Kwaik
 

What's hot (19)

Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)
 
Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - I
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for css
 
Perfect Styling - How to write better CSS
Perfect Styling - How to write better CSSPerfect Styling - How to write better CSS
Perfect Styling - How to write better CSS
 
Schema Design for Riak
Schema Design for RiakSchema Design for Riak
Schema Design for Riak
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal Theming
 
Web ninja html & css
Web ninja   html & cssWeb ninja   html & css
Web ninja html & css
 
Extensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions PortlandExtensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions Portland
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Demystifying WordPress Conditional Tags
Demystifying WordPress Conditional TagsDemystifying WordPress Conditional Tags
Demystifying WordPress Conditional Tags
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
 
CSS
CSSCSS
CSS
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Development
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
Customizing the Appearance and HTML Output of Visualforce Pages
Customizing the Appearance and HTML Output of VisualforcePages Customizing the Appearance and HTML Output of VisualforcePages
Customizing the Appearance and HTML Output of Visualforce Pages
 
Ppt ch08
Ppt ch08Ppt ch08
Ppt ch08
 

Viewers also liked

Behavioral Segmentation Analytics
Behavioral Segmentation AnalyticsBehavioral Segmentation Analytics
Behavioral Segmentation AnalyticsLance Wills
 
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)CSR Västsverige
 
15RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep3015RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep30Wayne Reid
 
Plantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinningPlantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinningCarmen Ruiz Morcillo
 
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)CSR Västsverige
 
Life at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British ColumbiaLife at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British ColumbiaVCAD
 
Hudson: Your robotic butler
Hudson: Your robotic butlerHudson: Your robotic butler
Hudson: Your robotic butlerSteven Merrill
 
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...Texas A&M Transportation Institute
 
عيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتيةعيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتيةSherif Swedan
 
Importance of highway maintenance
Importance of highway maintenanceImportance of highway maintenance
Importance of highway maintenanceDharmesh Vadher
 
Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)Docker, Inc.
 
Pavement Maintenance Practices in
Pavement Maintenance Practices inPavement Maintenance Practices in
Pavement Maintenance Practices inMohhammad Sujon
 

Viewers also liked (15)

Behavioral Segmentation Analytics
Behavioral Segmentation AnalyticsBehavioral Segmentation Analytics
Behavioral Segmentation Analytics
 
November/December Leverage
November/December LeverageNovember/December Leverage
November/December Leverage
 
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
 
15RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep3015RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep30
 
Plantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinningPlantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinning
 
Daniel inglish
Daniel inglishDaniel inglish
Daniel inglish
 
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
 
Life at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British ColumbiaLife at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
 
Hudson: Your robotic butler
Hudson: Your robotic butlerHudson: Your robotic butler
Hudson: Your robotic butler
 
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
 
عيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتيةعيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتية
 
RAP, RAS and Durable Asphalt Pavements
RAP, RAS and Durable Asphalt PavementsRAP, RAS and Durable Asphalt Pavements
RAP, RAS and Durable Asphalt Pavements
 
Importance of highway maintenance
Importance of highway maintenanceImportance of highway maintenance
Importance of highway maintenance
 
Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)
 
Pavement Maintenance Practices in
Pavement Maintenance Practices inPavement Maintenance Practices in
Pavement Maintenance Practices in
 

Similar to Color Me Flexible

Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Codinginspector_fegter
 
BITM3730 9-26.pptx
BITM3730 9-26.pptxBITM3730 9-26.pptx
BITM3730 9-26.pptxMattMarino13
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
44 Slides About 22 Modules
44 Slides About 22 Modules44 Slides About 22 Modules
44 Slides About 22 Modulesheyrocker
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
Developing client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp EdmontonDeveloping client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp EdmontonCurtis McHale
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS TroubleshootingDenise Jacobs
 
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Laura Scott
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptxMattMarino13
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptxMattMarino13
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceAdrian Roselli
 
Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3Divya Tiwari
 
Easier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdvEasier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdvJazkarta, Inc.
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme FrameworkJoe Casabona
 

Similar to Color Me Flexible (20)

Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Coding
 
BITM3730 9-26.pptx
BITM3730 9-26.pptxBITM3730 9-26.pptx
BITM3730 9-26.pptx
 
Css
CssCss
Css
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
44 Slides About 22 Modules
44 Slides About 22 Modules44 Slides About 22 Modules
44 Slides About 22 Modules
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
Developing client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp EdmontonDeveloping client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp Edmonton
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
Css
CssCss
Css
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster Conference
 
Css present
Css presentCss present
Css present
 
Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3
 
Easier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdvEasier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdv
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme Framework
 

Recently uploaded

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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Color Me Flexible

  • 1. Color Me Flexible New options for colorable D7 themes by @stevenmerrill steven@treehouseagency.com http://dgo.to/@smerrill
  • 3. The Color Module • Core module
  • 4. The Color Module • Core module • New D7 core themes must support it
  • 5. The Color Module • Core module • New D7 core themes must support it • Nearly unchanged from Drupal 5 to 6
  • 6.
  • 7.
  • 8.
  • 10. What’s Changed? • Mainly, colors in .png files.
  • 11. What’s Changed? • Mainly, colors in .png files. • Lots of information available at http://drupal.org/node/ 108459 regarding exactly what color.module can do and how Garland is assembled.
  • 13. What’s Changed? • The stylesheet also gets rewritten.
  • 14. What’s Changed? • The stylesheet also gets rewritten. • CSS files are processed by a regex that splits up the file into chunks whenever it finds the pattern #aaaaaa or #aaa.
  • 15. What’s Changed? • The stylesheet also gets rewritten. • CSS files are processed by a regex that splits up the file into chunks whenever it finds the pattern #aaaaaa or #aaa. • The CSS parser stops when it hits a comment with the text “Color Module: Don’t Touch”.
  • 16. Color Shifting (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 17. Color Shifting • A Drupal 5 or 6 theme’s color.inc file specifies 5 colors: base, link, top, bottom, text. (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 18. Color Shifting • A Drupal 5 or 6 theme’s color.inc file specifies 5 colors: base, link, top, bottom, text. • These determine how colors shift: (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 19. Color Shifting • A Drupal 5 or 6 theme’s color.inc file specifies 5 colors: base, link, top, bottom, text. • These determine how colors shift: • Exact matches are replaced. (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 20. Color Shifting • A Drupal 5 or 6 theme’s color.inc file specifies 5 colors: base, link, top, bottom, text. • These determine how colors shift: • Exact matches are replaced. • ‘a’ selectors are shifted towards ‘link’. (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 21. Color Shifting • A Drupal 5 or 6 theme’s color.inc file specifies 5 colors: base, link, top, bottom, text. • These determine how colors shift: • Exact matches are replaced. • ‘a’ selectors are shifted towards ‘link’. • ‘color: [blah]’ declarations are shifted towards ‘text’. (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 22. Color Shifting • A Drupal 5 or 6 theme’s color.inc file specifies 5 colors: base, link, top, bottom, text. • These determine how colors shift: • Exact matches are replaced. • ‘a’ selectors are shifted towards ‘link’. • ‘color: [blah]’ declarations are shifted towards ‘text’. • All others are shifted towards ‘base’. (Check out the _color_rewrite_stylesheet() and _color_shift() functions in color.module to see this.)
  • 23. D5 / D6 Shortcomings Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 24. D5 / D6 Shortcomings • Not flexible enough! Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 25. D5 / D6 Shortcomings • Not flexible enough! • 5 colors tops Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 26. D5 / D6 Shortcomings • Not flexible enough! • 5 colors tops • Special meanings for most Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 27. D5 / D6 Shortcomings • Not flexible enough! • 5 colors tops • Special meanings for most • Image recoloring is not always the answer Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 28. D5 / D6 Shortcomings • Not flexible enough! • 5 colors tops • Special meanings for most • Image recoloring is not always the answer • Hardcoded preview HTML and JavaScript Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 29. What Themers Want Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
  • 30. What Themers Want • More colors! Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
  • 31. What Themers Want • More colors! • Customizable labels for said colors Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
  • 32. What Themers Want • More colors! • Customizable labels for said colors • Use of CSS3 gradients and progressive enhancement Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
  • 33. What Themers Want • More colors! • Customizable labels for said colors • Use of CSS3 gradients and progressive enhancement • “Quality meals at affordable prices” – (http://dgo.to/@johnvsc) Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
  • 34. Improvements in D7 All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
  • 35. Improvements in D7 • An unlimited number of customizable colors with labels that show up in the UI. All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
  • 36. Improvements in D7 • An unlimited number of customizable colors with labels that show up in the UI. • ‘base’, ‘link’ and ‘text’ still maintain their magic color- shifting prowess. All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
  • 37. Customizable Previews Same deal. Check our core CVS.
  • 38. Customizable Previews • Each theme may now provide its own preview HTML, CSS and JavaScript files. Same deal. Check our core CVS.
  • 41. Garland’s Preview HTML • Three divs • An h2
  • 42. Garland’s Preview HTML • Three divs • An h2 •Ap
  • 43. Garland’s Preview HTML • Three divs • An h2 •Ap • An a
  • 45. Bartik’s Preview • A tad bit more.
  • 48. Bartik, cont’d • Hi-fidelity live preview • Includes your site’s logo
  • 49. Bartik, cont’d • Hi-fidelity live preview • Includes your site’s logo • JS magic at the top of color.inc
  • 51. Not In Use • PNG recoloring
  • 52. Not In Use • PNG recoloring • color.module gradients
  • 53. Not In Use • PNG recoloring • color.module gradients • base color shifting
  • 54. CSS3! We don’t need no stinkin’ PNG files.
  • 55. Limitations / D8 Roadmap
  • 56. Limitations / D8 Roadmap • Colors must be unique to be searched and replaced
  • 57. Relevant Issues • http://drupal.org/node/683026 • http://drupal.org/node/833154 • http://drupal.org/node/769922 • http://drupal.org/node/762462 • http://drupal.org/node/801446 • http://drupal.org/node/762474 I know you love reading issue queues.
  • 58. Relevant Issues • http://drupal.org/node/776684 • http://drupal.org/node/778880 • http://drupal.org/node/693504 • http://drupal.org/node/700170 • http://drupal.org/node/762468 • http://drupal.org/node/845742 I sure do.
  • 60. Thanks • @jensimmons and the whole international group who worked on Bartik Community plumbing, baby.
  • 61. Thanks • @jensimmons and the whole international group who worked on Bartik • Members of the Busy and Corolla groups who chimed in on these issues Community plumbing, baby.
  • 62. Thanks • @jensimmons and the whole international group who worked on Bartik • Members of the Busy and Corolla groups who chimed in on these issues • Dries and webchick for committing color.module patches Community plumbing, baby.

Editor's Notes