Giter Club home page Giter Club logo

tailwindcss-grid's People

Contributors

chrisrowe avatar magicspon avatar ssvocus avatar svale avatar

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

tailwindcss-grid's Issues

Using an array of strings on `grids` option causes unexpected behavior

Consider these options

module.exports = {
    // ...

    plugins: [
        require('tailwindcss-grid')({
            grids: ['2','3','12']
        })
    ]

And this snippet from index.js

..._.range(1, _.max(grids) + 1).map(span => ({
    [`.col-span-${span}`]: {
        gridColumnStart: `span ${span}`,
    },
})),

First_.max behaves unexpectedly finding the highest number within the grids array. It returns '3' instead of the expected 12.

Here's a REPL showing the issue.

Secondly, in this situation, the plus sign in the snippet _.max(grids) + 1 acts as a string operator instead of anarithmetic operator. So the resulting expression is _.range(1, 31). So you end up with 30 .col-span-## classes.

Personally I would just convert strings to integers. Since you're already using lodash _.toSafeInteger(value) would suffice. Or throwing an error during compile time. Not sure what would be best.

"included in multiple rulesets" compiling error since Tailwind 1.2.0

Tailwind v1.2.0 adds a .grid display utility class, which results in this compiling error:

`@apply` cannot be used with .grid because .grid is included in multiple rulesets.

See original thread in tailwindlabs/discuss#438

The solution is probably to remove tailwindcss-grid, given it's now duplicated functionality, but it would be nice to be able to upgrade to Tailwind v1.2.0 without modifying a bunch of markup.

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.