https://github.com/webdevbynight/news-homepage-main
This repository is an exercise from a Frontend Mentor challenge.
https://github.com/webdevbynight/news-homepage-main
exercise frontendmentor-challenge
Last synced: 5 months ago
JSON representation
This repository is an exercise from a Frontend Mentor challenge.
- Host: GitHub
- URL: https://github.com/webdevbynight/news-homepage-main
- Owner: webdevbynight
- Created: 2024-12-27T12:09:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-28T02:38:31.000Z (over 1 year ago)
- Last Synced: 2025-01-29T14:39:26.028Z (over 1 year ago)
- Topics: exercise, frontendmentor-challenge
- Language: SCSS
- Homepage: https://webdevbynight.github.io/news-homepage-main/
- Size: 1.91 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Frontend Mentor - News homepage solution
This is a solution to the [News homepage challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/news-homepage-H6SWTa1MFl). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
## Table of contents
- [Overview](#overview)
- [The challenge](#the-challenge)
- [Screenshot](#screenshot)
- [Links](#links)
- [My process](#my-process)
- [Built with](#built-with)
- [What I learned](#what-i-learned)
- [Author](#author)
## Overview
### The challenge
Users should be able to:
- View the optimal layout for the interface depending on their device's screen size
- See hover and focus states for all interactive elements on the page
### Screenshot

### Links
- Solution URL: [https://github.com/webdevbynight/news-homepage-main](https://github.com/webdevbynight/news-homepage-main)
- Live Site URL: [https://webdevbynight.github.io/news-homepage-main/](https://webdevbynight.github.io/news-homepage-main/)
## My process
### Built with
- Semantic HTML5 markup
- CSS (via SCSS)
- custom properties
- logical properties
- flexbox
- grid
- JavaScript (via TypeScript)
- Mobile-first workflow
### What I learned
In order to use the breakpoints I named in SCSS in JavaScript, I added custom properties targeting the breakpoints to the `:root` selector. First, I wanted to use `getComputedStyle()` to retrieve the custom properties, but Chrome does not include custom properties within the object returned by such a method (Chrome 131- at the time when I wrote these lines). Instead, I used `document.styleSheets` and nested `for` loops to get the custom properties.
## Author
- Website - [Victor Brito](https://victor-brito.dev)
- Frontend Mentor - [@webdevbynight](https://www.frontendmentor.io/profile/webdevbynight)
- Mastodon - [@webdevbynight](https://mastodon.social/webdevbynight)