• Latest
  • Trending

Airbnb engineers explain how to prevent layout from collapsing even when changing font size on the browser side

May 22, 2024

IndiaHighlight.com Launches Comprehensive Kerala Travel Guide: Your Ultimate Companion to Exploring God’s Own Country

May 15, 2026

Rediscovering Family Time This Eid at Novotel Cairo Airport

May 6, 2026

Rediscovering Family Time This Eid at Novotel Cairo Airport

May 6, 2026

Approach Tours Takes Its All-Inclusive Model to the Water with New Cruise Portfolio

May 5, 2026

Nexus DMC Wins Australian Advisors with 5 Giving Back Reasons

May 5, 2026
Long Lake to take American Express Global Business Travel private in $6.3bn deal

American Express Acquires Global Business Travel for $6.3B

May 5, 2026
Ontario government tries to take partial control of Toronto’s City airport; now the fun starts

Ontario Government Seeks Partial Control of Toronto City Airport

May 5, 2026
Double-digit dates boost travel bookings

Double-Digit Dates Propel Travel Bookings

May 5, 2026
Arun Parmar Appointed Director of Engineering at MakeMyTrip India Private Limited (redBus)

Arun Parmar Named MakeMyTrip India’s Director of Engineering (acquired by redBus)

May 5, 2026
Botswana: UK Imposes Visa On Botswana Nationals

Nigeria: Gateway Airport Launches Global Hajj Flight

May 5, 2026

UK, India, Saudi Arabia, GCC, Russia, Emirates, Etihad, Qatar Airways, British Airways Join Initiative

May 5, 2026
Long Lake Agrees to Acquire Amex GBT for $6.3 Billion in AI-Driven Take-Private Deal

Long Lake Acquires Amex GBT for $6.3B in AI-Driven Take-Private Deal

May 5, 2026
  • Login
  • Register
Plugin Install : Cart Detail need WooCommerce plugin to be installed.
TravelTradeToday
  • Featured
  • Travel News (General)
  • Travel AI
    • Travel Fintech
  • Airlines
    • American Airlines
    • AirAsia
    • Air India
    • Air Canada
    • Arajet
    • British Airways
    • Citilink Indonesia
    • Delta Airlines
    • Emirates Airlines
    • Ethiopian Airlines
    • FlyDubai
    • FlySafair
    • Indigo Airlines
    • Jetblue Airlines
    • Jeju Air
    • Kenya Airways
    • Korean Air
    • Other Airlines
      • Go Air
      • Jet2.com
      • Spring Airline
      • Thai Lion Air
      • Vietjet
      • Wizz Air
    • Qatar Airways
    • Riyadh Air
    • United Airlines
    • Vistara
  • DMC
  • GDS
    • Amadeus
    • SABRE Corporation
    • Travelport
  • Special Interest TourismNew!!
    • Wellness Tourism
    • Medical Tourism
    • Sustainable Tourism
  • Hotel
    • Hotel Trade News
    • Hotel Technology
      • Rategain
  • OTA’s
    • All
    • Agoda
    • Booking Holdings
    • Despegar
    • eDreams Odigeo
    • Expedia Group
    • HostelWorld
    • MakeMyTrip
    • TripAdvisor
    • Traveloka
    • TUI Group
    • Yanolja
  • Travel Startups
    • Airline Startups
    • Notable Travel Startups
    • Travel Startups
  • Travel Tech
    • Travel Tech Companies
      • Hopper
      • Mystifly
      • SAP Concur
    • Travel AI
    • Travel Fintech
    • Travel Blockchain
    • Travel Metaverse
    • Travel NFT’s
    • NDC OneOrder
    • Travel Payment Provider
  • Business Travel News
    • AMEX GBT
  • M.I.C.E.
  • Travel Insights
    • IDEO
    • Lighthouse
    • McKinsey Insights
    • OAG
    • Sojern
    • Think Google
  • Travel Trends
    • Insights Forecasts Trends
    • Travel Trends
  • Tourism (By Country)
    • All Countries
    • Africa Tourism
    • Bangladesh Tourism
    • Bhutan Tourism
    • Brazil Tourism
    • Cambodia Tourism
    • China Tourism
    • India Tourism
    • Iran Tourism
    • Korea Tourism
    • Laos Tourism
    • Myanmar Tourism
    • Nepal Tourism
    • Pakistan Tourism
    • Qatar Tourism
    • Saudi Arabia Tourism
    • Singapore Tourism
    • South Africa Tourism
    • Thailand Tourism
    • Turkey Tourism
    • UAE Tourism
    • Vietnam Tourism
  • Trade Associations
    • IATA – International Air Transport Association
    • International Transport Forum
    • World Travel Tourism Council
    • UNWTO
  • Help
    • FAQ’s & Help Docs
    • Contact Us
    • Content Suggestion Form
    • Shop!
    • Accessibility
    • Terms and Conditions
    • Privacy Policy
    • About
  • Submit Travel Press Release
    • Free Travel Press Release Distribution
    • Help (Travel Press Release Distribution)
