Giter Site home page Giter Site logo

less-properties's Introduction

Stand With Ukraine

less-properties's People

Contributors

bisrael avatar borodean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bisrael

less-properties's Issues

add a license

Have you considered adding a license?

Maybe MIT or Apache? or perhaps the WTFPL if you're into that sorta thing.

Just please not GPL, LGPL or BSD :)

Thanks!

Allow passing a value with spaces without wrapping it as an escaped string

With any value that has spaces in it (e.g. 1px solid red), fails to generate a proper CSS definition since LESS treats the argument as an array of values. You can get around this in your solution by passing it in as an escaped string (e.g. ~"1px solid red"). Out of your test cases, the following seem to contain this bug:

.test-compound
.test-function-param-preserve-second
.test-function-param-preserve-first
.test-function-param-preserve-double
.test-nested-coumpoun

Here is an example of the failing output:

.property(transition, all .5s ease, "webkit moz o");

.test-compound {
  -test-should: generate a property definition that looks correct;
  -less-property: ;
  -webkit-transition: [all, 0.5s, ease];
  -moz-transition: [all, 0.5s, ease];
  -o-transition: [all, 0.5s, ease];
  transition: [all, 0.5s, ease];
}

In my solution, I encountered this same problem, but resolved it by escaping the argument before using it. In your mixin, if you escape both the @property and @value arguments into new variables, I think it would be more robust. For example:

.property(@property, @value, @prefixes: '', @base: true) {
  @prop: e('@{property}');
  @vals: e('{@value}');

  // ...
}

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.