MGLS #26 Responsive Web Design: The Next Decade (1/4)

i’m here to talk to you today about responsive web blueprints next decade hello everyone my epithet is ethan marcotte i’m an independent designer based in the united states i’m beep on twitter now 2020 well it had a lot of things going on in it but it had one special time in it for me because on may 25 th i had a little bit of a milestone because 10 year ago something rather substantial happened in my profession which is i published a little article announced accept web pattern now in the article i proposed that there was a brand-new way of thinking about designing for the web that the web is really if you think about it the first rightfully adaptable scheme medium there’s never been anything quite like it but at the time i wrote the section we were still thinking about designing for the web in terms of siloing its own experience to different machines designing separate portable ordeals various desktop websites separate tablet websites and what i proposed in the commodity was that we could design across those ordeals squandering the flexibility roasted into the heart of the web as a designing resource as a fortitude now in the essay i put forward a very high level overview of what makes a design responsive and it mostly only evaporates down to three definite ingredients first and foremost there’s a liquid or adaptable grid that’s built with ratios rather than inflexible pixels there are adaptable epitomes and media that work within those adaptable schemes and then finally there are media inquiries which are a little bit of fairy junk from the css3 specification that allow us to enunciate how and when those adaptable layouts need to change their contour to adapt to the changing size of a screen or respond to a differently sized exhibition now that was then all the way back in 2010 now if we fast forward 10 years the landscape looks dramatically different because i have to be perfectly honest with you it feels very weird being the person talking about accept design over a decade last-minute i amply believe i signify i just i wrote an essay but since that time so many designers and agencies and businesses and brands and publishings i deeply respect and admire guided with the relevant recommendations to a limited extent that i never could have imagined and across nearly every industry from personal blogs and portfolio places to large-scale travel outlets to media reach contest places to e-commerce sites each one of them began to adopt responsive pattern and learned that the opennes broiled into the web is a real strength that we can leverage when we’re make for more maneuvers and situations than ever before and as they experimented with the accept blueprint they started to share lessons about how it converted their rehearsal internally how it raised different disciplines closer together and in doing so they were able to build more effectively across all the complexity that we’re being asked to manage on a daily basis in other words as an industry in the last 10 times we’ve started to develop a vocabulary for how pattern is evolving into this new weird post-desktop landscape we’re all trying to record with but there’s one question that i still hear from every patron that i work with or each company that i speak with on a daily basis and that is so what happens next now simply to be clear when i hear this question there’s usually a little bit of fear in the eyes of the person or persons inviting it because if you think about it we’ve been asked to deal with a considerable amount of change and intricacy simply in the last 10 times and it’s still changing to this day i necessitate mobile which sort of kicked off the whole accept discussion is still exploding according to some reckons there are nearly eight billion mobile devices estimated to be in use worldwide now tablets are still relatively speaking in newer browsing context and we’re still working on the best way to design for them but they’re still fantastically favourite now this statistic’s a few years older but it still storeys me that in 2011 alone some 80 new tablet machines entered the marketplace in one 12 -month period that’s staggering and of course there’s been a considerable amount of investment in trying to understand what else is likely to be out there that we should start “ve been thinking about” make for so smart-alecky tv smart watches another kind of wearable there’s an incredible about of excitement around this question what happens next but here’s the problem with that question i know i for one can’t perhaps answer it and i don’t think anybody truly can we don’t know where we’re going but the one thing that i do know is that in the last 10 years responsive design’s three main ingredients haven’t changed every responsive layout is still built today with resilient grids adaptable epitomes and media queries but more detailed information around every single one of those ingredients have changed in a million different wonderful courses so with that in mind let’s look at some of them during the course of this talk i want to actually use the home page of a false magazine that i’ve designed called the viewport to look at some of the ways in which accept motif has changed stayed the same but likewise of the many rooms that it’s changed or became very different so exploiting this simple design we’ll look at individual fragments of this scheme and look at how to implement it now in 2020 and in doing so we’re going to review those three ingredients of a responsive layout liquid grids fluid portraits and media inquiries and we’re going to look at some of the new ways that we can use today to create them so as we look through them you’re going to learn new ways to build responsive designs today and that’s going to help you better prepare your produces for the challenges in front of you tomorrow so with that in mind let’s get started let’s begin right at the top with fluid grids now in continuing our flashback tour i’m going to “ve brought you” all the way back to the original article and this was sort of the test designing that i worked on back in 2010 to show how a responsive design could actually succeed how you could marry fluid grids and media queries to build these flexible layouts that could change their determine deepen their rendition modify the placement of information on the sheet to better suit the amount of space available to them in a viewport now there’s a lot of fervor around the stunning natures in which a accept layout can adapt using media inquiries but actually the workhorse of a accept layout is the fluid grid in other words we’re moving away from pixels and defining our schemes and coming up with grid-based intends that are completely proportional that move in synchronicity in a satisfy and amicable space so in other words every accept motif has to begin with a resilient foot and that helps us better intend across all these different inventions and situations that we’re being asked to reckon with on a daily basis what’s more we have new remarkable tools for creating that flexible foot and i want to talk about two of them with you today precisely flexbox and the css grid layout pose so let’s start with flexbox now flexbox or the resilient chest simulation basically is a way to control the distribution of receptacles constituents along an axis i realize it reverberates a little confusing but let me show you a very simple example from the viewports homepage exclusively i’d like to draw your attention to the masthead that appears at the exceedingly top of the sheet which exactly contains the logo and the primary sailing now the primary piloting is marked up as a roster in the html but we can actually override its default representation and define it as a flexible carton by establishing its flaunt asset to flex and then we can also fixed a flex counseling of row and this installs the axis along which other ingredients inside the adaptable carton are laid down by so with the flex tendency asset set to row the axis follows the row and then the elements inside the flexbox are laid out across it now we can actually reuse the same mechanic for the entire masthead as well we can set the masthead to expose flex proving our resilient casket and then we can set the flex direction to row again laying out components along that axis now you’ll notice that these two elements are actually dramatically removed from each other along that axis one on the left one on the right that’s because of this third dimension that we’ve define vindicate content’s room between ensures that there’s well enough space between these components and gives them evenly along the axis now the first item will ever lay flush against the starting edge of our flexbox and the last item will always be flush against the ending edge now since there are only two elements inside of our flexbox this is a very easy way to push them to defending outcomes of their receptacle now what’s incredibly strong about flexbox is that it can work along a horizontal axis as well so let’s turn away from the masthead and actually returning our scrutiny closer to the bottom of the sheet where we’re promoting different blog records that we’ve been publishing in the magazine so each one of these teasers for an individual article is built with flexbox in a same sort to what we just did with the masthead the teaser is basically has a background color attached to it and its spectacle asset is also set to flex now you are able to notice that we’re not actually specifying flex tack row now because that’s actually the default value of flex attitude so with that in sentiment we’ve still got an axis moving across the horizontal axis of the box and that’s where the two main pieces of content are laid down by on along that axis so the image appears on the left and the teaser content appears on the right now the content of the teaser itself though is also set to be a resilient casket with the presentation flex asset but here we’re actually giving flex direction to column to establish a horizontal axis from top to bottom and then the individual aspects inside of there are laid out along that axis now you’ll notice here that there’s a big gap between the headline and the byline that appears closer to the bottom of the box that’s because we’ve organize the flex proliferate belonging on the headline to one which mostly tells it as a resilient piece to occupy as much space as it can along the axis propagandizing the contents closer to the bottom and ensuring the headline occupies as much space as possible inside its flexbox receptacle so we’ve just scratched the surface of some of the things that flexbox can do for us in a accept motif remember it’s basically just about controlling the distribution of parts along an axis of a receptacle now css grid is a different devil only it allows us to layout content in sequences and pieces within a receptacle now before we dive into code let’s just take a really brief look at some of the differences between auto-mechanics of what a css grid does and how they work together so if you’ve worked with any kind of grid in a traditional layout lotion or building one in html and css a grid is basically frequently erected of lines right and those are often separated from sewers between them and that’s very true in css grid as well there are towers and channels but just as well there are also rows that can be separated by gutters along the horizontal axis from top to bottom so let’s see how that can actually work in practice here’s a very simple demo really rigged up in some basic html so let’s say we have a container element that has a assortment of simple little ingredients inside of it that only contain the little snippets of verse now by default because of the practice which blocks will spurt in content those pieces of content will precisely stack on top of each other but if we reform the receptacle from a block rank component into a grid we can set its parade quality to grid and then utilizing the grid template towers asset we can set up a row or we can set up a grid of four columns each set to 100 pixels so with that in place we’ve moderately dramatically changed the presentation of the information inside of that container we’re no longer stacking these pieces on top of each other but preferably they’re automatically get slotted into those individual 100 pixel wide pillars and then flowing down to a second row when they surpas the width of their receptacle now if we’d like to have a little bit of spacing between those entries we can use the grid chink dimension and say gap them out by 10 pixels and the neat thing about the grid breach property is that it’s actually a shorthand property that’s uh expands out to grid column crack and grid row divergence so if you’d like to control those two rooms separately that’s an option to you as well now what we’ve been looking at so far is witnessing how these pieces automatically reflow through the grid by default but we can override that behavior and actually specify different placements for those working parts applying dimensions like grid editorial expiration so for example if i wanted to accord a little bit more prominence to one of these pieces i have been able to say grid column and straddle to to ensure that that component is actually spanning two pillars now i should probably pause here and just take a moment because what we’re doing here isn’t actually spanning two columns in fact let’s take a closer look at how our grid is framed so in our grid we have as we launched before four separate rows but once we characterized that grid we likewise defined a launch of grid texts that run across the grid from turn left to right each one of them bounding off one of those rows now those are also numbered and we can refer to those numbered indices when we’re laying out individual grid components so for example if we have an individual grid component inside of our container we can say we want its grid column to culminate at 3 and 3 refers to a specific grid position a specific column line consuming grid column point three we can then say to that item we want you to expand your thicknes until you’ve reached that third grid string we can also change the initial placement of the item let’s say grid tower start 2 and grid row intent five and that’ll ensure that that item begins at the second grid path and dissolves at the fifth one now we could also be a little bit less precise we can use the span keyword to basically determine how many ways from the opposite edge this particular grid item should cover so here we want it to span three routes so if we’re starting from two we would then end at five we are capable of even crumble all the css a little bit further and move it down into the individual grid editorial quality which is just a shorthand value that allows us to specify the start and intent arrangements[ Music]

As found on YouTube

Leave a Reply

Digital Marketing Tips

    admin_wy5t8zpmSeptember 12, 2022

    5 Reasons You Need a Digital Marketing Plan If you’re like most business owners, you understand the importance of having a