No Result
View All Result
  • Featured
  • Travel News (General)
  • Travel AI
    • Travel Fintech
  • Airlines
    • American Airlines
    • AirAsia
    • Air India
    • Air Canada
    • Arajet
    • British Airways
    • Citilink Indonesia
    • Delta Airlines
    • Emirates Airlines
    • Ethiopian Airlines
    • FlyDubai
    • FlySafair
    • Indigo Airlines
    • Jetblue Airlines
    • Jeju Air
    • Kenya Airways
    • Korean Air
    • Other Airlines
      • Go Air
      • Jet2.com
      • Spring Airline
      • Thai Lion Air
      • Vietjet
      • Wizz Air
    • Qatar Airways
    • Riyadh Air
    • United Airlines
    • Vistara
  • DMC
  • GDS
    • Amadeus
    • SABRE Corporation
    • Travelport
  • Special Interest TourismNew!!
    • Wellness Tourism
    • Medical Tourism
    • Sustainable Tourism
  • Hotel
    • Hotel Trade News
    • Hotel Technology
      • Rategain
  • OTA’s
    • All
    • Agoda
    • Booking Holdings
    • Despegar
    • eDreams Odigeo
    • Expedia Group
    • HostelWorld
    • MakeMyTrip
    • TripAdvisor
    • Traveloka
    • TUI Group
    • Yanolja
  • Travel Startups
    • Airline Startups
    • Notable Travel Startups
    • Travel Startups
  • Travel Tech
    • Travel Tech Companies
      • Hopper
      • Mystifly
      • SAP Concur
    • Travel AI
    • Travel Fintech
    • Travel Blockchain
    • Travel Metaverse
    • Travel NFT’s
    • NDC OneOrder
    • Travel Payment Provider
  • Business Travel News
    • AMEX GBT
  • M.I.C.E.
  • Travel Insights
    • IDEO
    • Lighthouse
    • McKinsey Insights
    • OAG
    • Sojern
    • Think Google
  • Travel Trends
    • Insights Forecasts Trends
    • Travel Trends
  • Tourism (By Country)
    • All Countries
    • Africa Tourism
    • Bangladesh Tourism
    • Bhutan Tourism
    • Brazil Tourism
    • Cambodia Tourism
    • China Tourism
    • India Tourism
    • Iran Tourism
    • Korea Tourism
    • Laos Tourism
    • Myanmar Tourism
    • Nepal Tourism
    • Pakistan Tourism
    • Qatar Tourism
    • Saudi Arabia Tourism
    • Singapore Tourism
    • South Africa Tourism
    • Thailand Tourism
    • Turkey Tourism
    • UAE Tourism
    • Vietnam Tourism
  • Trade Associations
    • IATA – International Air Transport Association
    • International Transport Forum
    • World Travel Tourism Council
    • UNWTO
  • Help
    • FAQ’s & Help Docs
    • Contact Us
    • Content Suggestion Form
    • Shop!
    • Accessibility
    • Terms and Conditions
    • Privacy Policy
    • About
  • Submit Travel Press Release
    • Free Travel Press Release Distribution
    • Help (Travel Press Release Distribution)
No Result
View All Result
TravelTradeToday
No Result
View All Result

Airbnb engineers explain how to prevent layout from collapsing even when changing font size on the browser side

by Robert Van Pash (Editor)
May 22, 2024
in AirBnb
0 0
A A
0
Share on FacebookShare on LinkedInShare to WhatsAppShare to E-mailShare to ChatGPTShare to PerplexityShare to Vk

May 22, 2024 07:00:00


People with visual impairments may access websites by enlarging the text using the browser’s magnification function or custom CSS, but if the site does not respond properly, the layout will be disrupted. Airbnb’s company blog explains how to accommodate text size changes while maintaining the layout.

Rethinking Text Resizing on Web. Airbnb has made significant strides in… | by Steven Bassett | The Airbnb Tech Blog | May, 2024 | Medium

https://medium.com/airbnb-engineering/rethinking-text-resizing-on-web-1047b12d2881

Here’s what an Airbnb page looks like to someone with severely impaired eyesight: It’s very difficult to read what’s written on it.

The browser has a zoom feature that can be accessed from the menu or by using the shortcut ‘Ctrl + +’ to zoom in and out on the content of any page.

You can use the service without any problems using the zoom function on devices with a large display area, such as desktop PCs. However, on mobile devices, zooming up to 200% causes the headers and footers to become larger, cutting the area available for the viewport in half, making browsing comfortable.

