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.

Standardize syntax

See original GitHub issue

https://github.com/stylus/stylus/wiki/1.0.0#what-to-change-in-syntax proproses some great changes to the syntax:

  • $ preluding every variable
  • : separating property: value’s in declarations
  • etc.

This has been in the proposal since Dec. 30th 2013.

Can we please just make this the standard already so every Stylus project in the world isn’t using a different syntax flavor and people like the maintainer of Emmet don’t keep forcing colonless syntax down everyone’s throat because they personally like colonless syntax.

Using Stylus on CodePen is really annoying because I can’t configure Emmet to not be stupid.

2013…

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:2
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
spiralxcommented, May 19, 2016

Surely given the proposal for enforcing the $ prefix for variables, it would be:

$hash = {
  value: 100%
}
.foo
  width $hash.value // selector with no props below, lets throw an error

My personal view is that

  • the $ prefix for variables is something I do anyway now and you get used to it quickly

  • enforcing : between property names and values seems unnecessary with var-prefixes:

    $color = #444
    $hash = {
      margin: 1em,
      width: 40vw
    }
    
    div
      {$hash}
      color $color
    
      h3
        color $color
        margin 0 0 $hash.margin
    

    and it should cope better with current selector vs. variable ambiguity.

  • brace-less and indented layout is by far the biggest reason for me to use Stylus - without it I might as well use SASS and take advantage of its larger development community and usage.

4reactions
janwirthcommented, Apr 5, 2016

@eddiemonge I could not agree more. I wrote a small paper comparing SASS/LESS/Stylus and Stylus had by far the most terse syntax, powerful features in general as well as transparency. If I got a kick from shitting $$$ all over my codebase I would write PHP. Supporting both indent and braces syntax severely shallows the learning curve as you are using a CSS superset with the possibility to outgrow the last millenium.

I do not understand the need for all the sigils. In fact, I think it may actually screw up many existing stylus projects. We could solve the hash-semicolons problem through prefixing hashes with a sigil to distinguish them from primitives and selectors.

If the stylus syntax is being castrated I will fork it and call it io.styl or something 🎌 as the syntax is what makes stylus so great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

STANDARDIZE function - Microsoft Support
Returns a normalized value from a distribution characterized by mean and standard_dev. Syntax. STANDARDIZE(x, mean, standard_dev). The STANDARDIZE function ...
Read more >
Excel STANDARDIZE function | Exceljet
The Excel STANDARDIZE function returns a normalized value (z-score) based on the mean and standard ... Syntax. =STANDARDIZE(x, mean, standard_dev) ...
Read more >
STANDARDIZE: Excel Formulae Explained - Causal
The syntax of STANDARDIZE in Excel is as follows: =STANDARDIZE(x,mean,standard_deviation) x is the input value to be standardized. mean is the average of ......
Read more >
How do I standardize variables in Stata? - OARC Stats - UCLA
A standardized variable (sometimes called a z-score or a standard score) is a variable that has been rescaled to have a mean of...
Read more >
STANDARDIZE - Google Docs Editors Help
Syntax. STANDARDIZE(value, mean, standard_deviation). value - The value of the random variable to normalize. mean - The mean of the distribution.
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