SlideShare a Scribd company logo
Breakpoint
Simple example - Sass 
$bp-small: 768px; 
body { 
color: #333; 
@include breakpoint(max-width $bp-small) { 
background-color: #efefef; 
} 
@include breakpoint($bp-small) { 
font-size: 120%; 
} 
}
Simple example - CSS 
body { 
color: #333; 
} 
@media (max-width: 768px) { 
body { 
background-color: #efefef; 
} 
} 
@media (min-width: 768px) { 
body { 
font-size: 120%; 
} 
}
... so what?
More complex queries 
$bp-sm-screen-and-phones: 'only screen' (max-width 760px), 
max-device-width 900px; 
.rwd-table { 
@include breakpoint($bp-sm-screen-and-phones) { 
/* responsive table styles */ 
} 
} 
Compiled: 
@media only screen and (max-width: 760px), 
(max-device-width: 900px) { 
.rwd-table { 
/* responsive table styles */ 
} 
}
Resolution queries - Sass 
$hidpi: min-resolution 1.5dppx; 
.sprite-icon { 
background-image: url('images/sprite.png'); 
@include breakpoint($hidpi) { 
background-image: url('images/sprite2x.png'); 
} 
}
Resolution queries - CSS 
.sprite-icon { 
background-image: url('images/sprite.png'); 
} 
@media (min-resolution: 143dpi), 
(-webkit-min-device-pixel-ratio: 1.48958), 
(min--moz-device-pixel-ratio: 1.48958) { 
.sprite-icon { 
background-image: url('images/sprite2x.png'); 
} 
}
Media query fallbacks 
$bp-small: 768px; 
body { 
color: #333; 
@include breakpoint(max-width $bp-small) { 
background-color: #efefef; 
} 
@include breakpoint($bp-small, 'no-query' '.no-mqs') { 
font-size: 120%; 
} 
}
Fallback class 
body { 
color: #333; 
} 
@media (max-width: 768px) { 
body { background-color: #efefef; } 
} 
@media (min-width: 768px) { 
body { font-size: 120%; } 
} 
.no-mqs body { 
font-size: 120%; 
}
Multiple-file fallbacks 
$bp-small: 768px; 
body { 
color: #333; 
@include breakpoint(max-width $bp-small) { 
background-color: #efefef; 
} 
@include breakpoint($bp-small, 'no-query' true) { 
font-size: 120%; 
} 
}
Multiple-file fallbacks 
Style.scss: 
// this sheet includes the queries 
$breakpoint-no-queries: false; 
@import 'mqs'; 
Style.css: 
body { 
color: #333; 
} 
@media (max-width: 768px) { 
body { background-color: #efefef;} 
} 
@media (min-width: 768px) { 
body { font-size: 120%; } 
} 
Oldie.scss: 
// this sheet excludes the queries 
$breakpoint-no-queries: true; 
@import 'mqs'; 
Oldie.css: 
body { 
color: #333; 
font-size: 120%; 
}
Now let's do something fun...
...with IE8 support (single file)
_variables.scss 
_mixins.scss 
_typography.scss 
... 
Mobile.scss 
$breakpoint-no-queries: true; 
$include-mobile-styles: true; 
$include-desktop-styles: false; 
@import //all the partials 
Desktop.scss 
$breakpoint-no-queries: true; 
$include-mobile-styles: false; 
$include-desktop-styles: true; 
@import //all the partials 
Responsive.scss 
$breakpoint-no-queries: false; 
$include-mobile-styles: true; 
$include-desktop-styles: '.no-mqs'; 
@import //all the partials
The Sass... 
$bp-small: 768px; 
body { 
color: #333; 
@include breakpoint(max-width $bp-small, 
'no-query' $include-mobile-styles) { 
background-color: #efefef; 
} 
@include breakpoint($bp-small, 
'no-query' $include-desktop-styles) { 
font-size: 120%; 
} 
}
Thanks! 
@RoboAndie

More Related Content

What's hot

Drupal Themes
Drupal ThemesDrupal Themes
Drupal Themes
akosh
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
Katsunori Tanaka
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
Zeeshan Ahmed
 
5.managing hdfs
5.managing hdfs5.managing hdfs
5.managing hdfs
databloginfo
 
Everest
EverestEverest
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and Workshop
AhmedabadJavaMeetup
 
CHI-YAPC-2009
CHI-YAPC-2009CHI-YAPC-2009
CHI-YAPC-2009
jonswar
 

What's hot (7)

Drupal Themes
Drupal ThemesDrupal Themes
Drupal Themes
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
 
5.managing hdfs
5.managing hdfs5.managing hdfs
5.managing hdfs
 
Everest
EverestEverest
Everest
 
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and Workshop
 
CHI-YAPC-2009
CHI-YAPC-2009CHI-YAPC-2009
CHI-YAPC-2009
 

Similar to Breakpoint

Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
bentleyhoke
 
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
Even Wu
 
CSS'in Gücü Adına
CSS'in Gücü AdınaCSS'in Gücü Adına
CSS'in Gücü Adına
Adem Ilter
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書
拓樹 谷
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
Netguru
 
Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors. Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors.
The University of Akron
 
Work and play with SASS & Compass
Work and play with SASS & CompassWork and play with SASS & Compass
Work and play with SASS & Compass
Andreas Dantz
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
Wynn Netherland
 
Responsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da WebResponsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da Web
Eduardo Shiota Yasuda
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
Idan Gazit
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
James Pearce
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
Mario Noble
 
CSS3
CSS3CSS3
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
Daniel Yuschick
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
Marco Pinheiro
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
Rob Friesel
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSS
Sayanee Basu
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
FITC
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Claudina Sarahe
 
CSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie DustCSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie Dust
Kyle Adams
 

Similar to Breakpoint (20)

Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
 
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
 
CSS'in Gücü Adına
CSS'in Gücü AdınaCSS'in Gücü Adına
CSS'in Gücü Adına
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
 
Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors. Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors.
 
Work and play with SASS & Compass
Work and play with SASS & CompassWork and play with SASS & Compass
Work and play with SASS & Compass
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
Responsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da WebResponsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da Web
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
CSS3
CSS3CSS3
CSS3
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSS
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
 
CSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie DustCSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie Dust
 

More from Andrea Robertson

Meet your members' expectations
Meet your members' expectationsMeet your members' expectations
Meet your members' expectations
Andrea Robertson
 
Modern websites in RiSE
Modern websites in RiSEModern websites in RiSE
Modern websites in RiSE
Andrea Robertson
 
Achieving Performance Improvement with iMIS Scoring Plus
Achieving Performance Improvement with iMIS Scoring PlusAchieving Performance Improvement with iMIS Scoring Plus
Achieving Performance Improvement with iMIS Scoring Plus
Andrea Robertson
 
Things you may not know about iMIS
Things you may not know about iMISThings you may not know about iMIS
Things you may not know about iMIS
Andrea Robertson
 
Form & Function: Creating Email Templates
Form & Function: Creating Email TemplatesForm & Function: Creating Email Templates
Form & Function: Creating Email Templates
Andrea Robertson
 
How to get the most out of Process Automation (iNNOVATIONS 2015)
How to get the most out of Process Automation (iNNOVATIONS 2015)How to get the most out of Process Automation (iNNOVATIONS 2015)
How to get the most out of Process Automation (iNNOVATIONS 2015)
Andrea Robertson
 
What's New in RiSE for Mobile (iNNOVATIONS 2015)
What's New in RiSE for Mobile (iNNOVATIONS 2015)What's New in RiSE for Mobile (iNNOVATIONS 2015)
What's New in RiSE for Mobile (iNNOVATIONS 2015)
Andrea Robertson
 
Responsive Web Design in iMIS (NiUG Austin 2015)
Responsive Web Design in iMIS (NiUG Austin 2015)Responsive Web Design in iMIS (NiUG Austin 2015)
Responsive Web Design in iMIS (NiUG Austin 2015)
Andrea Robertson
 
Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2
Andrea Robertson
 
Crafting a visually appealing website with iMIS
Crafting a visually appealing website with iMISCrafting a visually appealing website with iMIS
Crafting a visually appealing website with iMIS
Andrea Robertson
 
Preserving the iMIS Upgrade Path
Preserving the iMIS Upgrade PathPreserving the iMIS Upgrade Path
Preserving the iMIS Upgrade Path
Andrea Robertson
 

More from Andrea Robertson (11)

Meet your members' expectations
Meet your members' expectationsMeet your members' expectations
Meet your members' expectations
 
Modern websites in RiSE
Modern websites in RiSEModern websites in RiSE
Modern websites in RiSE
 
Achieving Performance Improvement with iMIS Scoring Plus
Achieving Performance Improvement with iMIS Scoring PlusAchieving Performance Improvement with iMIS Scoring Plus
Achieving Performance Improvement with iMIS Scoring Plus
 
Things you may not know about iMIS
Things you may not know about iMISThings you may not know about iMIS
Things you may not know about iMIS
 
Form & Function: Creating Email Templates
Form & Function: Creating Email TemplatesForm & Function: Creating Email Templates
Form & Function: Creating Email Templates
 
How to get the most out of Process Automation (iNNOVATIONS 2015)
How to get the most out of Process Automation (iNNOVATIONS 2015)How to get the most out of Process Automation (iNNOVATIONS 2015)
How to get the most out of Process Automation (iNNOVATIONS 2015)
 
What's New in RiSE for Mobile (iNNOVATIONS 2015)
What's New in RiSE for Mobile (iNNOVATIONS 2015)What's New in RiSE for Mobile (iNNOVATIONS 2015)
What's New in RiSE for Mobile (iNNOVATIONS 2015)
 
Responsive Web Design in iMIS (NiUG Austin 2015)
Responsive Web Design in iMIS (NiUG Austin 2015)Responsive Web Design in iMIS (NiUG Austin 2015)
Responsive Web Design in iMIS (NiUG Austin 2015)
 
Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2
 
Crafting a visually appealing website with iMIS
Crafting a visually appealing website with iMISCrafting a visually appealing website with iMIS
Crafting a visually appealing website with iMIS
 
Preserving the iMIS Upgrade Path
Preserving the iMIS Upgrade PathPreserving the iMIS Upgrade Path
Preserving the iMIS Upgrade Path
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 

Breakpoint

  • 2. Simple example - Sass $bp-small: 768px; body { color: #333; @include breakpoint(max-width $bp-small) { background-color: #efefef; } @include breakpoint($bp-small) { font-size: 120%; } }
  • 3. Simple example - CSS body { color: #333; } @media (max-width: 768px) { body { background-color: #efefef; } } @media (min-width: 768px) { body { font-size: 120%; } }
  • 5. More complex queries $bp-sm-screen-and-phones: 'only screen' (max-width 760px), max-device-width 900px; .rwd-table { @include breakpoint($bp-sm-screen-and-phones) { /* responsive table styles */ } } Compiled: @media only screen and (max-width: 760px), (max-device-width: 900px) { .rwd-table { /* responsive table styles */ } }
  • 6. Resolution queries - Sass $hidpi: min-resolution 1.5dppx; .sprite-icon { background-image: url('images/sprite.png'); @include breakpoint($hidpi) { background-image: url('images/sprite2x.png'); } }
  • 7. Resolution queries - CSS .sprite-icon { background-image: url('images/sprite.png'); } @media (min-resolution: 143dpi), (-webkit-min-device-pixel-ratio: 1.48958), (min--moz-device-pixel-ratio: 1.48958) { .sprite-icon { background-image: url('images/sprite2x.png'); } }
  • 8.
  • 9. Media query fallbacks $bp-small: 768px; body { color: #333; @include breakpoint(max-width $bp-small) { background-color: #efefef; } @include breakpoint($bp-small, 'no-query' '.no-mqs') { font-size: 120%; } }
  • 10. Fallback class body { color: #333; } @media (max-width: 768px) { body { background-color: #efefef; } } @media (min-width: 768px) { body { font-size: 120%; } } .no-mqs body { font-size: 120%; }
  • 11. Multiple-file fallbacks $bp-small: 768px; body { color: #333; @include breakpoint(max-width $bp-small) { background-color: #efefef; } @include breakpoint($bp-small, 'no-query' true) { font-size: 120%; } }
  • 12. Multiple-file fallbacks Style.scss: // this sheet includes the queries $breakpoint-no-queries: false; @import 'mqs'; Style.css: body { color: #333; } @media (max-width: 768px) { body { background-color: #efefef;} } @media (min-width: 768px) { body { font-size: 120%; } } Oldie.scss: // this sheet excludes the queries $breakpoint-no-queries: true; @import 'mqs'; Oldie.css: body { color: #333; font-size: 120%; }
  • 13. Now let's do something fun...
  • 14.
  • 15.
  • 16. ...with IE8 support (single file)
  • 17. _variables.scss _mixins.scss _typography.scss ... Mobile.scss $breakpoint-no-queries: true; $include-mobile-styles: true; $include-desktop-styles: false; @import //all the partials Desktop.scss $breakpoint-no-queries: true; $include-mobile-styles: false; $include-desktop-styles: true; @import //all the partials Responsive.scss $breakpoint-no-queries: false; $include-mobile-styles: true; $include-desktop-styles: '.no-mqs'; @import //all the partials
  • 18. The Sass... $bp-small: 768px; body { color: #333; @include breakpoint(max-width $bp-small, 'no-query' $include-mobile-styles) { background-color: #efefef; } @include breakpoint($bp-small, 'no-query' $include-desktop-styles) { font-size: 120%; } }
  • 19.

Editor's Notes

  1. Delete??