Stepping into the front end: Part 1
-
Upload
tahin-rahman -
Category
Engineering
-
view
163 -
download
4
Transcript of Stepping into the front end: Part 1
![Page 1: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/1.jpg)
Stepping into the Front EndPart 1: HTML & CSS
![Page 2: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/2.jpg)
What is Front End Engineering?
Look
![Page 3: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/3.jpg)
What is Front End Engineering?
Feel
![Page 4: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/4.jpg)
How can I become one?
Good Design SenseGreat Programming Skill
Awesome Attention to Detail
![Page 5: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/5.jpg)
What Front End Engineers DO!!!
Semantic HyperText Markup Language (HTML) for structure
Cascading Style Sheets (CSS) for presentationJavaScript (JS) for behavior and interaction
Cross browser compatibility
![Page 6: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/6.jpg)
HTMLHyperText Markup Language
![Page 7: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/7.jpg)
HTML
STRUCTURE&
CONTENT
![Page 8: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/8.jpg)
CSSCascaded Style Sheet
![Page 9: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/9.jpg)
CSS
LAYOUT&
PRESENTATION
![Page 10: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/10.jpg)
JSJavaScript
![Page 11: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/11.jpg)
JS
BEHAVIOUR&
INTERACTION
![Page 12: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/12.jpg)
Best Practices… are for best people
![Page 13: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/13.jpg)
Why Best Practices?
UNDERSTANDABILITY&
MANAGEABILITY
![Page 14: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/14.jpg)
Start with a Logical Structure
![Page 15: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/15.jpg)
Don’t wrap unnecessary DIVs
<div><h1>hello</h1></div>
![Page 16: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/16.jpg)
Know your Tools Properties
box-sizing: border-boxoutline: nonemargin: autodisplay: flex
min/max-width: 10vh/vw/vmax/vmin/calc(20vw-10px)
background-size: cover
![Page 17: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/17.jpg)
Use “reset”
Eric Meyer’s “Reset CSS” 2.0cssreset.com
![Page 18: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/18.jpg)
Keep Reference/*background color: #0f0f0ftext color: #000000link color: #d4d4d4font size: 12px*/
![Page 19: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/19.jpg)
Stay Organized/* Resets and overrides *//* Typography *//* Main Layout *//* Navigation *//* Form elements *//* Miscellaneous */
![Page 20: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/20.jpg)
Meaningful Naming Conventions
.xyz {}
.post-list-container {}
.post_container {}
.post-title {}
.post_info {}
.post-body {}
![Page 21: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/21.jpg)
“-” for Class, “_” for ID#post_list_container {}
.post-container {}
.post-title {}
.post-info {}
.post-body {}
![Page 22: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/22.jpg)
Avoid Extra Selectors
body #post_list_container {} /* bad */
#post_list_container {} /* good */
![Page 23: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/23.jpg)
Reuse, don’t Repeat.post-title { font-size: 14px; }.post-body { font-size: 14px; }
.post-title,
.post-body { font-size: 14px; }
![Page 24: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/24.jpg)
Create Generic Classes.box {}
.pull-right {}
.img-circle {}
![Page 25: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/25.jpg)
Use Multiple Classes
class="pull-right img-circle"
![Page 26: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/26.jpg)
Use CSS Shorthandsmargin-top: 0margin-right: 10pxmargin-bottom: 0margin-left: 10px /* bad */
margin: 0 10px /* good */
margin: 0 auto /* to center */
![Page 27: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/27.jpg)
Use External, never Inline: WHY?
Separate content from presentation
Easy to organize, manage & modify
Minify, cache and other optimizations
![Page 28: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/28.jpg)
Use Multiple Files (if necessary)
reset.csslayout.cssutility.cssform.css
actions.jsanimations.js
![Page 29: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/29.jpg)
Love DevTools (like Facebook)
![Page 30: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/30.jpg)
Other Resources
https://google.github.io/styleguide/htmlcssguide.xml
https://google.github.io/styleguide/javascriptguide.xml
![Page 31: Stepping into the front end: Part 1](https://reader036.fdocuments.net/reader036/viewer/2022070512/589b56431a28ab606f8b486f/html5/thumbnails/31.jpg)
Happy CODING ;)