SlideShare a Scribd company logo
BootStrap 4
v4.0.0-alpha.6
@micposso
Front-End Developer
Outline:
● What is Bootstrap?
● What is new in B4?
● Sass review and coding exercise
● Review of REM units and demo
● FLEXBOX coding exercise
● Review of B4 components
What is Bootstrap 4?
Bootstrap is the most popular CSS framework for
RAPID WEBSITE PROTOTYPING.
● What is the grid?
● What is bootstrap.js and Jquery?
● Grid vs FLEXBOX
● Sass architecture
● Open source
● Battle tested
● Still in Alpha!!!!!!
https://v4-alpha.getbootstrap.com/
z
Bootstrap componentsYour website
https://v4-alpha.getbootstrap.com/components/navbar/
What is new in Bootstrap 4?
● Enhanced GRID
● Switched from LESS to SASS
● Cards component
● REM instead of Pixels CSS units
● FLEXBOX grid support
● ReBoot - replaces normalizer
● No more IE8!!!!!!
https://v4-alpha.getbootstrap.com/
What is a CSS reset?
Its an additional block of CSS that will help
with consistency in the default styling of HTML
elements.
● Eric mayer’s CSS reset
● Normalizer
● B4 new Reboot
● HTML5 reset
How to use Bootstrap 4 in your project
● Download source files
● Customize download
● Use CDN versions
● NPM package
● Customize files
● Via RubyGems
● Composer
https://v4-alpha.getbootstrap.com/
All bootstrap websites look the same!
How to customize B4?
Sass
Sass is an extension of CSS that allows for
more functional syntax. Sass always needs to
be compiled into CSS.
Sass is used by developers to produce more
modular and easy to maintain code on the
source code.
The easiest way to get started with Sass is with
a compiler program like Koala
http://sass-lang.com/guide
Sass
Bootstrap 4 ships with a _custom.scss file for
easy overriding of default variables.
For Global variables, use _variables.scss
Be sure to remove the !default flag from
override values.
https://v4-alpha.getbootstrap.com/getting-started/options/
Coding Time!
1. Open project folder /B4-sass
2. Install Koala
3. Open Koala
4. Specify SRC and DEST folders
5. Open the SASS files to add custom rules
6. Create a new Variable for a color
7. Create a new mixing for a border radius rule
8. Check compiles CSS file
http://koala-app.com/
https://www.canva.com/color-palette/
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
How does the FLEXBOX work?
FLEXBOX is a CSS3 layout mode that provides
an easier way to arrange elements within a
container
● No FLOATS
● No margin collapse
● Order of elements is controlled from CSS
● Designed for screens
● Easier to position child elements
Coding Time!
1. Open project folder /flexbox/flexbox.html
2. Create
3. Open Koala
4. Specify SRC and DEST folders
5. Change B4 Sass files
6. Create a new Variable for a color
7. Create a new mixing for a border radius rule
8. Check compiles CSS file
http://koala-app.com/
https://www.canva.com/color-palette/
https://snook.ca/archives/html_and_css/font-size-with-rem
How REM units work
The rem unit is relative to the root—or the
html—element. That means that we can define a
single font size on the html element and define all
rem units to be a percentage of that.
html { font-size: 62.5%; }
body { font-size: 1.4rem; } /* =14px */
h1 { font-size: 2.4rem; } /* =24px */
Can I use FLEXBOX now?
YES, but be careful & use fallbacks when possible.
90% of Browser support FLEXBOX
IE has no support
EDGE partial support
Legacy mobile browsers no support or partial support
https://caniuse.com/#feat=flexbox
The BS4 Grid
Container
-----Row
---------columns
--------------components
BS4 uses Rems and Ems for columns widths, but is using PX for
Responsive breakpoints.
Basic FLEXBOX Utilities
Vertical Alignment (row)
align-items-start
align-items-center
align-items-end
Order of itement (col)
flex-unordered
flex-first
flex-last
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Horizontal Alignment (row)
justify-content-start
justify-content-center
Justify-content-end
justify-content-around
justify-content-between
EMs
1em is equal to the current font size. The default text size
in browsers is 16px. So, the default size of 1em is 16px.
REMs
Equal to the computed value of font-size on the root element. When
specified on the font-size property of the root element, the rem units
refer to the property's initial value.
PIXELS
The pixel (a word invented from "picture element") is the basic unit of
programmable color on a computer display or in a computer image.
Measurement units in digital media are not exact! Designers use
software that was meant for print to design websites.
Bootstrap Components
Always check the documentation to find out if a
component needs other dependencies!
Bootstrap CARDS components
A card is a flexible and extensible content
container. It includes options for headers and
footers, a wide variety of content, contextual
background colors, and powerful display options.
https://material.io/
The Media Object
The media object helps build complex and
repetitive components where some media is
positioned alongside content that doesn’t wrap
around said media. Plus, it does this with only two
required classes thanks to flexbox.
https://acss.io/
JavaScript Components
● Slideshow
● ScrollSpy
● ToolTips
● PopOvers
● Modals
JS components use Jquery and the Bootstrap JS file. The components can be
configured in the HTML via data attributes.
$(document).off('.data-api')
https://v4-alpha.getbootstrap.com/getting-started/javascript/
Coding Time!
1. Open project folder /SITE1/
2. Open wireframes files
3. Look at layout and identify blocks
4. Set up your HTML file
5. Begin building the layout from top to bottom
6. Refer to BS4 site for components
7. Create custom CSS rules

