Skip to content

chianglynn/frontendmentor-room-homepage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Room homepage solution

This is a solution to the Room homepage challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Navigate the slider using either their mouse/trackpad or keyboard

Screenshot

Mobile

img

Desktop

img

Links

My process

Built with

  • Semantic HTML5 markup with responsive images syntax
  • CSS custom properties (SCSS to control scope with BEM naming)
  • Flexbox
  • CSS Grid
  • Mobile-first workflow

What I learned

Use the HTML element to set up different image sources for the browser viewport.

<picture class="slider__pictures--1 slider__pictures">
  <source media="(max-width: 47.99em)" srcset="./src/images/mobile-image-hero-1.jpg">
  <source media="(min-width: 48em)" srcset="./src/images/desktop-image-hero-1.jpg">
  <img src="./src/images/desktop-image-hero-1.jpg" alt="hero-1">
</picture>

Author