Friday, April 26, 2024
HomeCSSFavorite Issues 2: New CSS Options, JS Libraries and Extra

Favorite Issues 2: New CSS Options, JS Libraries and Extra


Right here’s a brief round-up of a number of the internet applied sciences and assets which are getting me excited proper now. Having began with one of the best intentions to jot down considered one of these posts common, it’s been a number of months for the reason that first one.

Facet Ratio

Chrome (and Edge by extension) simply shipped assist for the brand new CSS aspect-ratio property! CSS Methods has a breakdown of what that is and tips on how to use it. As soon as this has widespread assist, it’ll render padding hacks a factor of the previous. The syntax couldn’t be less complicated — right here’s how we might create a component with 4:3 facet ratio:

.factor {
width: 100%;
aspect-ratio: 4 / 3;
}

Google’s developer weblog includes a full breakdown of tips on how to use it it along side object-fit for facet ratio pictures.

Container queries on the horizon

One other factor that’ll quickly be making our lives simpler is the much-anticipated specification for container queries. Media queries have lengthy bestowed on builders the power to model components in a different way relying on viewport width, however one factor that’s eluded us is styling based mostly on the scale of a mother or father factor. Consider a grid of playing cards which could not take up the total web page width. In a structure with a sidebar we’d need to implement a two-column structure, however with out a sidebar we’d need to present rows of three, or use a distinct model altogether. Ethan Marcotte wrote a extra thorough rationalization of why container queries are helpful just a few of years in the past.

Flexbox and CSS Grid have made it simpler to create intrinsically responsive layouts with out the necessity for media queries within the current years, besides, few builders would disagree that container queries – styling depending on the scale of a containing factor – could be very useful. A sensible implementation turned out to be something however easy, and lots of had just about given up hope. However lately the dialogue was revived, and it appears like we’d get our want in spite of everything! It’s nonetheless too early to say after we can anticipate to have the ability to begin utilizing container queries, however hey, it provides us one thing to look ahead to.

Draggable

I’ve written earlier than about how a lot I like animating with Greensock (GSAP). Lately I had enjoyable enjoying round with the Draggable plugin to construct this paper snowflake maker – drag the handles to chop out a singular paper snowflake. The snowflake segments are made utilizing CSS clip-path, and dragging the handles updates the polygon path worth. I made heavy use of customized properties right here too.

See the Pen
Snowflakes with clip-path trigonometry
by Michelle Barker (@michellebarker)
on CodePen.

Course: Three.js Journey

Screen shot of the Three.js Journey landing page

You might need seen Bruno Simon’s wonderful portfolio website – a visible feast the place you drive a automotive by a 3D panorama — or come throughout a few of his different work on the internet. These immersive experiences are constructed with Three.js, and Bruno has lately launched a complete Three.js video course, Three.js Journey — full with its personal spectacular touchdown web page! The course takes you from the fundamentals proper by to superior methods, and there’s a lot to be taught alongside the best way, even when you have some expertise with Three.js. It’s nice worth too!

I’m having fun with working my method by it. Right here’s a bit of bug animation I made utilizing what I’ve learnt to this point.

See the Pen
Three JS grub
by Michelle Barker (@michellebarker)
on CodePen.

Create App

One of many frequent gripes with fashionable entrance finish improvement is the time it will probably take simply to put in and configure all the mandatory tooling and frameworks. Whether or not your construct software of selection is Webpack, Parcel or Snowpack, Create App helps you get a undertaking up-and-running shortly and simply. Choose your choices for styling, linting, JS frameworks and extra to generate a undertaking boilerplate. I can positively see myself utilizing this for beginning future tasks.

Newsletters

Listed here are a few newsletters that at all times deliver pleasure to my inbox.

ViewBox

Screen shot of the Viewbox homepage

This fabulous publication by Cassie Evans and Louis Hoebregts focuses on one SVG-related subject per challenge, and options attractive demos and an SVG problem. I additionally actually love the header animation and may’t cease replaying it.

Subscribe now

Entrance Finish Horse

Screen shot of the Front End Horse homepage

The Frontend Horse web site has lately undergone a redesign, with some attractive illustrations. Every challenge of the publication options an in-depth breakdown of a inventive demo from the likes of Adam Kuhn, Andy Barefoot, Ilithya and extra. I used to be honoured that Alex selected to function my Bizarre Fishes demo in a current challenge!

Subscribe now



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments