question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[request] Shortened versions of @extends, @includes etc

See original GitHub issue

I find that I’m using more and more @includes in my stylesheets which is obviously a great thing, however it feels like a lot of visual noise is added by @include, @extend etc.

I think it would be great for Sass to support alternative shortened versions of these keywords, for example:

@in some-include();
@ex some-base-class;

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:9

github_iconTop GitHub Comments

4reactions
lolmauscommented, Feb 27, 2014

The indented .sass syntax already has = for @mixin and + for @include.

I believe that other shorthand directives should follow the same pattern.

We need:

  • @function;
  • @extend;
  • @import.

I don’t think that @nex3 and @chriseppstein will accept this because it would make indented Sass kinda cryptic. On the other hand, i use = and + all the time and it’s helping a lot, so…

0reactions
chriseppsteincommented, Jul 21, 2014

@dustindowell22 Thanks. We considered the request and explained why we’re not interested in adding this to Sass.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's a good way to extend Error in JavaScript?
In ES6: class MyError extends Error { constructor(message) { super(message); this.name = 'MyError'; } }.
Read more >
Forms in HTML documents - W3C
Here's a simple form that includes labels, radio buttons, and push buttons ... Implementors are advised that future versions of HTML may extend...
Read more >
Extending with Shared Libraries - Jenkins
A Shared Library is defined with a name, a source code retrieval method such as by SCM, and optionally a default version. The...
Read more >
Declaring dependencies - Gradle User Manual
A configuration can extend other configurations to form an inheritance ... against the API of lib , executing the application, compiling tests, etc.)....
Read more >
Compose file version 2 reference - Docker Documentation
Extend another service, in the current file or another, optionally overriding configuration. You can use extends on any service together with other ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found