SlideShare a Scribd company logo
Matthias Oßwald, SAP
June 30, 2017
UI5 Theming
Explained
2
UI5 Theming Explained
Agenda
Less.js Introduction
Theme Structure & Inheritance
Theme Parameters
Custom Themes
Further Resources
Less.js
4
Less.js
Open Source CSS pre-processor
Extends the CSS language
Provides variables, functions (lighten, darken, saturate, contrast) and mixins
http://lesscss.org/
5
Less.js
Open Source CSS pre-processor
Extends the CSS language
Provides variables, functions (lighten, darken, saturate, contrast) and mixins
http://lesscss.org/
@myBackgroundColor: #ffa242;
@myLightTextColor: #ffffff;
@myDarkTextColor: #000000;
.box {
color: contrast(@myBackgroundColor,@myLightTextColor,@myDarkTextColor);
background-color: @myBackgroundColor;
border: 3px solid darken(@myBackgroundColor, 30%);
}
6
Less.js
Open Source CSS pre-processor
Extends the CSS language
Provides variables, functions (lighten, darken, saturate, contrast) and mixins
http://lesscss.org/
@myBackgroundColor: #e62d2d;
@myLightTextColor: #ffffff;
@myDarkTextColor: #000000;
.box {
color: contrast(@myBackgroundColor,@myLightTextColor,@myDarkTextColor);
background-color: @myBackgroundColor;
border: 3px solid darken(@myBackgroundColor, 30%);
}
Theme Structure & Inheritance
8
Base theme
Making Controls work properly
Contains basic styles
display, position, z-index,
overflow, box-sizing
Provides styles for all
themes
Not intended to be
actually used
Contains color / size
styles
By using semantic
parameters
9
Specific theme
Making Controls look properly
Contains theme specific
styles
background, gradient,
shadow, border-radius
Contains specific color /
size styles
By using semantic
parameters
Inherits from the base
theme
10
Theme Inheritance
@sapSelectedColor: #2e9cea
@sapSelectedColor: #e8eff6
overrides
sap_belize
base
imports
Theme Parameters
12
Theme Parameters
One parameter affects multiple others
13
Custom Themes
15
Creating a custom theme
Inherit from sap_belize
16
Creating a custom theme
Override some parameters
@sapBaseColor: #161413;
Inherit from sap_belize
17
Creating a custom theme
Override some parameters
@sapBaseColor: #161413;
@sapList_Background: @sapBaseColor;
@sapField_Background: @sapBaseColor;
@sapBackgroundColor: @sapBaseColor;
Inherit from sap_belize
18
Creating a custom theme
Override some parameters
@sapBaseColor: #161413;
@sapList_Background: @sapBaseColor;
@sapField_Background: @sapBaseColor;
@sapBackgroundColor: @sapBaseColor;
@sapBrandColor: #e62d2d;
Inherit from sap_belize
19
Creating a custom theme
Override some parameters
@sapBaseColor: #161413;
@sapList_Background: @sapBaseColor;
@sapField_Background: @sapBaseColor;
@sapBackgroundColor: @sapBaseColor;
@sapBrandColor: #e62d2d;
@sapTextColor: #ffa242;
@sapField_TextColor: #fff;
@sapNeutralColor: #fff;
Inherit from sap_belize
20
Creating a custom theme
Override some parameters
@sapBaseColor: #161413;
@sapList_Background: @sapBaseColor;
@sapField_Background: @sapBaseColor;
@sapBackgroundColor: @sapBaseColor;
@sapBrandColor: #e62d2d;
@sapTextColor: #ffa242;
@sapField_TextColor: #fff;
@sapNeutralColor: #fff;
@sapSelectedColor: rgba(255,162,66,.2);
@sapList_SelectionBackgroundColor: @sapSelectedColor;
Inherit from sap_belize
21
Creating a custom theme
Override some parameters
@sapBaseColor: #161413;
@sapList_Background: @sapBaseColor;
@sapField_Background: @sapBaseColor;
@sapBackgroundColor: @sapBaseColor;
@sapBrandColor: #e62d2d;
@sapTextColor: #ffa242;
@sapField_TextColor: #fff;
@sapNeutralColor: #fff;
@sapSelectedColor: rgba(255,162,66,.2);
@sapList_SelectionBackgroundColor: @sapSelectedColor;
@sapList_HeaderBackground: @sapGroup_ContentBackground;
@sapPageFooter_Background: @sapGroup_ContentBackground;
Inherit from sap_belize
22
Creating a custom theme
Project repository:
https://github.com/matz3/ui5con17-custom-theme
Technical Details
Built with Node.js based OpenUI5 tools
Further Resources
24
SAP UI Theme Designer
WYSIWYG Editor for Themes
25
SAP UI Theme Designer
WYSIWYG Editor for Themes
26
Theme Parameter Toolbox App
Find the right theme parameters for control development
Thank you.
Contact information:
Matthias Oßwald, SAP
@matthiaso
Links
UI5con Custom Theme Project:
https://github.com/matz3/ui5con17-custom-theme
SAP UI Theme Designer:
https://wiki.scn.sap.com/wiki/display/UITD/UI+Theme+Designer+Home
Theme Parameter Toolbox App:
https://blogs.sap.com/2017/05/24/ui5ers-buzz-07-less-effort-find-your-less-theme-parameters/
https://openui5nightly.hana.ondemand.com/test-resources/sap/m/demokit/theming/webapp/index.html
You are welcome to give feedback for this session
in the UI5con Event App

