SlideShare uma empresa Scribd logo
1 de 60
Baixar para ler offline
Advanced
Design
Methods
Aaron Gustafson
@AaronGustafson
slideshare.net/AaronGustafson
Modern

approaches

to layout
ADVANCED DESIGN METHODS
Remember this?
narrow wide
ADVANCED DESIGN METHODS
Compare: small screen first
@media	(min-width:600px)	{

		.primary	{

				float:	left;

				width:	68%;

		}

		.secondary	{

				float:	right;

				width:	32%;

		}

}
Floating an element
removes it from the
normal flow &
pushes it to a side
The clear property
controls how content
flows around a
floated element
When all children

of an element are
floated, it has

no inherent height
This made floated
layouts challenging
to build
ADVANCED DESIGN METHODS
We hacked CSS to make it work
.layout-container::after	{	
	 content:	"	";	
	 display:	block;	
	 clear:	both;	
	 width:	0;	
	 height:	0;	
}
Flexbox: 

layout control in

1 dimension
ADVANCED DESIGN METHODS
Let’s try this again
narrow wide
ADVANCED DESIGN METHODS
Same thing, but with flex
@media	(min-width:600px)	{

		.layout-container	{	
				display:	flex;	
		}	
		.primary	{

				width:	68%;

		}

		.secondary	{

				width:	32%;

		}

}
ADVANCED DESIGN METHODS
Here’s how it works
.listing--events	{	
		display:	flex;	
		flex-wrap:	wrap;	
		align-items:	stretch;	
}	
.event	{	
		flex:	0	0	100%;	/*	small	screen	first	*/	
}
grow?
shrink? size basis
ADVANCED DESIGN METHODS
Tweak at specific breakpoints
/*	2	column	*/	
@media	(min-width:	28.75em)	{	
		.event	{	
	 		flex:	0	0	calc(50%	-	1.25rem	/	2);	
		}	
}	
/*	3	column	*/	
@media	(min-width:	43.125em)	{	
		.event	{	
				flex:	0	0	calc(100%	/	3	-	.875rem);	
		}	
}
ADVANCED DESIGN METHODS
Handle the special cases
/*	First,	if	more	than	1	*/	
@media	(min-width:	28.75em)	{	
		.event--future:nth-last-child(n+1):first-child	{	
				flex:	0	0	100%;	
		}	
}
ADVANCED DESIGN METHODS
Handle the special cases
/*	When	more	than	2,	make	the	first	2	go	50%	*/	
@media	only	screen	and	(min-width:	43.125em)	{	
		.event--future:nth-last-child(n+2):first-child,	
		.event—future:nth-last-child(n+2):first-child

				+	.event--future	{	
				flex:	0	0	calc(	50%	-	1.25rem	/	2	);	
		}	
}
Grid: 

layout control in

2 dimensions
ADVANCED DESIGN METHODS
Here’s how it works
.listing--events	{	
		display:	grid;	
		grid-template-columns:	repeat(	6,	1fr	);	
		grid-gap:	1em;	
}	
.event	{	
		grid-column:	span	6;	
}
each row has

6 equal columns
separated by 1em

of whitespace
stretch
full width
by default
ADVANCED DESIGN METHODS
Here’s how it works
@media(min-width:	28.75em)	{	
	.event	{	
				grid-column:	span	3;	
		}	
			
		/*	when	more	than	1,	
					make	the	first	span	both	columns		*/	
		.event--future:nth-last-child(n+1):first-child	{	
				font-size:	1.5em;	
				grid-column:	span	6;	
		}	
}
default = 2-up
full-width
ADVANCED DESIGN METHODS
Here’s how it works
@media(min-width:	43.125em)	{	
		.event	{	
				grid-column:	span	2;	
		}	
			
		/*	Quantity	Query	-	when	more	than	2,	
					make	the	first	2	go	50%		*/	
		.event--future:nth-last-child(n+2):first-child,		
		.event--future:nth-last-child(n+2):first-child

				+	.event--future	{	
				font-size:	1.5em;	
				grid-column:	span	3;	
		}	
}
default = 3-up
2-up
Let’s look at the
content teaser
ADVANCED DESIGN METHODS
Content Teasers
ADVANCED DESIGN METHODS
Content Teasers
ADVANCED DESIGN METHODS
Content Teasers
1fr 2fr
grid-template-columns:	1rem	1fr	1rem	2fr	1rem;
ADVANCED DESIGN METHODS
Content Teasers
1fr 2fr
grid-template-columns:	1fr	2fr;	
grid-gap:	1rem;
ADVANCED DESIGN METHODS
Content Teasers
1fr 2fr
grid-template-columns:	1fr	2fr;	
grid-gap:	1rem;	
grid-template-areas:	"image	content";
grid-area:	image;
grid-area:	content;
ADVANCED DESIGN METHODS
Content Teasers
grid-template-areas:	"image"	"content";	
grid-gap:	1rem;
grid-area:	content;
grid-area:	image;
⏸
Designing with
Frameworks
ADVANCED DESIGN METHODS
Pros & Cons
๏ Rapid prototyping
๏ Many common components
included
๏ No need to know how to code
(cut & paste)
๏ Tested
๏ Proven
๏ Limited to available
components
๏ Opinionated
๏ Designed to solve their
problems (not yours)
๏ Looks the same as everything
else
๏ If not used in production, is
entirely throw-away code
๏ If taken to production, could
result in bloat
47
Credit:	Friday
“Tiny Bootstraps, for
every client.”
—Dave Rupert
ADVANCED DESIGN METHODS
Pros & Cons
๏ Designed around the project’s
needs & goals
๏ Once built, you can rapidly
prototype
๏ Prototyping code can be
production-ready (tested,
proven)
๏ Add new components as
needed
๏ Update/modify components as
needed
๏ You own it

