+ All Categories
Home > Engineering > Stepping into the front end: Part 1

Stepping into the front end: Part 1

Date post: 09-Feb-2017
Category:
Upload: tahin-rahman
View: 161 times
Download: 4 times
Share this document with a friend
31
Stepping into the Front End Part 1: HTML & CSS
Transcript
Page 1: Stepping into the front end: Part 1

Stepping into the Front EndPart 1: HTML & CSS

Page 2: Stepping into the front end: Part 1

What is Front End Engineering?

Look

Page 3: Stepping into the front end: Part 1

What is Front End Engineering?

Feel

Page 4: Stepping into the front end: Part 1

How can I become one?

Good Design SenseGreat Programming Skill

Awesome Attention to Detail

Page 5: Stepping into the front end: Part 1

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

HTMLHyperText Markup Language

Page 7: Stepping into the front end: Part 1

HTML

STRUCTURE&

CONTENT

Page 8: Stepping into the front end: Part 1

CSSCascaded Style Sheet

Page 9: Stepping into the front end: Part 1

CSS

LAYOUT&

PRESENTATION

Page 10: Stepping into the front end: Part 1

JSJavaScript

Page 11: Stepping into the front end: Part 1

JS

BEHAVIOUR&

INTERACTION

Page 12: Stepping into the front end: Part 1

Best Practices… are for best people

Page 13: Stepping into the front end: Part 1

Why Best Practices?

UNDERSTANDABILITY&

MANAGEABILITY

Page 14: Stepping into the front end: Part 1

Start with a Logical Structure

Page 15: Stepping into the front end: Part 1

Don’t wrap unnecessary DIVs

<div><h1>hello</h1></div>

Page 16: Stepping into the front end: Part 1

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

Use “reset”

Eric Meyer’s “Reset CSS” 2.0cssreset.com

Page 18: Stepping into the front end: Part 1

Keep Reference/*background color: #0f0f0ftext color: #000000link color: #d4d4d4font size: 12px*/

Page 19: Stepping into the front end: Part 1

Stay Organized/* Resets and overrides *//* Typography *//* Main Layout *//* Navigation *//* Form elements *//* Miscellaneous */

Page 20: Stepping into the front end: Part 1

Meaningful Naming Conventions

.xyz {}

.post-list-container {}

.post_container {}

.post-title {}

.post_info {}

.post-body {}

Page 21: Stepping into the front end: Part 1

“-” for Class, “_” for ID#post_list_container {}

.post-container {}

.post-title {}

.post-info {}

.post-body {}

Page 22: Stepping into the front end: Part 1

Avoid Extra Selectors

body #post_list_container {} /* bad */

#post_list_container {} /* good */

Page 23: Stepping into the front end: Part 1

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

Create Generic Classes.box {}

.pull-right {}

.img-circle {}

Page 25: Stepping into the front end: Part 1

Use Multiple Classes

class="pull-right img-circle"

Page 26: Stepping into the front end: Part 1

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

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

Use Multiple Files (if necessary)

reset.csslayout.cssutility.cssform.css

actions.jsanimations.js

Page 29: Stepping into the front end: Part 1

Love DevTools (like Facebook)

Page 30: Stepping into the front end: Part 1

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

Happy CODING ;)


Recommended