Giter Club home page Giter Club logo

css-in-js-generator's People

Contributors

brikou 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

Watchers

 avatar  avatar  avatar  avatar

css-in-js-generator's Issues

Ship a binary?

It'd be really nice to run npx css-in-js-generator out.js

Move prettier to index.js

I would like to use the package on the browser. But because of the usage of prettier, it breaks. I already use prettier after I get the output. Moving this to index.js will eventually separate the server side specific code.

Update @emotion/core

Error using with emotion 10

  • emotion not in dependencies

With emotion 10 import is @emotion/core

hyphen removal in class names

.display2 {
  color: 'red';
}
.display-2 {
    font-size: 5.5rem;
    font-weight: 300;
    line-height: 1.1;
}

These seem to generate the same class name in JS:

export const display2 = css`
  font-size: 5.5rem;
  font-weight: 300;
  line-height: 1.1;
`;
export const display2 = css`color: "red";`;

Not sure if there is a good solution.

Bootstrap v5 .form-check-label

So .form-check-label no longer has it's own styling, only related styles depending on the sibling input. This creates a rather strange bit of output!

    &:disabled ~ .form-check-label,
    &[disabled] ~ .form-check-label {
        opacity: 0.5;
    }

    &.${isValid} {
        border-color: #198754;
    }

[BAD PRACTICE] When converting nested rules into nested and interpolated css`` rules

In the following example, the transformer demonstrates the following rule:

.alert-dismissible .close {
    position: relative;
    top: -0.75rem;
    right: -1.25rem;
    padding: 0.75rem 1.25rem;
    color: inherit;
}

being converted into:

export const alertDismissible = css`
  & .${close} {
    position: relative;

    top: -0.75rem;

    right: -1.25rem;

    padding: 0.75rem 1.25rem;

    color: inherit;
  }
`

This should come with a warning as, per emotions documentation:

To nest a class selector using the class generated with css you can interpolate it but this is strongly recommended against and should only be used in rare circumstances because it will break when used with composition.

Meaning that it'll break when trying to force specificity using cx

Extra new lines

I am seeing that there are a lot of newlines in injectGlobal

screen shot 2017-10-03 at 3 44 58 am

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.