Git Product home page Git Product logo

lost's Introduction



Codecov

LostGrid is a powerful grid system built in PostCSS that works with any preprocessor and even vanilla CSS.

If you have any questions, comments, or concerns please feel free to open an issue. You're also welcome to tweet @LostGrid if an issue seems too formal.


Getting Started

LostGrid makes use of calc() to create stunning grids based on fractions you define without having to pass a lot of options.

Read the docs on LostGrid.org!

Browser Support

  • LostGrid relies on calc() to create the grid. Thus, LostGrid is limited to browsers that support calc(). The great thing is that calc() is widely supported in all current browsers and the LostGrid usage of calc() is supported as far back as IE9+.
  • If using LostGrid in flexbox mode browser support is limited to IE 10+.
  • Calc browser support
  • Flexbox browser support

Official Support

  • LostGrid is tested in the following browsers for compatibility
    • IE10+ (IE9 has the same calc() support as IE10 except for background position which LostGrid doesn't affect)
    • Evergreen Browsers (as they update automatically, tests are performed on the latest version of the following browsers)
      • Chrome
        • Chrome Canary + Chromium as well
      • Opera
      • Firefox
        • FirefoxDeveloperEdition as well
      • Edge
    • Safari 9+
  • Automated browser testing with Selenium is coming soon. ๐Ÿ‘

LostGrid Team

ย 

Thanks

  • Cory Simmons for creating this grid!
  • Alex Bass for being available to bounce ideas off of.
  • Maria Keller for the amazing logo. Be sure to hire her for all your design and motion graphic needs.
  • Everyone who files an Issue when something isn't working as expected.
  • Everyone who has contributed.

ย 

lost's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lost's Issues

Add testing

Preferably image-diff since Sass and Stylus will always fail at matching percentage values since they have different specificity on floats.

Sass 3.2

Do you still need to support Sass 3.2?

Change syntax from block() to column(), row(), and waffle()

This would be an easy change. I'm hoping to get some community feedback though.

Basically the change would be changing code like this:

.foo
  block('1/3', column)
  @media (min-width: 800px)
    block('1/2')
  @media (min-width: 1100px)
    block('1/3', both)

...to code like this:

.foo
  row('1/3')
  @media (min-width: 800px)
    column('1/2')
  @media (min-width: 1100px)
    waffle('1/3')

Personally I think it looks better and is more readable, but I want to get community feedback. Obviously this would be a major version bump up to 5.0.0.

Consider changing $cycle name

$cycle doesn't just control things looping to the next row anymore. It's sometimes part of the math involved.

Maybe something esoteric like Neat's $omega, or something descriptive like $ipr ("items per row").

Open to ideas on this, but I'd really like to move away from $cycle.

IE8 support

What are the basic requirements to make this grid system work on IE8? Would it be enough to add Respond, html5shiv, and a calc-polyfill? I know that the align() mixin won't work, but that's ok, I just wonder if the main grid can be used with the simple addition of calc-polyfill? I have used selectivizr in the past but usually doesn't work very well when you combine it with respond, expecially in a complex layout.

Horizontal Scroll on Chrome Mobile

I am getting horizontal scrolling on Chrome mobile. Here is my styl file:

@import 'lost'
html
     overflow-x hidden
section
    row()
    article
        cycle(3)
        column(1/3)

Here is my html file:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Template</title>
    <link href="css/styles.css" rel="stylesheet">
  </head>
  <body>
    <section>
      <article>
        1
      </article>
      <article>
        2
      </article>
      <article>
        3
      </article>
      <article>
        4
      </article>
      <article>
        5
      </article>
      <article>
        6
      </article>
    </section>
  </body>
</html>

Is this a bug or am I missing somthing?

Thanks

Lost with several CSS files

Hi,

I use lost in several CSS files (using Gulp). In this context, the following code is written in each file:

.container {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
  padding-left: 0;
  padding-right: 0;
}
.row {
  *zoom: 1;
  margin-left: -15px;
  margin-right: -15px;
}
.row:before,
.row:after {
  content: '';
  display: table;
}
.row:after {
  clear: both;
}
.container {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
  padding-left: 0;
  padding-right: 0;
}
.row {
  *zoom: 1;
  margin-left: -15px;
  margin-right: -15px;
}
.row:before,
.row:after {
  content: '';
  display: table;
}
.row:after {
  clear: both;
}

Would it be possible to have an option to write or not this part of the code (or another solution...)? In order to write only this code in one file.

Thanks

Port to LESS

  • edit
  • cf
  • center
  • align
  • block
  • offset
  • move
  • masonry-row

If anyone is interested

First of all, I love this calc based grid. Good job Cory.
Second, If anyone is interested I have built a fully responsive 12 col grid system with 4 MQ breaks using Corys' code. I could share what I have done and maybe get some help to perfect it... My initial tests have shown that it works great.

Remove support for $old

With calc polyfill this works for ie8. IE9+ w/o. I don't think there's a need for old syntax - ever.

Setup Documentation

Hey Cory, first off i just want to say that I am extremely excited about this grid and can't wait to try it out. I think it will really add to the projects that I am currently working on. Now,excitement aside I cannot seem to get your grid working and would really love if you could create a step by step guide on how to setup the lost grid.

Thanks so much, Mooror

$rtl variable is right-to-left when false

Using the SCSS version, I made a test using the sample code provided in the README:

<section>
  <figure>1</figure>
  <figure>2</figure>
  <figure>3</figure>
  <figure>4</figure>
</section>

section {
  @include cf;
}

figure {
  @include block('1/2');
}

However, it seems that right-to-left mode is the default. The list of numbers displays as: "2, 1, 4, 3" by default. When $rtl is set to true, it displays the way I would expect it to if $rtl was false: "1, 2, 3, 4". Either I've overlooked something or there is a faulty $rtl conditional in the code.

Full page width?

How to achieve full page width? (100%)
Currently pages look like this (default settings)(Notice those blue margins)
hey

Namespacing!

Great project, Cory, but I strongly, strongly suggest that you namespace your mixins (and functions, if applicable). Names such as edit, center, block, etc. are very general and there is a high likelihood that this could cause naming collisions with mixins/functions in other projects.

Perhaps something like lost-block, lost-center, etc.?

Lost with Gulp

Hi,

I tried to use lost with Gulp but it does not work with this syntax: .pipe(stylus({use: [rupture(), lost()]}))

I solved the problem by using the code of "rupture" (index.js). Or should I write differently?

Thank you for this excellent project!

add optional parameter to enable/disable initialization

It would be nice if there was a parameter to enable/disable the initalization of the columns, this would decrease a lot the size of the stylesheet, expecially if you're trying to generate a custom grid (similar to bootstrap). See the example below, where the @include column($init: true); would simply output float and margins, the for loop would only output the width.

[class*="col-"] {  // init
    @include column($init: true);
}
@for $i from 1 through 12 {
    .col-#{$i} { 
        @include column(#{$i}/12, $init: false);
    }
}
@include media-query(min-width: 380px) {
    @for $i from 1 through 12 {
        .col-xs-#{$i} { 
            @include column(#{$i}/12, $init: false);
         }
    }
}
@include media-query(min-width: 480px) {
    @for $i from 1 through 12 {
        .col-md-#{$i} { 
            @include column(#{$i}/12, $init: false);
        }
    }
}

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.