---
title: "How to use the 'before' and 'after' pseudo-elements"
publication: "Frontend Focus"
issue: 480
published_at: "2021-03-03"
canonical_url: "https://frontendfoc.us/issues/480"
---

...plus Google Fonts gets icons, the state of GDPR, and more. |         Frontend![](https://res.cloudinary.com/cpress/image/upload/v1602675575/hhmdxfk96fnbq3effjk1.png)Focus 

#480 — March 3, 2021 | [Read on the web](https://frontendfoc.us/issues/480)  

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1614781748/zamx0n8va3mjre843pfh.png)](https://codersblock.com/blog/diving-into-the-before-and-after-pseudo-elements/)  

[Diving into the `::before` and `::after` Pseudo-Elements](https://codersblock.com/blog/diving-into-the-before-and-after-pseudo-elements/) — These pseudo-elements are incredibly versatile tools in your CSS toolkit and can be used in a wide-range of situations. This article does a good job of explaining them, and shows how to use them in practice. 

Will Boyd   

[State Of GDPR: Cookie Consent For Designers And Developers](https://www.smashingmagazine.com/2021/03/state-gdpr-2021-cookie-consent-designers-developers/) — GDPR has undoubtedly impacted our professional lives, and its worth knowing that a [fair bit has changed since its initial introduction back in 2018](https://www.smashingmagazine.com/2021/02/state-gdpr-2021-key-updates/). Here Danny looks at cookie consent — specifically how to comply with regulations whilst being reliant on services such as Google Analytics. 

Danny Bluestone   [![\](https://copm.s3.amazonaws.com/195bc6eb.jpg)](https://launchdarkly.com/the-definitive-guide-to-feature-management/?utm_source=cooperpress&utm_medium=display&utm_campaign=21q1-cooperpress) 

[The Definitive Guide to Feature Management](https://launchdarkly.com/the-definitive-guide-to-feature-management/?utm_source=cooperpress&utm_medium=display&utm_campaign=21q1-cooperpress) — Feature management is a new class of software development tools/techniques powered by feature flags. A feature management platform like LaunchDarkly fills the gaps of conventional feature toggles. Learn the ins & outs of feature management today. 

LaunchDarkly sponsor   

[Hiding Content Responsibly](https://kittygiraudel.com/2021/02/17/hiding-content-responsibly/) — All the ways to hide something, be it through HTML or CSS, and when to use which. 

Kitty Giraudel   

[10 Years of Open-Source Visualization with D3.js](https://observablehq.com/@mbostock/10-years-of-open-source-visualization) — The creator of [D3.js](https://d3js.org/) (the popular data visualization library) reflects on ten years since D3 1.0 was released with what he’s learnt from both developing D3 and leading a prominent project for so long. Congratulations, Mike! 

Mike Bostock     

**⚡️ Quick bits:** 

- [ARIA 1.2](https://www.w3.org/TR/2021/CR-wai-aria-1.2-20210302/) is a W3C Candidate Recommendation.
- Google Fonts now has [over 2,000 distinct Material Icons for you to use](https://fonts.google.com/icons), and more sets are [said to be on the way](https://material.io/blog/google-fonts-material-icons).
- Chrome is [testing a 'follow' button](https://wptavern.com/chrome-is-testing-a-follow-button-for-websites) for websites.
- [Here are the release notes for Safari Technology Preview 121](https://webkit.org/blog/11555/release-notes-for-safari-technology-preview-121/), which adds support for `aspect-ratio` on Grid items.
- Multithreaded HTML5 browser [Flow is now available in preview for all Raspberry Pi devices](https://www.ekioh.com/blog/making-flow-available-on-all-raspberry-pi-computers/).
- Two new DevTools experiments have landed in Edge Canary (including a 'Focus Mode'). [Here are the details](https://twitter.com/EdgeDevTools/status/1366503370446557186).
- A visual flexbox editor is coming to Chrome soon (in version 90), as [Stefan demonstrates in this tweet](https://twitter.com/stefanjudis/status/1366526458001297410).   

📙 **Tutorials, Articles & Opinion**  

[Disabling a Link for Ten Seconds with Pure CSS](https://gist.github.com/mewmew/510801ff9024f833c4967c8a922d1a05) — The goal here is to prevent access to discussion threads unless you decide, after ten seconds, you _really_ want to participate.. but there are surely other uses for this neat trick. 

Jesse Li   

[CSS-in-JS Support in DevTools](https://developers.google.com/web/updates/2021/02/css-in-js) — Google’s take on managing your CSS with JavaScript using the facilities available with their [DevTools](https://developers.google.com/web/tools/chrome-devtools). 

Alex Rudenko   

[Builds Run Faster on Buildkite. Get Started with a Free Trial Today 🚀](https://buildkite.com/signup?utm_campaign=CPress&utm_source=ppc&utm_medium=cp-frontend&utm_term=continuous-integration%20&utm_content=buildkite-cicd) — Buildkite is a platform for running fast, secure, and scalable continuous integration pipelines on your own infrastructure. 

Buildkite sponsor   

[Preparing for The Display Modes of Tomorrow](https://web.dev/display-override/) — Did you know that the `display_override` property can be used to define a customized fallback chain of display modes. Note: It’s only got limited browser support, and in almost all circumstances the regular `display` property is what developers should really be reaching for. 

Thomas Steiner   

[How to Map Mouse Position in CSS](https://css-tricks.com/how-to-map-mouse-position-in-css/) — Here’s how to get a user’s mouse position and map it into CSS custom properties: `--positionX` and `--positionY`, _without_ using JavaScript. 

Amit Sheen   

[A CSS Grid Tutorial for Beginners (with Interactive Examples)](https://www.codeinwp.com/blog/css-grid-tutorial-layout/) — A fairly comprehensive post that includes lots of interactive CodePen examples illustrating the primary features of the Grid Layout specification. 

Louis Lazaris beginners   

[Stop Using Icon Fonts](https://www.irigoyen.dev/blog/2021/02/17/stop-using-icon-fonts/) — “_Icon fonts became popular over a decade ago. But their convenience comes at a high cost to your visitors._” 

Michael Irigoyen   

[Keeping Count of User Visits](https://www.raymondcamden.com/2021/02/23/keeping-count-of-user-visits) — Using client-side storage to keep track of user visits to a site. 

Raymond Camden   

[Slow Site Speed Is Still The Biggest Cause of Web Stress](https://simonhearne.com/2021/web-stress/) 

Simon Hearne   

[Building User Trust In UX Design](https://www.smashingmagazine.com/2021/02/building-user-trust-in-ux-design/) 

Adam Fard  

💻 **Jobs**  

[Technology Lead (Calgary, Canada)](https://www.criticalmass.com/jobs/detail/technology-lead-calgary-2449712) — We’re a digital experience design agency seeking a senior tech lead. Help us deliver on fast paced, creative campaigns with your knowledge of HTML, CSS, jQuery and JavaScript, building accessible, scalable, and performant web apps. 

Critical Mass   

[Front End Developer (Calgary, Canada)](https://www.criticalmass.com/jobs/detail/developer-calgary-2448990) — We’re seeking an experienced frontend dev to join our design agency. Use your jQuery, HTML and CSS skills to help us develop cutting-edge responsive websites. 

Critical Mass   

[Find Your Next Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-frontendfocus%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 

Hired  

🧑‍💻 Got a job listing to share? _[Here's how](https://booking.cooperpress.com/jobs)_.  

🔧 **Code, Tools and Resources** 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1614783591/e9yw0gjf5tcnfd9vxwus.jpg)](http://blog.jquery.com/2021/03/02/jquery-3-6-0-released/)   

[jQuery 3.6.0 Released](http://blog.jquery.com/2021/03/02/jquery-3-6-0-released/) — Version 3.6.0 of the (still very popular) JavaScript library jQuery is out now, featuring various bug fixes and minor improvements. 

jQuery Foundation   

[Microlink Cards: Share Dynamic Social Images At Scale](https://cards.microlink.io/editor) — An editor to generates social images on demand, ready to be embedded in your page’s meta tags. [Here’s how to use it](https://microlink.io/docs/cards/getting-started/overview). 

Microlink   

[ress: A Modern CSS Reset](https://ress-css.surge.sh/) — A reset based on Normalize.css with some customizations for another take on the CSS reset. Not a new project, but it’s at version 3.0 since last year. 

Filipe Linhares   

[Dasha AI: Add Human-Like Voice Conversational Capabilities to Your Website or App](https://dasha.ai/en-us/developers) 

Dasha sponsor   

[Bootstrap-Themes: Free Open Source Bootstrap Themes](https://themes.1998.media/) — Currently includes about a dozen fairly diverse themes covering various topics and industries. 

1998code   

[element-resize-detector: Optimized Cross-Browser Resize Listener for Elements](https://github.com/wnr/element-resize-detector) 

Lucas Wiener    

📬 

**Got a new email address?** You can [change your email here](https://frontendfoc.us/edit_subscription/*|UID|*). 

--- 

**Bored of us?** Click [here to stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll take a look. 

--- 

Published by Cooper Press Ltd.
Curated by [Chris Brandrick](https://twitter.com/chrisbrandrick) & [Peter Cooper](https://twitter.com/peterc).
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*)