More Related Content

Similar to UI5con@SAP 2017 - UI5 Theming Explained

Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)
Tahmina Khatoon
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
David Engel
 
Using SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar ZikUsing SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar ZikMiriam Schwab
 
Elegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs SassElegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs SassMediacurrent
 
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Serge van den Oever
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
Stefan Bauer
 
[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX
European Collaboration Summit
 
Jina bolton - Refactoring Web Interfaces
Jina bolton - Refactoring Web InterfacesJina bolton - Refactoring Web Interfaces
Jina bolton - Refactoring Web Interfaces
DevConFu
 
PostCss
PostCssPostCss
PostCss
LearningTech
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
Folio3 Software
 
Learn Sass and Compass quick
Learn Sass and Compass quickLearn Sass and Compass quick
Learn Sass and Compass quick
Billy Shih
 
Do more with {less}
Do more with {less}Do more with {less}
Do more with {less}
Jesper Wøldiche
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
David Bisset
 
@Agawish creating a stunning ui with oracle adf faces, using sass
@Agawish   creating a stunning ui with oracle adf faces, using sass@Agawish   creating a stunning ui with oracle adf faces, using sass
@Agawish creating a stunning ui with oracle adf faces, using sass
Amr Gawish
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - Workshop
Eric Overfield
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Aidan Foster
 
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Cengage Learning
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application DesignBryce Kerley
 

Similar to UI5con@SAP 2017 - UI5 Theming Explained (20)

Why less?
Why less?Why less?
Why less?
 
Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
 
Using SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar ZikUsing SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar Zik
 
Elegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs SassElegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs Sass
 
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
 
[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX
 
Jina bolton - Refactoring Web Interfaces
Jina bolton - Refactoring Web InterfacesJina bolton - Refactoring Web Interfaces
Jina bolton - Refactoring Web Interfaces
 
PostCss
PostCssPostCss
PostCss
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Learn Sass and Compass quick
Learn Sass and Compass quickLearn Sass and Compass quick
Learn Sass and Compass quick
 
Do more with {less}
Do more with {less}Do more with {less}
Do more with {less}
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
 
@Agawish creating a stunning ui with oracle adf faces, using sass
@Agawish   creating a stunning ui with oracle adf faces, using sass@Agawish   creating a stunning ui with oracle adf faces, using sass
@Agawish creating a stunning ui with oracle adf faces, using sass
 
Suman_Chakraborty
Suman_ChakrabortySuman_Chakraborty
Suman_Chakraborty
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - Workshop
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
 
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
 

Recently uploaded

Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 

Recently uploaded (20)

Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 

UI5con@SAP 2017 - UI5 Theming Explained

  • 1. Matthias Oßwald, SAP June 30, 2017 UI5 Theming Explained
  • 2. 2 UI5 Theming Explained Agenda Less.js Introduction Theme Structure & Inheritance Theme Parameters Custom Themes Further Resources
  • 4. 4 Less.js Open Source CSS pre-processor Extends the CSS language Provides variables, functions (lighten, darken, saturate, contrast) and mixins http://lesscss.org/
  • 5. 5 Less.js Open Source CSS pre-processor Extends the CSS language Provides variables, functions (lighten, darken, saturate, contrast) and mixins http://lesscss.org/ @myBackgroundColor: #ffa242; @myLightTextColor: #ffffff; @myDarkTextColor: #000000; .box { color: contrast(@myBackgroundColor,@myLightTextColor,@myDarkTextColor); background-color: @myBackgroundColor; border: 3px solid darken(@myBackgroundColor, 30%); }
  • 6. 6 Less.js Open Source CSS pre-processor Extends the CSS language Provides variables, functions (lighten, darken, saturate, contrast) and mixins http://lesscss.org/ @myBackgroundColor: #e62d2d; @myLightTextColor: #ffffff; @myDarkTextColor: #000000; .box { color: contrast(@myBackgroundColor,@myLightTextColor,@myDarkTextColor); background-color: @myBackgroundColor; border: 3px solid darken(@myBackgroundColor, 30%); }
  • 7. Theme Structure & Inheritance
  • 8. 8 Base theme Making Controls work properly Contains basic styles display, position, z-index, overflow, box-sizing Provides styles for all themes Not intended to be actually used Contains color / size styles By using semantic parameters
  • 9. 9 Specific theme Making Controls look properly Contains theme specific styles background, gradient, shadow, border-radius Contains specific color / size styles By using semantic parameters Inherits from the base theme
  • 10. 10 Theme Inheritance @sapSelectedColor: #2e9cea @sapSelectedColor: #e8eff6 overrides sap_belize base imports
  • 12. 12 Theme Parameters One parameter affects multiple others
  • 13. 13
  • 15. 15 Creating a custom theme Inherit from sap_belize
  • 16. 16 Creating a custom theme Override some parameters @sapBaseColor: #161413; Inherit from sap_belize
  • 17. 17 Creating a custom theme Override some parameters @sapBaseColor: #161413; @sapList_Background: @sapBaseColor; @sapField_Background: @sapBaseColor; @sapBackgroundColor: @sapBaseColor; Inherit from sap_belize
  • 18. 18 Creating a custom theme Override some parameters @sapBaseColor: #161413; @sapList_Background: @sapBaseColor; @sapField_Background: @sapBaseColor; @sapBackgroundColor: @sapBaseColor; @sapBrandColor: #e62d2d; Inherit from sap_belize
  • 19. 19 Creating a custom theme Override some parameters @sapBaseColor: #161413; @sapList_Background: @sapBaseColor; @sapField_Background: @sapBaseColor; @sapBackgroundColor: @sapBaseColor; @sapBrandColor: #e62d2d; @sapTextColor: #ffa242; @sapField_TextColor: #fff; @sapNeutralColor: #fff; Inherit from sap_belize
  • 20. 20 Creating a custom theme Override some parameters @sapBaseColor: #161413; @sapList_Background: @sapBaseColor; @sapField_Background: @sapBaseColor; @sapBackgroundColor: @sapBaseColor; @sapBrandColor: #e62d2d; @sapTextColor: #ffa242; @sapField_TextColor: #fff; @sapNeutralColor: #fff; @sapSelectedColor: rgba(255,162,66,.2); @sapList_SelectionBackgroundColor: @sapSelectedColor; Inherit from sap_belize
  • 21. 21 Creating a custom theme Override some parameters @sapBaseColor: #161413; @sapList_Background: @sapBaseColor; @sapField_Background: @sapBaseColor; @sapBackgroundColor: @sapBaseColor; @sapBrandColor: #e62d2d; @sapTextColor: #ffa242; @sapField_TextColor: #fff; @sapNeutralColor: #fff; @sapSelectedColor: rgba(255,162,66,.2); @sapList_SelectionBackgroundColor: @sapSelectedColor; @sapList_HeaderBackground: @sapGroup_ContentBackground; @sapPageFooter_Background: @sapGroup_ContentBackground; Inherit from sap_belize
  • 22. 22 Creating a custom theme Project repository: https://github.com/matz3/ui5con17-custom-theme Technical Details Built with Node.js based OpenUI5 tools
  • 24. 24 SAP UI Theme Designer WYSIWYG Editor for Themes
  • 25. 25 SAP UI Theme Designer WYSIWYG Editor for Themes
  • 26. 26 Theme Parameter Toolbox App Find the right theme parameters for control development
  • 27. Thank you. Contact information: Matthias Oßwald, SAP @matthiaso Links UI5con Custom Theme Project: https://github.com/matz3/ui5con17-custom-theme SAP UI Theme Designer: https://wiki.scn.sap.com/wiki/display/UITD/UI+Theme+Designer+Home Theme Parameter Toolbox App: https://blogs.sap.com/2017/05/24/ui5ers-buzz-07-less-effort-find-your-less-theme-parameters/ https://openui5nightly.hana.ondemand.com/test-resources/sap/m/demokit/theming/webapp/index.html You are welcome to give feedback for this session in the UI5con Event App