Coder Social home page Coder Social logo

dhruvtrip / fylo-dark-challenge Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 862 KB

Design Challenge repo: In this challenge, I explore the art of building a modern, responsive, and visually appealing web layout using Flexbox, Sass, and Grid.

HTML 46.50% SCSS 53.17% CSS 0.33%
flexbox sass scss

fylo-dark-challenge's Introduction

fylo-dark-challenge

Desktop HD

Table of contents

General info

As the name suggests, I did this as a Frontend Mentor challenge. I personally believe the best way to practice your web development skills is to practice with projects and challenges. This design has some nice layout challenges in it. A perfect training ground to practice your Flexbox and Grid skills. Since this is a fully responsive development challenge, I also made use of media queries. I added breakpoints at the phone, tablet (additionally added -- not part of the challenge) and desktop sizes.

This gave me the opportunity to replicate designs just from a picture. It is a great way to work independently, in case we don't work with exact specifications or designs.

Technologies

Project is built with:

  • HTML5
  • SASS (CSS pre-processor)
  • Flexbox
  • CSS Grid
  • Mobile-first workflow (Media Queries)

Why I like SASS

I like to use SASS as it makes writing css super convenient. It provides many additional features on Vanilla CSS (used in the project), like:

Nesting

I use nesting almost throughout the whole document as it saves time and prevents errors.

nav{
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: $font-color;
        font-family: $font-stack-primary;
        padding-bottom: 2.5em;
        a{
            font-size: .9rem;
            color: $font-color;
            text-decoration: none;
        }
      }

The same thing in CSS translates to:

.wrapper nav {
 display: -webkit-box;
 display: -ms-flexbox;
 display: flex;
 -webkit-box-pack: justify;
     -ms-flex-pack: justify;
         justify-content: space-between;
 -webkit-box-align: center;
     -ms-flex-align: center;
         align-items: center;
 color: white;
 font-family: Raleway;
 padding-bottom: 2.5em;
}

.wrapper nav a {
 font-size: .9rem;
 color: white;
 text-decoration: none;
}

Variables

I use a separate variables file (_variables.scss) to have my variables in one place. I usually make variables out of components/styles that are referenced often. This also allows me to make global changes (eg: editing the colour/style scheme) extremely efficiently.

//Fonts
$font-stack-primary: Raleway;
$font-stack-secondary: Open Sans;

//Background colours
$bg-email: hsl(217, 28%, 15%);
$bg-main: hsl(218, 28%, 13%);

Modules

Just like JS modules, we don't need to write all code in one scss file. I use a separate file for variables which I then import in:

@import '_variables';

Another important feature is Mixins (not used here) which lets us make groups of CSS declarations that we want to reuse throughout your site.

Setup

If you use Node.js, you can also install Sass using npm by running:

$ npm install -g sass

If you use the Homebrew package manager for Mac OS X or Linux, you can install Dart Sass by running:

$ brew install sass/sass/sass

Once you are done, you can download the Live SASS Compiler extension in VSCode to watch your SCSS files (converting them to CSS).

fylo-dark-challenge's People

Contributors

dhruvtrip avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.