Code Monkey home page Code Monkey logo

Comments (6)

bgriffith avatar bgriffith commented on August 30, 2024

Started to look into this one. Experience is slightly different. Parenthesis can be left off of the definition of mixins but not functions. When I try I get a Sass error;
@function baz ": expected "(", was "{"

While I can drop the parenthesis off both the invocation of functions and mixins.

// Causes an error
@function baz {
  @return 'baz';
}

// Is ok
.baz {
  content: baz;
}

// Is ok
@mixin qux {
  content: 'baz';
}

// Is ok
.qux {
  @include qux;
}

from sass-lint.

Snugug avatar Snugug commented on August 30, 2024

Check out this Sass Meister:
http://sassmeister.com/gist/17649e207a82c4efb946

The function isn't being invoked if it doesn't include (), you just happen to have named the function and its return the same, making it appear to be OK.

There is, however, a discrepancy between Libsass and Ruby Sass as to whether a function can be defined w/o (). Libsass allows it, Ruby Sass does not.

from sass-lint.

bgriffith avatar bgriffith commented on August 30, 2024

Haha oh dear. Amateur mistake! Libsass are working towards parity with Ruby Sass so do you agree that this rule should be mixin only?

from sass-lint.

Snugug avatar Snugug commented on August 30, 2024

I trusted you man! I trusted you! 😝

from sass-lint.

bgriffith avatar bgriffith commented on August 30, 2024

Hahaha 😁 - Thoughts on above?

from sass-lint.

Snugug avatar Snugug commented on August 30, 2024

Yah, only for mixins makes sense to me

from sass-lint.

Related Issues (20)

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.