Git Product home page Git Product logo

davegregg / flexbox-demo Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 104.0 50 KB

Fork and clone the repo. Then edit the "flex-containers.css" file, leaving everything else in the repo alone. Start with Example 1 (".container-1"). Or, you can view the final product, with completed solutions, by going to https://davegregg.github.io/flexbox-demo/

License: MIT License

HTML 65.50% CSS 20.71% JavaScript 13.79%

flexbox-demo's Introduction

Flexbox Demo

This project serves as a tool for teaching CSS Flexbox: Do the katas together with learners, narrating as you go. Please see the solutions for direction.

Advice:

Repetition is good. Continually reinforce the following key ideas:

  • The vocabulary of "main axis" and "cross axis". That is, don't take flex-direction or writing-mode for granted. Example language:

    And what is the main axis in this case? That's right: row because I am working in English and I have not specified otherwise.

  • The vocabulary of the "start" and the "end" of the axis, rather than "left," "right," "top," or "bottom."
  • The distinction between the "flex container" and its rules and "flex items" and their rules.
  • The idea that flexbox is as much about distributing available space as it is about distributing flex items.

TODO:

  • Detect plaintext-only feature and prompt with undo? Or other attempt at cross-browser compat with Firefox, Safari, Edge
  • Cache <style> elements individually
  • Then add a "View Solution" toggle for each .container
  • Capture Ctrl+/ and Cmd+/ to toggle line comments
  • Perhaps the "Solutions" may be cachable, as well, to be restored by a page-wide Reset

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.