Rendering Theoretical 1

Rendering Tool Hands-On

Welcome to the Rendering Tool Hands-On website. This page provides practical exercises to help you apply what you've learned about the Rendering tool in browser DevTools.

Exercise 1: Highlight repainted areas with paint flashing

Enable the "Highlight repainted areas with paint flashing" option and interact with the page to see which areas are being repainted.

Exercise 2: Highlight layout shift regions

Enable the "Highlight layout shift regions" option and refresh the page to see regions experiencing layout shifts.

Box 1
Box 2
Box 3
Dynamic Content

Exercise 3: View layers and tiles with layer borders

Enable the "View layers and tiles with layer borders" option and inspect the borders of layers and tiles on the page.

Composite Layer

Exercise 4: View frames per second in real time with frame rendering stats

Enable the "View frames per second in real time with frame rendering stats" option and observe the frame rendering statistics.

Exercise 5: Identify scrolling performance issues

Enable the "Identify scrolling performance issues" option and scroll through the page to identify any performance issues.

Enable the "Identify scrolling performance issues" in Browser DevTools

Exercise 6: Highlight ad frames

Enable the "Highlight ad frames" option and identify ad frames on the page.

Ad Frame 1

Ad Frame 2

Ad Frame 3

Exercise 7: Disable local fonts

Enable the "Disable local fonts" option and observe the changes in font rendering.

Custom Fonts with @font-face

Introduction

This page demonstrates the use of @font-face rules to define custom fonts. The text below uses a custom font defined with @font-face.

This text is using the custom font defined with @font-face.

Exercise 8: Emulate a focused page

Enable the "Emulate a focused page" option and observe the changes.

mark this

Exercise 9: Enable automatic dark mode

Enable the "Enable automatic dark mode" option and observe the page in dark mode.

Exercise 10: Emulate CSS media features

Use the dropdowns to emulate various CSS media features and observe the changes:

Contrast Preference Test

This paragraph is visible in both normal and high contrast modes.

This paragraph is only visible in normal contrast mode.

This paragraph is only visible in high contrast mode.

Exercise 11: Analyze Paint Timing

Enable the "Highlight repainted areas with paint flashing" option and use the Performance panel to analyze paint timing. Identify which elements are causing the most repaints and optimize them.

Click me to repaint

Common Issue: Frequent repaints due to unnecessary style changes.

Solution: Minimize style changes and batch DOM updates.

Hover over me to repaint

Common Issue: Repaints triggered by hover effects.

Solution: Use CSS transitions to minimize repaints.

Exercise 12: Monitor Frame Rendering Stats

Enable the "View frames per second in real time with frame rendering stats" option and monitor the frame rendering stats. Identify performance bottlenecks and optimize the rendering pipeline.

Click me to rotate

Common Issue: Low frame rate due to complex animations.

Solution: Optimize animations and use CSS transforms for better performance.

Click me to resize

Common Issue: Low frame rate due to resizing elements.

Solution: Avoid resizing elements during animations.

Exercise 13: Dark Mode Optimization

Enable the "Enable automatic dark mode" option and optimize the page for dark mode. Ensure that all elements are readable and visually appealing in dark mode.

Dark Mode Content

Common Issue: Poor readability in dark mode.

Solution: Adjust colors and contrast to ensure readability in dark mode.

Another Dark Mode Content

Common Issue: Insufficient contrast in dark mode.

Solution: Ensure sufficient contrast between text and background colors.