Giter VIP home page Giter VIP logo

spectrum-css-grid's Introduction

spectrum-css-grid

A CSS-Grid implementation of the Spectrum Design Language's grid system.

Goals

Provide a CSS Grid 1 implementation of Spectrum's responsive grid targetting evergreen browsers, for use both in applications and web sites.

Installation

Download and link dist/spectrum-css-grid.css in your project, along with the Custom Properties flavour of Spectrum CSS (https://github.com/adobe/spectrum-css#css-custom-properties-strategy).

Usage

The Grid's Role in Layout

In the world of the Spectrum design language, regardless of whether you are making an informational website or a rich application experience, the grid is solely for laying out the regions of the content. That is what this grid implementation is intended to help with.

It is not meant to be used for the chrome/frame of the experience. For example, the navigation or any left/right locked panels.

Clear examples of do's and do not's can be found in the official Spectrum documentation.

Browser Support

This grid officially supports all browsers that implement CSS Grid Level 1 and Custom Properties. Refer to Can I Use: css-grid for current stats. Note that only unprefixed implementations are supported.

Getting started

Layout regions need to exist as immediate children to the container (spectrum-grid or spectrum-grid--fixed). Define each layout region's column span using the grid-column property in your stylesheet.

Check out the demo page with examples of the grid system.

Example

HTML

<main class="spectrum-grid">
  <div id="example1"></div>
  <div id="example2"></div>
</main>

CSS

#example1 {grid-column: 1/5;}
#example1 {grid-column: 5/13;}

A CSS Grid Primer

The magic of CSS Grid is that once Spectrum sets up the underlying structure of the container, you are free to do whatever you want with standard CSS properties. To learn about how to work effectively with the grid, watch Rachel Andrew's quick video tutorial series: https://gridbyexample.com/video/

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

spectrum-css-grid's People

Contributors

ryanbetts avatar natebaldwindesign avatar karstens avatar garthdb avatar misterbrownlee 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.