๏ Takes time to build
๏ Need everyone on board
๏ You own it
57
⏸
Questions?
Tweet me at

@AaronGustafson
Thank you!
@AaronGustafson
aaron-gustafson.com
slideshare.net/AaronGustafson

Mais conteúdo relacionado

Semelhante a Advanced Design Methods 1, Day 2

Dynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and MobileDynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and Mobile
peychevi
 

Semelhante a Advanced Design Methods 1, Day 2 (20)

Lecture-8.pptx
Lecture-8.pptxLecture-8.pptx
Lecture-8.pptx
 
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
 
Dynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and MobileDynamic User Interfaces for Desktop and Mobile
Dynamic User Interfaces for Desktop and Mobile
 
Grid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SFGrid and Flexbox - Smashing Conf SF
Grid and Flexbox - Smashing Conf SF
 
CSS3 Layout
CSS3 LayoutCSS3 Layout
CSS3 Layout
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJS
 
Web Design Course: CSS lecture 4
Web Design Course: CSS  lecture 4Web Design Course: CSS  lecture 4
Web Design Course: CSS lecture 4
 
Css responsive
Css responsiveCss responsive
Css responsive
 
Blueprint & Drafter JS
Blueprint & Drafter JSBlueprint & Drafter JS
Blueprint & Drafter JS
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)
 
CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
 
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new propertiesPost-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
Leveling Up With Flexbox (Smart Web Conference)
Leveling Up With Flexbox (Smart Web Conference)Leveling Up With Flexbox (Smart Web Conference)
Leveling Up With Flexbox (Smart Web Conference)
 
Responsive design with flexbox
Responsive design with flexboxResponsive design with flexbox
Responsive design with flexbox
 
Responsive Web Design - Drupal Camp CPH
Responsive Web Design - Drupal Camp CPHResponsive Web Design - Drupal Camp CPH
Responsive Web Design - Drupal Camp CPH
 
Flexbox Will Shock You!
Flexbox Will Shock You!Flexbox Will Shock You!
Flexbox Will Shock You!
 
Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)
 
The Future of CSS Layout
The Future of CSS LayoutThe Future of CSS Layout
The Future of CSS Layout
 
Using Flexbox Today (Frontier Conf 2016)
Using Flexbox Today (Frontier Conf 2016)Using Flexbox Today (Frontier Conf 2016)
Using Flexbox Today (Frontier Conf 2016)
 

Mais de Aaron Gustafson

Mais de Aaron Gustafson (20)

Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]
 
Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]
 
Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]
 
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
 
Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?
 
Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]
 
Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]
 
Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]
 
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
 
PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]
 
Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]
 
Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
 
The Web Should Just Work for Everyone
The Web Should Just Work for EveryoneThe Web Should Just Work for Everyone
The Web Should Just Work for Everyone
 
Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]
 
Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1
 
Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]
 
Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]
 
Progressive Web Apps and the Windows Ecosystem [Build 2017]
Progressive Web Apps and the Windows Ecosystem [Build 2017]Progressive Web Apps and the Windows Ecosystem [Build 2017]
Progressive Web Apps and the Windows Ecosystem [Build 2017]
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
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
 

Último (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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, ...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 

Advanced Design Methods 1, Day 2