SlideShare a Scribd company logo
Wednesday, November 2, 11
BUILDING SENCHA THEMES
                            David Kaneda and Rob Dougan

                              @davidkaneda @rdougan




Wednesday, November 2, 11
Eww.

Wednesday, November 2, 11
Sass & Compass
                                http://www.sass-lang.com
                             http://www.compass-style.org/
                                                             He l lo !




Wednesday, November 2, 11
Compass
                            .SCSS   Ruby      .CSS
                                     Sass




                             The Basic Idea

Wednesday, November 2, 11
Variables
       $blue: #3bbfce;
       $margin: 16px;

       .example1 {
          border-color: $blue;
       }

       .example2 {
          margin: $margin;
          color: $blue;
       }




Wednesday, November 2, 11
Variables CSS
            .example1 {
              border-color: #3bbfce;
            }

            .example2 {
              margin: 16px;
              color: #3bbfce;
            }




Wednesday, November 2, 11
Math
            $one: 8px;
            $two: 16px;
            $three: 3px;

            .example1 {
                border: 1px solid $one / 2;
            }

            .example2 {
                margin: $two + $three;
            }




Wednesday, November 2, 11
Math CSS
            .example1 {
              border: 1px solid 4px;
            }

            .example2 {
              margin: 19px;
            }




Wednesday, November 2, 11
Nesting
       .example1 {
           border-color: #000;

                  .example2 {
                      color: red;
                  }
       }




Wednesday, November 2, 11
Nesting CSS
            .example1 {
              border-color: #000;
            }

            .example1 .example2 {
              color: red;
            }




