SlideShare a Scribd company logo
1 of 17
Beautifying your Sencha
App using scss
- By Neha Upadhyay
Topics to be covered
•

•
•
•
•
•

What is scss
Environment setup for compass
How to use compass in sencha app
Scss mixins in sencha
Css variables in sencha
Theming in sencha.
What is scss
• Scss is a nested css metalanguage that
supports variable, mixins, nesting and
selector in heritance.
• Every valid css is a valid scss.
• A scss file has .scss extension.
• A scss file has to be compiled using
compass which will generate/update the
repective css file.
Environment setup for
Compass
1. Install compass using ruby gem installer.
You will have to download the installer
from http://rubyinstaller.org/ for windows
Mac machines don’t need to install it.
2. After finishing the setup please check if
your environment variable are set if not
then please set your path to Ruby193bin
3. Open your command window and type
gem command.
4. Say gem install compass to install compass
How to use compass in
sencha app
• If sencha application is created using
sencha sdk tools i.e using generate app
command in command window then
there is a sass project in resources/scss
directory.
• NOTE: Compass commands can be
executed only in a valid sass project
directory.
Continued
• The directory already contains a scss file
name app.scss.
• It includes all the scss files which provide
the default blue theme for sencha
application.
• It looks like this
Continued
• You can create your own .scss file in the
same scss directory and when you compile
that file using compass the corresponding
css file will be generated/updated in the
resources/css
• And you just have to include this css file in
your index.html.
How to compile a scss file?
• To compile the scss file you have to go to that
path in your command window.
• Check if your compass command is working.
• Then execute compass compile command
• This command will compile all scss files in
that directory.
• You can also execute compass watch commad
it compiles your scss file as you change it.
SCSS Mixins in sencha
• In scss mixins allow you to re-use whole
chunks of CSS, properties or selectors. You
can even give them arguments.
• Eg: Here $name is a variable
@mixin pictos-iconmask($name) {
.x-tab .x-button-icon.#{$name},
.x-button .x-button-icon.x-icon-mask.#{$name} {
-webkit-mask-image:
theme_image('default', "pictos/" + $name + ".png");
}
}
Continued
• Sencha provides such mixins for every
component using which we can create new
ui themes.
• All these mixins are listed in
documentation of sencha.
• They look like this:
Why use scss mixin ?
One may ask why use mixin provided by
sencha to style components. It can also be
done by normal css. The answere is:
• While using mixin we just have to pass
some color or gradient name and sencha
does the css itself. Hence the
styles, gradients created work for android
as well as iOS.
Continued…
• While writing the css for sencha
components one has to override many
sencha styles and sometimes its very
difficult to trace which classes or css
properties have to be overrided.
• For every mixin name can be used to apply
some specific css propeties and also for
selector inheritance which makes it very
easy to overide sencha classes.
Continued…
Css for button

Scss for button

