SlideShare une entreprise Scribd logo
1  sur  32
Introduction to
Baidu Map Web App
Front-end Style Guide
by Hongru Hou
2014.2.20
Contents
What is Front-end style guide?
How did our SG born?
What dose it include?
How to use it?
How to maintain it?
Further thinking
2
What is Front-end style guide?

3
4
£2.00
“Front-end style guides […] to make maintaining a site
easier […] built specifically for the web […] uses real
code and works in the browser […] living
documentation and grows organically with a site
throughout its lifetime.”
–Anna Debenham
5
How did our SG born?

6
Set up scaffolds
kss-node-template

Style Guide Boilerplate
Pattern Lab
Kalei Style Guide

fontcustom
gulp

Grunt

7
Grunt vs. gulp

http://jaysoo.ca/2014/01/27/gruntjs-vs-gulpjs/
Battle with PM and UE
Remove, remove, remove
Reduce, reduce, reduce
Check, check, check

9
Results of the battle
Before

After

%

bg-color

11

7

-36.7%

opacity

5

2

-60%

font-family

2

1

-50%

font-size

8

4

-50%

color

29

7

-75.9%

Background

Font
Style tile
背景颜色
#FFFFFF

#F9F9F9

字体颜色
#F2F2F2

#EAEAEA

背景颜色透明度

#000000

#6BB1F7

#FFFFFF

#CFCFCF

#848484

#555555

#3b3b3b

字体大小

字体样式

24pt

Mac:
PC:

28pt
0.8

30pt

32pt
0.8

边框
#D4D4D4

1px

#F6F6F6

1px

#6BB1F7
Design principle
Separate structure and skin
Separate container and content

}

OOCSS

Meaningful class

12
Hand in hand with Sass
Variables
Nesting
Partials (@import)
Mixins (@include)
Inheritance (@extend)
Control Directives (e.g. @for)
13
What does it include?

14
Folder structure
stylesheets
scss
css
styleguide
iconfonts
public
15
SCSS
_reset.scss + _mixin.scss + _utilities.scss
_basic.scss + _grid.scss
_components.scss
_icon-font.scss
main.scss + sg.scss
16
How to use it?

17
Naming Conventions
Block—Element__Modifier sucks
SM (Sassier Modifier)
SM+

18
“In CSS, identifiers (including element names,
classes, and IDs in selectors) can contain only
the characters [a-zA-Z0-9] and ISO 10646
characters U+00A0 and higher, plus the
hyphen (-) and the underscore (_); they cannot
start with a digit, two hyphens, or a hyphen
followed by a digit.”
–Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification
Examples
CSS

11kb
HTML

4kb

3kb
Icons
Mwa.woff
Mwa.ttf
Mwa.eot
7 icons
3kb

27 icons
5-7kb
How to maintain it?

27
Update SG
svn checkout https://svn.bce.bae.baidu.com/appid89ac2cam6b/0
sudo npm install
gulp

28
Further thinking
Design accordance
New workflow
CSS has became a programatic language
QA
Acknowledgement
Thanks

Contenu connexe

Similaire à Introduction to Baidu map Web app front-end style guide

ExampleSiteEvaluationJustification
ExampleSiteEvaluationJustificationExampleSiteEvaluationJustification
ExampleSiteEvaluationJustification
Desarae Veit
 
Mongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBMongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDB
Justin Smestad
 
Mobile First Responsive Web Design — BD Conf Oct 2013
Mobile First Responsive Web Design — BD Conf Oct 2013Mobile First Responsive Web Design — BD Conf Oct 2013
Mobile First Responsive Web Design — BD Conf Oct 2013
Jason Grigsby
 

Similaire à Introduction to Baidu map Web app front-end style guide (20)

ExampleSiteEvaluationJustification
ExampleSiteEvaluationJustificationExampleSiteEvaluationJustification
ExampleSiteEvaluationJustification
 
Université Laval - Analyste d'affaires - agence affaires électroniques - Alai...
Université Laval - Analyste d'affaires - agence affaires électroniques - Alai...Université Laval - Analyste d'affaires - agence affaires électroniques - Alai...
Université Laval - Analyste d'affaires - agence affaires électroniques - Alai...
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
Michael Kowalski
Michael KowalskiMichael Kowalski
Michael Kowalski
 
Web Design - Innovation Hackathon
Web Design - Innovation Hackathon Web Design - Innovation Hackathon
Web Design - Innovation Hackathon
 
Responsive Web Designs.pdf
Responsive Web Designs.pdfResponsive Web Designs.pdf
Responsive Web Designs.pdf
 
Building resuable and customizable Vue components
Building resuable and customizable Vue componentsBuilding resuable and customizable Vue components
Building resuable and customizable Vue components
 
Confess_2011 - Rapid Rich Client Development with Spring Roo and GWT
Confess_2011 - Rapid Rich Client Development with Spring Roo and GWTConfess_2011 - Rapid Rich Client Development with Spring Roo and GWT
Confess_2011 - Rapid Rich Client Development with Spring Roo and GWT
 
Web Design - Professional Development
Web Design - Professional DevelopmentWeb Design - Professional Development
Web Design - Professional Development
 
Web Design
Web DesignWeb Design
Web Design
 
Let's Work Together!
Let's Work Together!Let's Work Together!
Let's Work Together!
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Style Guide Best Practices
Style Guide Best PracticesStyle Guide Best Practices
Style Guide Best Practices
 
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsThe Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
 
Mongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBMongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDB
 
Cv aman gupta-uiux
Cv aman gupta-uiuxCv aman gupta-uiux
Cv aman gupta-uiux
 
Processes + Patterns
Processes + PatternsProcesses + Patterns
Processes + Patterns
 
Push notifications using Firebase
Push notifications using FirebasePush notifications using Firebase
Push notifications using Firebase
 
Push notifications using Firebase
Push notifications using FirebasePush notifications using Firebase
Push notifications using Firebase
 
Mobile First Responsive Web Design — BD Conf Oct 2013
Mobile First Responsive Web Design — BD Conf Oct 2013Mobile First Responsive Web Design — BD Conf Oct 2013
Mobile First Responsive Web Design — BD Conf Oct 2013
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Introduction to Baidu map Web app front-end style guide