Wednesday, November 2, 11
Color
       .color {
           color: darken(yellow, 10);
           background: lighten(blue, 30);
           border-color: saturate(#aa0000, 10);
       }




Wednesday, November 2, 11
Color CSS
            .color {
              color: #cccc00;
              background: #9999ff;
              border-color: #aa0000;
            }




Wednesday, November 2, 11
Mixins
       @mixin add-stuff($color) {
           color: $color;
           background-color: #000;

                  .child {
                      padding: 5px;
                  }
       }

       .example {
           @include add-stuff(blue);
       }



Wednesday, November 2, 11
Mixins CSS
       .example {
         color: blue;
         background-color: #000;
       }

       .example .child {
         padding: 5px;
       }




Wednesday, November 2, 11
Compass




Wednesday, November 2, 11
Compass CSS3 Mixins
                              border-radius
                               box-shadow
                               text-shadow
                                  opacity
                             linear-gradient
                                color-stops
                            and many more...




Wednesday, November 2, 11
Compass Watch




Wednesday, November 2, 11
And more…
                            Parent referencing
                                Functions
                            Base64 encoding
                                 Spriting
                                @extend




Wednesday, November 2, 11
config.rb
       # Get the directory that this file exists in
       dir = File.dirname(__FILE__)

       # Load the sencha-touch framework automatically
       load File.join(dir, '..', 'js', 'sencha-
         touch-2.0', 'resources', 'themes')

       # Compass configurations
       sass_path    = dir
       css_path     = File.join(dir, "..", "css")
       environment = :debug
       output_style = :expanded



Wednesday, November 2, 11
Installation
                            sudo gem install compass




Wednesday, November 2, 11
Quick Preview




Wednesday, November 2, 11
Sencha Touch




Wednesday, November 2, 11
Wednesday, November 2, 11
CSS3
       Gradients
       Text Shadows
       Box Shadows
       Masks
       Border Radius
       Selectors
       :first/last/nth-child
       :before/after




Wednesday, November 2, 11
Variables
                             $base-color




Wednesday, November 2, 11
Mixins
       @include background-gradient($bg-color, $type);
       bevel, glossy, matte, flat
       @include color-by-background($bg-color, $contrast: 100%);
       @include bevel-by-background($bg-color);
       @include mask-by-background($bg-color, $contrast, $style);




Wednesday, November 2, 11
Icons
       300+ icons included
       SCSS: @include pictos-iconmask(‘refresh’);
       JS: {xtype: ‘button’, iconCls: ‘refresh’, iconMask: true, ui: ‘drastic’ }




Wednesday, November 2, 11
Mixins & JavaScript




Wednesday, November 2, 11
The UI attribute
       “UI” can be added to components
       Several components have default UIs

       Toolbar, Carousel, TabBar
       light/dark

       Buttons
       default/drastic/confirm/back/forward & round/small




Wednesday, November 2, 11
SCSS




        JAVASCRIPT




Wednesday, November 2, 11
SCSS


        JAVASCRIPT




Wednesday, November 2, 11
SCSS


        JAVASCRIPT




Wednesday, November 2, 11
Sencha Touch 2 docs

Wednesday, November 2, 11
Recap: When to use what
       ui
       Wherever possible. A great start even if you’re creating
       custom styles.

       cls
       If element doesn’t have ui mixins, or you want to further
       differentiate two elements with the same UI.

       componentCls
       If you’re developing a custom extension, this can be a
       good way to scope all of your sub-components.

       style Never. Ever. Just think of it as deprecated.

Wednesday, November 2, 11
Optimization Tips
                             Remove unused components
                                  Remove Images
                                    Remove UIs
                              output_style: compressed




Wednesday, November 2, 11
myapp.scss
       // Colors
       $base-color: #F25A34; // Share orange

       // Optimizations
       $include-default-icons: false;

       // Library
       @import 'sencha-touch/default/all';
       @include sencha-panel;
       @include sencha-buttons;
       @include sencha-toolbar;
       @include sencha-carousel;
       @include sencha-indexbar;
       @include sencha-list;
       @include sencha-layout;
       @include sencha-msgbox;
       @include sencha-loading-spinner;

       @import 'include/typography';

       body {

Wednesday, November 2, 11
Demo




Wednesday, November 2, 11
Ext JS




Wednesday, November 2, 11
Variables




Wednesday, November 2, 11
$base-color

Wednesday, November 2, 11
0 6px                   30px 10px
                                    $grid-header-padding

Wednesday, November 2, 11
Mixins




Wednesday, November 2, 11
Demo




Wednesday, November 2, 11
Wednesday, November 2, 11
Slicer
                            http://sencha.com/products/sdk-tools/




Wednesday, November 2, 11
Demo




Wednesday, November 2, 11
Optimization




Wednesday, November 2, 11
Optimization
            $include-default: false;

            @import 'compass';
            @import 'ext4/default/all';

            @include extjs-button;
            @include extjs-panel;
            @include extjs-toolbar;




Wednesday, November 2, 11
22kb
                            Without Any Components




Wednesday, November 2, 11
Recap
                            New Theming System
                                 Variables
                                  Mixins
                                  Slicer
                               Optimization




Wednesday, November 2, 11
Neptune




Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
Kitchen Sink

Wednesday, November 2, 11
Wednesday, November 2, 11
Questions?

                            http://j.mp/sencha-themes

                                 @davidkaneda
                                  @rdougan

Wednesday, November 2, 11
Wednesday, November 2, 11

More Related Content

What's hot

Php user groupmemcached
Php user groupmemcachedPhp user groupmemcached
Php user groupmemcached
Jason Anderson
 
Database madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyDatabase madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemy
Jaime Buelta
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development Toolkit
Rebecca Murphey
 

What's hot (20)

Start your app the better way with Styled System
Start your app the better way with Styled SystemStart your app the better way with Styled System
Start your app the better way with Styled System
 
Django - sql alchemy - jquery
Django - sql alchemy - jqueryDjango - sql alchemy - jquery
Django - sql alchemy - jquery
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Terrific Frontends
Terrific FrontendsTerrific Frontends
Terrific Frontends
 
Mongo db mug_2012-02-07
Mongo db mug_2012-02-07Mongo db mug_2012-02-07
Mongo db mug_2012-02-07
 
jQuery, CSS3 and ColdFusion
jQuery, CSS3 and ColdFusionjQuery, CSS3 and ColdFusion
jQuery, CSS3 and ColdFusion
 
Using Templates to Achieve Awesomer Architecture
Using Templates to Achieve Awesomer ArchitectureUsing Templates to Achieve Awesomer Architecture
Using Templates to Achieve Awesomer Architecture
 
Integrating php withrabbitmq_zendcon
Integrating php withrabbitmq_zendconIntegrating php withrabbitmq_zendcon
Integrating php withrabbitmq_zendcon
 
Functionality Focused Code Organization
Functionality Focused Code OrganizationFunctionality Focused Code Organization
Functionality Focused Code Organization
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery Applications
 
Php user groupmemcached
Php user groupmemcachedPhp user groupmemcached
Php user groupmemcached
 
HTML5 - Pedro Rosa
HTML5 - Pedro RosaHTML5 - Pedro Rosa
HTML5 - Pedro Rosa
 
AngularJs
AngularJsAngularJs
AngularJs
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
 
Database madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyDatabase madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemy
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development Toolkit
 
Python Templating Engine - Intro to Jinja
Python Templating Engine - Intro to JinjaPython Templating Engine - Intro to Jinja
Python Templating Engine - Intro to Jinja
 
Dojo Confessions
Dojo ConfessionsDojo Confessions
Dojo Confessions
 
My sql tutorial-oscon-2012
My sql tutorial-oscon-2012My sql tutorial-oscon-2012
My sql tutorial-oscon-2012
 
Es04
Es04Es04
Es04
 

Viewers also liked

GWT.create 2013: Themeing GWT Applications with the Appearance Pattern
GWT.create 2013: Themeing GWT Applications with the Appearance PatternGWT.create 2013: Themeing GWT Applications with the Appearance Pattern
GWT.create 2013: Themeing GWT Applications with the Appearance Pattern
niloc132
 
Create a mobile web app with Sencha Touch
Create a mobile web app with Sencha TouchCreate a mobile web app with Sencha Touch
Create a mobile web app with Sencha Touch
James Pearce
 

Viewers also liked (9)

Theming Ext JS 4
Theming Ext JS 4Theming Ext JS 4
Theming Ext JS 4
 
Sencha Touch Workshop
Sencha Touch WorkshopSencha Touch Workshop
Sencha Touch Workshop
 
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScriptSencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
 
Mobile app with sencha touch
Mobile app with sencha touchMobile app with sencha touch
Mobile app with sencha touch
 
GWT.create 2013: Themeing GWT Applications with the Appearance Pattern
GWT.create 2013: Themeing GWT Applications with the Appearance PatternGWT.create 2013: Themeing GWT Applications with the Appearance Pattern
GWT.create 2013: Themeing GWT Applications with the Appearance Pattern
 
Using UIBinder with Ext GWT 3.0
Using UIBinder with Ext GWT 3.0Using UIBinder with Ext GWT 3.0
Using UIBinder with Ext GWT 3.0
 
Create a mobile web app with Sencha Touch
Create a mobile web app with Sencha TouchCreate a mobile web app with Sencha Touch
Create a mobile web app with Sencha Touch
 
Sencha Touch Charts
Sencha Touch ChartsSencha Touch Charts
Sencha Touch Charts
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
 

Similar to Building Sencha Themes

Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
markstory
 
Dominion Enterprises _H@<k@th0n_
Dominion Enterprises _H@<k@th0n_Dominion Enterprises _H@<k@th0n_
Dominion Enterprises _H@<k@th0n_
Ken Collins
 
Peeling back your Network Layers with Security Onion
Peeling back your Network Layers with Security OnionPeeling back your Network Layers with Security Onion
Peeling back your Network Layers with Security Onion
Mark Hillick
 
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
JAX London
 

Similar to Building Sencha Themes (20)

Active Record Introduction - 3
Active Record Introduction - 3Active Record Introduction - 3
Active Record Introduction - 3
 
Sencha Animator
Sencha AnimatorSencha Animator
Sencha Animator
 
Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
 
Eine kleine Einführung in SASS
Eine kleine Einführung in SASSEine kleine Einführung in SASS
Eine kleine Einführung in SASS
 
Hardware Acceleration on Mobile, Ariya Hidayat & Jarred Nicholls
Hardware Acceleration on Mobile, Ariya Hidayat & Jarred NichollsHardware Acceleration on Mobile, Ariya Hidayat & Jarred Nicholls
Hardware Acceleration on Mobile, Ariya Hidayat & Jarred Nicholls
 
Dominion Enterprises _H@<k@th0n_
Dominion Enterprises _H@<k@th0n_Dominion Enterprises _H@<k@th0n_
Dominion Enterprises _H@<k@th0n_
 
What's new in HTML5, CSS3 and JavaScript, James Pearce
What's new in HTML5, CSS3 and JavaScript, James PearceWhat's new in HTML5, CSS3 and JavaScript, James Pearce
What's new in HTML5, CSS3 and JavaScript, James Pearce
 
Clojure: Return of the Jedi
Clojure: Return of the JediClojure: Return of the Jedi
Clojure: Return of the Jedi
 
Coffeescript
CoffeescriptCoffeescript
Coffeescript
 
Localizing iOS Apps
Localizing iOS AppsLocalizing iOS Apps
Localizing iOS Apps
 
NoSQL CGN: CouchDB (11/2011)
NoSQL CGN: CouchDB (11/2011)NoSQL CGN: CouchDB (11/2011)
NoSQL CGN: CouchDB (11/2011)
 
Modern HTML & CSS Coding: Speed, Semantics & Structure
Modern HTML & CSS Coding: Speed, Semantics & StructureModern HTML & CSS Coding: Speed, Semantics & Structure
Modern HTML & CSS Coding: Speed, Semantics & Structure
 
Cucumber Upgrade
Cucumber UpgradeCucumber Upgrade
Cucumber Upgrade
 
PHP Server-side Breakout
PHP Server-side BreakoutPHP Server-side Breakout
PHP Server-side Breakout
 
Peeling back your Network Layers with Security Onion
Peeling back your Network Layers with Security OnionPeeling back your Network Layers with Security Onion
Peeling back your Network Layers with Security Onion
 
Cloud9 IDE Talk at meet.js Poznań
Cloud9 IDE Talk at meet.js PoznańCloud9 IDE Talk at meet.js Poznań
Cloud9 IDE Talk at meet.js Poznań
 
De vuelta al pasado con SQL y stored procedures
De vuelta al pasado con SQL y stored proceduresDe vuelta al pasado con SQL y stored procedures
De vuelta al pasado con SQL y stored procedures
 
Sassy Stylesheets with SCSS
Sassy Stylesheets with SCSSSassy Stylesheets with SCSS
Sassy Stylesheets with SCSS
 
Secrets of the asset pipeline
Secrets of the asset pipelineSecrets of the asset pipeline
Secrets of the asset pipeline
 
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
 

More from Sencha

More from Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 

Building Sencha Themes

  • 2. BUILDING SENCHA THEMES David Kaneda and Rob Dougan @davidkaneda @rdougan Wednesday, November 2, 11
  • 4. Sass & Compass http://www.sass-lang.com http://www.compass-style.org/ He l lo ! Wednesday, November 2, 11
  • 5. Compass .SCSS Ruby .CSS Sass The Basic Idea Wednesday, November 2, 11
  • 6. Variables $blue: #3bbfce; $margin: 16px; .example1 { border-color: $blue; } .example2 { margin: $margin; color: $blue; } Wednesday, November 2, 11
  • 7. Variables CSS .example1 { border-color: #3bbfce; } .example2 { margin: 16px; color: #3bbfce; } Wednesday, November 2, 11
  • 8. Math $one: 8px; $two: 16px; $three: 3px; .example1 { border: 1px solid $one / 2; } .example2 { margin: $two + $three; } Wednesday, November 2, 11
  • 9. Math CSS .example1 { border: 1px solid 4px; } .example2 { margin: 19px; } Wednesday, November 2, 11
  • 10. Nesting .example1 { border-color: #000; .example2 { color: red; } } Wednesday, November 2, 11
  • 11. Nesting CSS .example1 { border-color: #000; } .example1 .example2 { color: red; } Wednesday, November 2, 11
  • 12. Color .color { color: darken(yellow, 10); background: lighten(blue, 30); border-color: saturate(#aa0000, 10); } Wednesday, November 2, 11
  • 13. Color CSS .color { color: #cccc00; background: #9999ff; border-color: #aa0000; } Wednesday, November 2, 11
  • 14. Mixins @mixin add-stuff($color) { color: $color; background-color: #000; .child { padding: 5px; } } .example { @include add-stuff(blue); } Wednesday, November 2, 11
  • 15. Mixins CSS .example { color: blue; background-color: #000; } .example .child { padding: 5px; } Wednesday, November 2, 11
  • 17. Compass CSS3 Mixins border-radius box-shadow text-shadow opacity linear-gradient color-stops and many more... Wednesday, November 2, 11
  • 19. And more… Parent referencing Functions Base64 encoding Spriting @extend Wednesday, November 2, 11
  • 20. config.rb # Get the directory that this file exists in dir = File.dirname(__FILE__) # Load the sencha-touch framework automatically load File.join(dir, '..', 'js', 'sencha- touch-2.0', 'resources', 'themes') # Compass configurations sass_path = dir css_path = File.join(dir, "..", "css") environment = :debug output_style = :expanded Wednesday, November 2, 11
  • 21. Installation sudo gem install compass Wednesday, November 2, 11
  • 25. CSS3 Gradients Text Shadows Box Shadows Masks Border Radius Selectors :first/last/nth-child :before/after Wednesday, November 2, 11
  • 26. Variables $base-color Wednesday, November 2, 11
  • 27. Mixins @include background-gradient($bg-color, $type); bevel, glossy, matte, flat @include color-by-background($bg-color, $contrast: 100%); @include bevel-by-background($bg-color); @include mask-by-background($bg-color, $contrast, $style); Wednesday, November 2, 11
  • 28. Icons 300+ icons included SCSS: @include pictos-iconmask(‘refresh’); JS: {xtype: ‘button’, iconCls: ‘refresh’, iconMask: true, ui: ‘drastic’ } Wednesday, November 2, 11
  • 30. The UI attribute “UI” can be added to components Several components have default UIs Toolbar, Carousel, TabBar light/dark Buttons default/drastic/confirm/back/forward & round/small Wednesday, November 2, 11
  • 31. SCSS JAVASCRIPT Wednesday, November 2, 11
  • 32. SCSS JAVASCRIPT Wednesday, November 2, 11
  • 33. SCSS JAVASCRIPT Wednesday, November 2, 11
  • 34. Sencha Touch 2 docs Wednesday, November 2, 11
  • 35. Recap: When to use what ui Wherever possible. A great start even if you’re creating custom styles. cls If element doesn’t have ui mixins, or you want to further differentiate two elements with the same UI. componentCls If you’re developing a custom extension, this can be a good way to scope all of your sub-components. style Never. Ever. Just think of it as deprecated. Wednesday, November 2, 11
  • 36. Optimization Tips Remove unused components Remove Images Remove UIs output_style: compressed Wednesday, November 2, 11
  • 37. myapp.scss // Colors $base-color: #F25A34; // Share orange // Optimizations $include-default-icons: false; // Library @import 'sencha-touch/default/all'; @include sencha-panel; @include sencha-buttons; @include sencha-toolbar; @include sencha-carousel; @include sencha-indexbar; @include sencha-list; @include sencha-layout; @include sencha-msgbox; @include sencha-loading-spinner; @import 'include/typography'; body { Wednesday, November 2, 11
  • 42. 0 6px 30px 10px $grid-header-padding Wednesday, November 2, 11
  • 46. Slicer http://sencha.com/products/sdk-tools/ Wednesday, November 2, 11
  • 49. Optimization $include-default: false; @import 'compass'; @import 'ext4/default/all'; @include extjs-button; @include extjs-panel; @include extjs-toolbar; Wednesday, November 2, 11
  • 50. 22kb Without Any Components Wednesday, November 2, 11
  • 51. Recap New Theming System Variables Mixins Slicer Optimization Wednesday, November 2, 11
  • 57. Questions? http://j.mp/sencha-themes @davidkaneda @rdougan Wednesday, November 2, 11