.loginButton{
webkit-border-radius:
0.2em!important;
border-radius: 0.2em!important;
height:2.7em;
background-image: -webkitgradient(linear, 50% 0%, 50%
100%, colorstop(0%, white), colorstop(2%, #FDFDFD), colorstop(100%, #D9D9D9))!import
ant;
}

@include sencha-buttonui('loginButton', #2D7AB4, 'glos
sy');
Css variables in sencha
• Like mixin sencha also provides css vars or
variable for styling in sencha.
• Every component has its own set of css
variable which can be used to change the
style of that component.
• Css variables in sencha are used for
theming of the sencha application as these
variable are global.
Theming in sencha
• I still have to learn it.

More Related Content

What's hot

Getting SASSy with front end development
Getting SASSy with front end developmentGetting SASSy with front end development
Getting SASSy with front end developmentMatthew Carleton
 
Sears Front End Changes
Sears Front End ChangesSears Front End Changes
Sears Front End ChangesLance Ennen
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSSSquareboat
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetNeha Sharma
 
Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Tahmina Khatoon
 
Project development - preparing hell dish together – Oleksii Dashkevych
Project development - preparing hell dish together – Oleksii DashkevychProject development - preparing hell dish together – Oleksii Dashkevych
Project development - preparing hell dish together – Oleksii DashkevychRuby Meditation
 
WordPress Bootcamp Quiz
WordPress Bootcamp QuizWordPress Bootcamp Quiz
WordPress Bootcamp QuizMetronet
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.Eugene Nor
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFxStefan Bauer
 
Sass Beginner Guide
Sass Beginner GuideSass Beginner Guide
Sass Beginner GuideRizal Putra
 
Getting Sassy with CSS
Getting Sassy with CSSGetting Sassy with CSS
Getting Sassy with CSSJulie Cameron
 
Be Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - EcosystemBe Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - EcosystemLucas Renan
 
Sass and compass workshop
Sass and compass workshopSass and compass workshop
Sass and compass workshopShaho Toofani
 

What's hot (20)

Getting SASSy with front end development
Getting SASSy with front end developmentGetting SASSy with front end development
Getting SASSy with front end development
 
Sears Front End Changes
Sears Front End ChangesSears Front End Changes
Sears Front End Changes
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
 
Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)
 
Less vs sass
Less vs sassLess vs sass
Less vs sass
 
Project development - preparing hell dish together – Oleksii Dashkevych
Project development - preparing hell dish together – Oleksii DashkevychProject development - preparing hell dish together – Oleksii Dashkevych
Project development - preparing hell dish together – Oleksii Dashkevych
 
WordPress Bootcamp Quiz
WordPress Bootcamp QuizWordPress Bootcamp Quiz
WordPress Bootcamp Quiz
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
 
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
 
Intro to Sails.js
Intro to Sails.jsIntro to Sails.js
Intro to Sails.js
 
'Less' css
'Less' css'Less' css
'Less' css
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
 
Sass Beginner Guide
Sass Beginner GuideSass Beginner Guide
Sass Beginner Guide
 
Getting Sassy with CSS
Getting Sassy with CSSGetting Sassy with CSS
Getting Sassy with CSS
 
Intro to EmberJS
Intro to EmberJSIntro to EmberJS
Intro to EmberJS
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
 
Be Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - EcosystemBe Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - Ecosystem
 
Sass and compass workshop
Sass and compass workshopSass and compass workshop
Sass and compass workshop
 
Class15
Class15Class15
Class15
 

Viewers also liked

Integrity without it nothing works
Integrity without it nothing worksIntegrity without it nothing works
Integrity without it nothing worksAntonio Gálvez
 
Nutrilite business plan v9 2013 for downline
Nutrilite business plan v9 2013 for downlineNutrilite business plan v9 2013 for downline
Nutrilite business plan v9 2013 for downlineJack Tran
 
Vai tu zini, kāds līderis gribi būt
Vai tu zini, kāds līderis gribi būtVai tu zini, kāds līderis gribi būt
Vai tu zini, kāds līderis gribi būtLaura Kursite
 
เรื่องวิทยาศาสตร์น่ารู้
 เรื่องวิทยาศาสตร์น่ารู้ เรื่องวิทยาศาสตร์น่ารู้
เรื่องวิทยาศาสตร์น่ารู้Weerachat Martluplao
 
A day in the life of on utp
A day in the life of on utpA day in the life of on utp
A day in the life of on utpcata1623
 
Amazing prediction
Amazing predictionAmazing prediction
Amazing predictiongdipankar
 
การสื่อสาร
การสื่อสารการสื่อสาร
การสื่อสารTuaLek Kitkoot
 
Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...
Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...
Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...Gunawan Tan
 
2012 2013 nfp presentation
2012 2013 nfp presentation2012 2013 nfp presentation
2012 2013 nfp presentationGeorge Blieka
 
Chinese Automotive market
Chinese Automotive marketChinese Automotive market
Chinese Automotive marketShengyun LU
 
Projectm6 2-2554 tom's
Projectm6 2-2554 tom'sProjectm6 2-2554 tom's
Projectm6 2-2554 tom'sTheyok Tanya
 

Viewers also liked (20)

Integrity without it nothing works
Integrity without it nothing worksIntegrity without it nothing works
Integrity without it nothing works
 
cells
cellscells
cells
 
Par to kas TU ESI
Par to kas TU ESIPar to kas TU ESI
Par to kas TU ESI
 
Modern Sofas & Chairs
Modern Sofas & ChairsModern Sofas & Chairs
Modern Sofas & Chairs
 
Nutrilite business plan v9 2013 for downline
Nutrilite business plan v9 2013 for downlineNutrilite business plan v9 2013 for downline
Nutrilite business plan v9 2013 for downline
 
Library furniture
Library furnitureLibrary furniture
Library furniture
 
Proiecte 27 iunie cafeneaua publica
Proiecte 27 iunie cafeneaua publicaProiecte 27 iunie cafeneaua publica
Proiecte 27 iunie cafeneaua publica
 
Vai tu zini, kāds līderis gribi būt
Vai tu zini, kāds līderis gribi būtVai tu zini, kāds līderis gribi būt
Vai tu zini, kāds līderis gribi būt
 
เรื่องวิทยาศาสตร์น่ารู้
 เรื่องวิทยาศาสตร์น่ารู้ เรื่องวิทยาศาสตร์น่ารู้
เรื่องวิทยาศาสตร์น่ารู้
 
A day in the life of on utp
A day in the life of on utpA day in the life of on utp
A day in the life of on utp
 
El mundo
El mundoEl mundo
El mundo
 
Amazing prediction
Amazing predictionAmazing prediction
Amazing prediction
 
ว5
ว5ว5
ว5
 
การสื่อสาร
การสื่อสารการสื่อสาร
การสื่อสาร
 
Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...
Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...
Find Your Ideas, Inspirations, and Imaginations with Goodrich Global Indonesi...
 
2012 2013 nfp presentation
2012 2013 nfp presentation2012 2013 nfp presentation
2012 2013 nfp presentation
 
integral
integralintegral
integral
 
Chinese Automotive market
Chinese Automotive marketChinese Automotive market
Chinese Automotive market
 
Yuni bru integral
Yuni bru integralYuni bru integral
Yuni bru integral
 
Projectm6 2-2554 tom's
Projectm6 2-2554 tom'sProjectm6 2-2554 tom's
Projectm6 2-2554 tom's
 

Similar to Beautifying senc

Beautifying Sencha Touch
Beautifying Sencha TouchBeautifying Sencha Touch
Beautifying Sencha TouchNeha Upadhyay
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12ucbdrupal
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sasschriseppstein
 
CSS Workflow. Pre & Post
CSS Workflow. Pre & PostCSS Workflow. Pre & Post
CSS Workflow. Pre & PostAnton Dosov
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersSuzette Franck
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS ImplementationAmey Parab
 
Scss talk CSS Meetup
Scss talk CSS Meetup Scss talk CSS Meetup
Scss talk CSS Meetup Caleb Yang
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentationJoeSeckelman
 
Syntactically Awesome Stylesheet - A workshop by Citytech Software
Syntactically Awesome Stylesheet - A workshop by Citytech SoftwareSyntactically Awesome Stylesheet - A workshop by Citytech Software
Syntactically Awesome Stylesheet - A workshop by Citytech SoftwareRitwik Das
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsSuzanne Dergacheva
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqDignitasDigital1
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSSNeha Sharma
 
How to develop a CSS Framework
How to develop a CSS FrameworkHow to develop a CSS Framework
How to develop a CSS FrameworkOlivier Besson
 

Similar to Beautifying senc (20)

Beautifying Sencha Touch
Beautifying Sencha TouchBeautifying Sencha Touch
Beautifying Sencha Touch
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sass
 
CSS Workflow. Pre & Post
CSS Workflow. Pre & PostCSS Workflow. Pre & Post
CSS Workflow. Pre & Post
 
css-tools
css-toolscss-tools
css-tools
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Scss talk CSS Meetup
Scss talk CSS Meetup Scss talk CSS Meetup
Scss talk CSS Meetup
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
Syntactically Awesome Stylesheet - A workshop by Citytech Software
Syntactically Awesome Stylesheet - A workshop by Citytech SoftwareSyntactically Awesome Stylesheet - A workshop by Citytech Software
Syntactically Awesome Stylesheet - A workshop by Citytech Software
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen Grids
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSS
 
Sass_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
Css framework
Css frameworkCss framework
Css framework
 
How to develop a CSS Framework
How to develop a CSS FrameworkHow to develop a CSS Framework
How to develop a CSS Framework
 

Recently uploaded

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Beautifying senc

  • 1. Beautifying your Sencha App using scss - By Neha Upadhyay
  • 2. Topics to be covered • • • • • • What is scss Environment setup for compass How to use compass in sencha app Scss mixins in sencha Css variables in sencha Theming in sencha.
  • 3. What is scss • Scss is a nested css metalanguage that supports variable, mixins, nesting and selector in heritance. • Every valid css is a valid scss. • A scss file has .scss extension. • A scss file has to be compiled using compass which will generate/update the repective css file.
  • 4. Environment setup for Compass 1. Install compass using ruby gem installer. You will have to download the installer from http://rubyinstaller.org/ for windows Mac machines don’t need to install it. 2. After finishing the setup please check if your environment variable are set if not then please set your path to Ruby193bin 3. Open your command window and type gem command. 4. Say gem install compass to install compass
  • 5. How to use compass in sencha app • If sencha application is created using sencha sdk tools i.e using generate app command in command window then there is a sass project in resources/scss directory. • NOTE: Compass commands can be executed only in a valid sass project directory.
  • 6. Continued • The directory already contains a scss file name app.scss. • It includes all the scss files which provide the default blue theme for sencha application. • It looks like this
  • 7.
  • 8. Continued • You can create your own .scss file in the same scss directory and when you compile that file using compass the corresponding css file will be generated/updated in the resources/css • And you just have to include this css file in your index.html.
  • 9. How to compile a scss file? • To compile the scss file you have to go to that path in your command window. • Check if your compass command is working. • Then execute compass compile command • This command will compile all scss files in that directory. • You can also execute compass watch commad it compiles your scss file as you change it.
  • 10. SCSS Mixins in sencha • In scss mixins allow you to re-use whole chunks of CSS, properties or selectors. You can even give them arguments. • Eg: Here $name is a variable @mixin pictos-iconmask($name) { .x-tab .x-button-icon.#{$name}, .x-button .x-button-icon.x-icon-mask.#{$name} { -webkit-mask-image: theme_image('default', "pictos/" + $name + ".png"); } }
  • 11. Continued • Sencha provides such mixins for every component using which we can create new ui themes. • All these mixins are listed in documentation of sencha. • They look like this:
  • 12.
  • 13. Why use scss mixin ? One may ask why use mixin provided by sencha to style components. It can also be done by normal css. The answere is: • While using mixin we just have to pass some color or gradient name and sencha does the css itself. Hence the styles, gradients created work for android as well as iOS.
  • 14. Continued… • While writing the css for sencha components one has to override many sencha styles and sometimes its very difficult to trace which classes or css properties have to be overrided. • For every mixin name can be used to apply some specific css propeties and also for selector inheritance which makes it very easy to overide sencha classes.
  • 15. Continued… Css for button Scss for button .loginButton{ webkit-border-radius: 0.2em!important; border-radius: 0.2em!important; height:2.7em; background-image: -webkitgradient(linear, 50% 0%, 50% 100%, colorstop(0%, white), colorstop(2%, #FDFDFD), colorstop(100%, #D9D9D9))!import ant; } @include sencha-buttonui('loginButton', #2D7AB4, 'glos sy');
  • 16. Css variables in sencha • Like mixin sencha also provides css vars or variable for styling in sencha. • Every component has its own set of css variable which can be used to change the style of that component. • Css variables in sencha are used for theming of the sencha application as these variable are global.
  • 17. Theming in sencha • I still have to learn it.