Room Homepage
This is a challenge posed by Frontend Mentor to build furniture showcase homepage
Category
Ecommerce
Links
Stack
Pug Js
Sass
Vanilla JS
This is a challenge posed by Frontend Mentor to build furniture showcase homepage
Ecommerce
Pug Js
Sass
Vanilla JS
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.
Users should be able to:
I learnt how to properly use scss mixins in my work.
This is an example of a mixin i found for responsive breakpoint management:
/// Responsive breakpoint manager
/// @access public
/// @param {String} $breakpoint - Breakpoint
/// @requires $breakpoints
///
/// @example scss - Usage
/// .foo {
/// color: red;
///
/// @include respond-to('medium') {
/// color: blue;
/// }
/// }
///
/// @example css - CSS output
/// .foo {
/// color: red;
/// }
///
/// @media (min-width: 800px) {
/// .foo {
/// color: blue;
/// }
/// }
@mixin respond-to($breakpoint) {
$raw-query: map-get($breakpoints, $breakpoint);
@if $raw-query {
$query: if(
type-of($raw-query) == "string",
unquote($raw-query),
inspect($raw-query)
);
@media #{$query} {
@content;
}
} @else {
@error 'No value found for `#{$breakpoint}`. '
+ 'Please make sure it is defined in `$breakpoints` map.';
}
}
I also learnt how to properly structure my scss styles thanks to the Sass Guideline.
I also improved on my development when it comes to using Pug for my markup.
Moving forward I'll be focusing on being able to breakdown my Pug pages into smaller partials for easier page management.