#2950·stylus

An exception occurs when using both tabs (\t) and spaces for indentation.

Author: mackwang112Created Oct 24, 2025Updated Oct 24, 2025

To reproduce:

styl
.e-common-title
	font-size 30px // Here uses \t indentation
.e-font-size2
    font-size 24px // Here uses 4 spaces for indentation

Current behavior:

When the first selector uses \t indentation, and there are other indentation methods in the file (such as 4 or 2 spaces), it will cause stylus compilation exceptions.

ParseError: a.styl:7:19
   3| 
   4| .e-common-title
   5|   font-size 30px
   6| .e-font-size2
   7|     font-size 24px
------------------------^

expected "indent", got "eos"

Expected behavior:

I hope it can be compiled normally, and process the styl above into the following content.

.e-common-title {
  font-size 30px
}
.e-font-size2 {
  font-size 24px
}

Environment information:

  • stylus version: 0.64.0
  • nodejs version: 20.11.0