Giter Club home page Giter Club logo

libcss2less's People

Contributors

awea avatar grundprinzip avatar ku1ik avatar thomaspierson 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libcss2less's Issues

Psuedo class not converted

I entered the output from an Icomoon font, for example:

.icon-Play2:before {
content: "\e63f";
}

And the result was identical to the input. I would have expected:

.icon-Play2 {
&:before {
content: "\e63f";
}
}

It would be really nice if this conversion worked, then I could quickly change the static Icomoon css classes into mixin-able Less.

Nesting a Selector - Error

Simply I've tried to convert a :hover change from:
.nav-pills li a:hover {
background-color: #f546e2;
}

to:
.nav-pills {
li {
a {
&:hover {
background-color: #f546e2;
}
}
}
}

But instead, I got:
.nav-pills {
li {
a:hover {
background-color: #f546e2;
}
}
}

PS - Sorry, new to GitHub. I don't know how to style.

@keyframe - wrong conversion

input

@-webkit-keyframes popin {
from {transform: scale(0.5); top:25%;}

}

Output

@-webkit-keyframes {
popin {
from;
}
}

Next Adjacent Selector (+) not interpreted correctly

This looks a lot like #4.

.foo > .blah {
    background: red;
}
.bar + .blah {
    background: red;
}

Converts to:

.foo {
    & > .blah {
        background: red;
    }
}
.bar {
    + {
        .blah {
            background: red;
        }
    }
}

The > has been done correctly, but the + has not. Also ~ seems to behave the same way. I'm not sure if there are any others.

Invalid conversion: "p + h4"

Found invalid conversion case. Please check example below:

CSS:

.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
} 

LESS:

.marketing {
    margin: 60px 0;
    p {
        + {
            h4 {
                margin-top: 28px;
            }
        }
    }
}

Need smarter IDE

-webkit-font-smoothing: auto; is an invalid statement in a .less file. Proper translation would be -webkit-font-smoothing: ~"auto";. Just learned this the hard way. Would be nice if the IDE at http://css2less.cc/ were smart enough to handle stuff like this. Not sure how tricky it'd be to do that... but it'd be nice!

Keep up the good work.

Repeats same property when found duplicate selector

I tried:

#container-fluid,
#row-fluid,
#row-fluid > .span2,
#sidebar-nav,
#wrapper {
    height: 100%;
    min-height: 100%;
}

#container-fluid,
#row-fluid,
#row-fluid > .span2,
#sidebar-nav,
#wrapper {
    height: 100%;
    min-height: 100%;
}

#container-fluid,
#row-fluid,
#row-fluid > .span2,
#sidebar-nav,
#wrapper {
    height: 100%;
    min-height: 100%;
}

and it produces:
here height and min-height is repeating thrice, because above same selector repeating thrice

#container-fluid,#row-fluid,#row-fluid &>.span2,#sidebar-nav,#wrapper {
    height: 100%;
    min-height: 100%;
    height: 100%;
    min-height: 100%;
    height: 100%;
    min-height: 100%;
}

support of @media rules

I understand these queries are now supported by less.js is there any chance this project will be updated to support them.

I have been using http://css2less.cc to convert my CSS and any file containing these queries currently fails.

Cheers,

Roy

Provide some parameters

Some things could become parameters, like "aesthetics" ones :

  • Use tabs or spaces for indentation ?
  • Amount of spaces used for indentation ?
  • Add a blank line before a new selector ?
  • Break a line before opening brackets ?

Or more technical ones :

  • Create variables when some values appear several times ?
  • Concatenate @import files ?
  • ...

CSS Media querys doesnt work

when i import css with this, it generates unvalid stuff and less shows an error
@media (max-width: 990px) {
body {
background-position: -468px 0;
}
}

License

You forked MIT and converted it GPL

What a shame

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.