Responsive web design (RWD) is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors).
Cameron Adams - Resolution dependent layout
Ethan Marcotte (A List Apart) - Responsive web design
Fluid grids
Flexible images
Media queries
Element query is the method of adapting an element's styling, based on the size of its container and not the size of the viewport
.profile .avatar {
float: left;
width: 180px;
}
.profile ( max-width: 320px ) .avatar {
display: block;
float: none;
width: auto;
}
Element queries do not exist
.container {
display: inline-block;
}
.container .block {
width: 200px;
}
.container ( min-width: 150px ) .block {
width: 100px;
}
.profile .avatar {
float: left;
width: 180px;
}
.profile[data-eq-state$="small"] .avatar {
display: block;
float: none;
width: auto;
}
<div class="profile" data-eq-pts="small: 300, medium: 600, large: 900">
<div class="avatar"></div>
</div>
.profile .avatar {
float: left;
width: 180px;
}
.profile[max-width="200px"] .avatar {
display: block;
float: none;
width: auto;
}
.profile .avatar {
float: left;
width: 180px;
}
.profile[max-width~="200px"] .avatar {
display: block;
float: none;
width: auto;
}
.profile .avatar {
display: block;
}
.profile--large .avatar {
float: left;
width: 180px;
}
boomQueries.add('.profile', [
[180, 'profile--large']
]);
Tab Atkins - 2014 State of Element Queries
Ian Storm Taylor - Media Queries are a Hack
Nikos Zinas - @nzinas