More Related Content

PDF
OOCSS, SMACSS or BEM?
PPTX
Bootstrap 4 Alpha 3
PPTX
Learn Bootstrap 4
PPTX
Bootstrap for Beginners
PPT
Bootstrap Part - 1
PPS
Bootstrap 3 vs. bootstrap 4
PDF
Bootstrap 4 alpha 6
PPTX
Bootstrap By Shafeeq
OOCSS, SMACSS or BEM?
Bootstrap 4 Alpha 3
Learn Bootstrap 4
Bootstrap for Beginners
Bootstrap Part - 1
Bootstrap 3 vs. bootstrap 4
Bootstrap 4 alpha 6
Bootstrap By Shafeeq

What's hot (17)

PPTX
Bootstrap 5 ppt
PPTX
Bootstrap [part 1]
PDF
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
PPTX
Bootstrap 5 whats new
PPTX
Bootstrap 3
PPTX
Bootstrap
PDF
Bootstrap
KEY
Getting started with CSS frameworks using Zurb foundation
PDF
Bootstrap 5 basic
PDF
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
PPTX
Module 3 - Intro to Bootstrap
PDF
WordPress Theming Best Practices
PPTX
Bootstrap - Web Development Framework
PPTX
Bootstrap - Basics
PDF
Zurb foundation
PDF
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
PPTX
Design Concepts and Web Design
Bootstrap 5 ppt
Bootstrap [part 1]
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 5 whats new
Bootstrap 3
Bootstrap
Bootstrap
Getting started with CSS frameworks using Zurb foundation
Bootstrap 5 basic
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Module 3 - Intro to Bootstrap
WordPress Theming Best Practices
Bootstrap - Web Development Framework
Bootstrap - Basics
Zurb foundation
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
Design Concepts and Web Design
Ad

Similar to Slides bootstrap-4 (20)

PPTX
Krishan gaurav-sapient bootstrapsession
PPTX
Bootstrap SLIDES for web development course
PDF
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
PPT
Twitter bootstrap training_session_ppt
PPT
Introduction to BOOTSTRAP
PDF
Responsive Web Design Tutorial PDF for Beginners
PPTX
Using Bootstrap to Make Accessible Front-Ends(2).pptx
PPTX
Using Bootstrap to Make Accessible Front-Ends(2).pptx
PDF
ViA Bootstrap 4
PDF
Bootstrap Workout 2015
PPTX
Create Responsive Website Design with Bootstrap 3
PDF
OOScss Architecture For Rails Apps
PPTX
bootstrap.pptx
PDF
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
PPTX
Intro to Bootstrap
PDF
Foundation vs Bootstrap - CC FE & UX
PDF
Introduction to Bootstrap
PPT
Why you need to switch to bootstrap 4.0?
PDF
Bootstrap for webtechnology_data science.pdf
PPTX
Lecture-03.pptx
Krishan gaurav-sapient bootstrapsession
Bootstrap SLIDES for web development course
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Twitter bootstrap training_session_ppt
Introduction to BOOTSTRAP
Responsive Web Design Tutorial PDF for Beginners
Using Bootstrap to Make Accessible Front-Ends(2).pptx
Using Bootstrap to Make Accessible Front-Ends(2).pptx
ViA Bootstrap 4
Bootstrap Workout 2015
Create Responsive Website Design with Bootstrap 3
OOScss Architecture For Rails Apps
bootstrap.pptx
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
Intro to Bootstrap
Foundation vs Bootstrap - CC FE & UX
Introduction to Bootstrap
Why you need to switch to bootstrap 4.0?
Bootstrap for webtechnology_data science.pdf
Lecture-03.pptx
Ad

Recently uploaded (20)

PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Welding lecture in detail for understanding
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
composite construction of structures.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Digital Logic Computer Design lecture notes
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Sustainable Sites - Green Building Construction
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
web development for engineering and engineering
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Welding lecture in detail for understanding
CH1 Production IntroductoryConcepts.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
composite construction of structures.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
573137875-Attendance-Management-System-original
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Foundation to blockchain - A guide to Blockchain Tech
Digital Logic Computer Design lecture notes
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Sustainable Sites - Green Building Construction
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
CYBER-CRIMES AND SECURITY A guide to understanding
additive manufacturing of ss316l using mig welding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
web development for engineering and engineering
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Arduino robotics embedded978-1-4302-3184-4.pdf