That’s where font scaling comes in. Some browsers, like

Arc , have the ability to change the size of fonts, which allows you to scale only the text elements, as opposed to zooming, which scales the entire content of the page.

When dealing with font scaling, we need to distinguish between elements that should scale when the font size changes, and elements that should remain a constant size regardless of the font size. In CSS, the distinction between these two settings is made by units such as ‘px’, ’em’, and ‘rem’.

‘px’ is a unit that represents one pixel on the screen, and content whose size is specified in px units will always be rendered at a constant size. ‘rem’ and ’em’ are both units that specify a size relative to the font size. The image below shows an example of specifying a size in each of the three units, with the font size initially set to 16px.

When the font size is increased to 20px, elements whose size was specified in ‘px’ units do not change, but elements whose size was specified in ‘rem’ and ’em’ become larger to match the font size. Because ‘rem’ is a size relative to the font size of the html element, even if you overlap an element with ‘0.5rem’, it will be displayed at the same size, but because ’em’ is a size relative to the parent font size, if you overlap ‘0.5em’, the final display size will be multiplied and will become smaller and smaller.

The rem unit is always based on the font size of the root html element, which makes it more consistent and predictable even in complex layouts. Airbnb decided to use ‘rem’ instead of ’em’, and to use ‘rem’ only when changing the font size, so that the layout is maintained while only the font size is changed.

Airbnb is in the process of migrating their CSS-in-JS system from

react-with-styles to Linaria , and they needed to write code that works with both tools. Linaria introduced a new theme that automatically converts existing pixel-based values to rem, as shown below, allowing users to override rem values on a page-by-page basis.

For parts where you still want to specify in px units, they state that this can be addressed by using capital ‘Px’.

To address this issue with react-with-styles, they have prepared a wrapper for the withStyles function that gives the ability to avoid conversion and assigns the rem value that is automatically converted to the font size.

We also used

Text Resizer to check how the text would look when the font size was changed, and made adjustments to create a layout that maintained readability even when the font size was doubled.

Read further.

Tags: airbnb
ShareShareSendSendSummarizeSummarizeShare

See Your Travel Press Release Here!

Press Releases

Approach Tours Takes Its All-Inclusive Model to the Water with New Cruise Portfolio

by Robert Van Pash (Editor)
May 5, 2026
0

Leading senior Canadian travel operator Approach Tours has unveiled its new cruise portfolio, marking its expansion into ocean expedition and...

Read moreDetails

Travel Capitalist Ventures Expands Check Size to $10 Million to Deepen Emerging Market Conviction

April 9, 2026

ALTOUR Strengthens Southeast Asia Presence Through Thailand Expansion with International Tour Centre

March 25, 2026

Zimbali Lodge refurbishment strengthens premium positioning and MICE capabilities

March 25, 2026

World’s First Traveller DNA Platform to Fix AI’s Personalisation Blind Spot

March 9, 2026

Browse by Category

Travel Press Release Distribution Service from TravelTradeToday

10X More QR Code, Link and File Link Quotas.

LinkTransfer Link Management

Search Travel Trade News

No Result
View All Result

Categories

Browse by Tag

africa-tourism agoda air-asia air-canada air-india airbnb american-airlines booking-holdings british-airways business-travel china-tourism delta-airlines emirates-airlines ethiopian-airlines expedia-group flydubai hotel-news hotel-technology iag india tourism indigo-airlines jetblue-airlines kenya-airways korea-tourism korean-air nepal-tourism pakistan tourism qatar-airways saudi-arabia-tourism singapore-tourism south africa tourism thailand-tourism travel-ai travel-insights travel-pass travel-technology travel startups travel trade turkey tourism uae tourism united-airlines vaccine-passport vietjet wellness-tourism wizz-air

© 2026 Travel Trade Today Ltd. All Rights Reserved. Use Constitutes Acceptance of Site Terms and Conditions & Privacy Policy. Void Where Prohibited By Law. Contact Us with questions/concerns/content removals.

Welcome Back!

Sign In with Google
Sign In with Linked In
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Google
Sign Up with Linked In
OR

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Airlines
  • Business Travel
  • Featured
  • Hotel
  • OTA’s
  • Wellness
  • Travel Trade
  • Travel Insights
  • Travel Startups
  • Tourism News
  • Help
    • Accessibility
    • Contact
  • Register
  • Submit Travel Press Release
  • Contact Us

© 2026 Travel Trade Today Ltd. All Rights Reserved. Use Constitutes Acceptance of Site Terms and Conditions & Privacy Policy. Void Where Prohibited By Law. Contact Us with questions/concerns/content removals.

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?