Slides bootstrap-4

  • 2. Outline: ● What is Bootstrap? ● What is new in B4? ● Sass review and coding exercise ● Review of REM units and demo ● FLEXBOX coding exercise ● Review of B4 components
  • 3. What is Bootstrap 4? Bootstrap is the most popular CSS framework for RAPID WEBSITE PROTOTYPING. ● What is the grid? ● What is bootstrap.js and Jquery? ● Grid vs FLEXBOX ● Sass architecture ● Open source ● Battle tested ● Still in Alpha!!!!!! https://v4-alpha.getbootstrap.com/
  • 5. What is new in Bootstrap 4? ● Enhanced GRID ● Switched from LESS to SASS ● Cards component ● REM instead of Pixels CSS units ● FLEXBOX grid support ● ReBoot - replaces normalizer ● No more IE8!!!!!! https://v4-alpha.getbootstrap.com/
  • 6. What is a CSS reset? Its an additional block of CSS that will help with consistency in the default styling of HTML elements. ● Eric mayer’s CSS reset ● Normalizer ● B4 new Reboot ● HTML5 reset
  • 7. How to use Bootstrap 4 in your project ● Download source files ● Customize download ● Use CDN versions ● NPM package ● Customize files ● Via RubyGems ● Composer https://v4-alpha.getbootstrap.com/
  • 8. All bootstrap websites look the same! How to customize B4?
  • 9. Sass Sass is an extension of CSS that allows for more functional syntax. Sass always needs to be compiled into CSS. Sass is used by developers to produce more modular and easy to maintain code on the source code. The easiest way to get started with Sass is with a compiler program like Koala http://sass-lang.com/guide
  • 10. Sass Bootstrap 4 ships with a _custom.scss file for easy overriding of default variables. For Global variables, use _variables.scss Be sure to remove the !default flag from override values. https://v4-alpha.getbootstrap.com/getting-started/options/
  • 11. Coding Time! 1. Open project folder /B4-sass 2. Install Koala 3. Open Koala 4. Specify SRC and DEST folders 5. Open the SASS files to add custom rules 6. Create a new Variable for a color 7. Create a new mixing for a border radius rule 8. Check compiles CSS file http://koala-app.com/ https://www.canva.com/color-palette/
  • 12. https://css-tricks.com/snippets/css/a-guide-to-flexbox/ How does the FLEXBOX work? FLEXBOX is a CSS3 layout mode that provides an easier way to arrange elements within a container ● No FLOATS ● No margin collapse ● Order of elements is controlled from CSS ● Designed for screens ● Easier to position child elements
  • 13. Coding Time! 1. Open project folder /flexbox/flexbox.html 2. Create 3. Open Koala 4. Specify SRC and DEST folders 5. Change B4 Sass files 6. Create a new Variable for a color 7. Create a new mixing for a border radius rule 8. Check compiles CSS file http://koala-app.com/ https://www.canva.com/color-palette/
  • 14. https://snook.ca/archives/html_and_css/font-size-with-rem How REM units work The rem unit is relative to the root—or the html—element. That means that we can define a single font size on the html element and define all rem units to be a percentage of that. html { font-size: 62.5%; } body { font-size: 1.4rem; } /* =14px */ h1 { font-size: 2.4rem; } /* =24px */
  • 15. Can I use FLEXBOX now? YES, but be careful & use fallbacks when possible. 90% of Browser support FLEXBOX IE has no support EDGE partial support Legacy mobile browsers no support or partial support https://caniuse.com/#feat=flexbox
  • 16. The BS4 Grid Container -----Row ---------columns --------------components BS4 uses Rems and Ems for columns widths, but is using PX for Responsive breakpoints.
  • 17. Basic FLEXBOX Utilities Vertical Alignment (row) align-items-start align-items-center align-items-end Order of itement (col) flex-unordered flex-first flex-last https://css-tricks.com/snippets/css/a-guide-to-flexbox/ Horizontal Alignment (row) justify-content-start justify-content-center Justify-content-end justify-content-around justify-content-between
  • 18. EMs 1em is equal to the current font size. The default text size in browsers is 16px. So, the default size of 1em is 16px. REMs Equal to the computed value of font-size on the root element. When specified on the font-size property of the root element, the rem units refer to the property's initial value. PIXELS The pixel (a word invented from "picture element") is the basic unit of programmable color on a computer display or in a computer image. Measurement units in digital media are not exact! Designers use software that was meant for print to design websites.
  • 19. Bootstrap Components Always check the documentation to find out if a component needs other dependencies!
  • 20. Bootstrap CARDS components A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options. https://material.io/
  • 21. The Media Object The media object helps build complex and repetitive components where some media is positioned alongside content that doesn’t wrap around said media. Plus, it does this with only two required classes thanks to flexbox. https://acss.io/
  • 22. JavaScript Components ● Slideshow ● ScrollSpy ● ToolTips ● PopOvers ● Modals JS components use Jquery and the Bootstrap JS file. The components can be configured in the HTML via data attributes. $(document).off('.data-api') https://v4-alpha.getbootstrap.com/getting-started/javascript/
  • 23. Coding Time! 1. Open project folder /SITE1/ 2. Open wireframes files 3. Look at layout and identify blocks 4. Set up your HTML file 5. Begin building the layout from top to bottom 6. Refer to BS4 site for components 7. Create custom CSS rules