Multi-line properties in the stylus for shadow shadow

How to rewrite the next line in multi-line form in the stylus, bro?

div
  box-shadow 0 0 0 black, 1 0 0, black, 0 0 1, black

Using a much larger list of properties for box-shadow, my editor will explode. I want this to be the case, but the Stylus syntax will not allow:

div
  box-shadow
    0 0 0 black,
    1 0 0 black,
    0 0 1 black

Also omitting commas does not work. This is frustrating ...

+4
source share
2 answers

I believe that I saw how the encoding was configured as follows:

div
  box-shadow:
    0 0 0 black,
    1 0 0 black,
    0 0 1 black

or try if the one above does not work

div
  box-shadow: 0 0 0 black,
              1 0 0 black,
              0 0 1 black

Hope this helps you.


Also works in the context of media queries. (real world example for sprites with retina support). Notice the (somewhat strange) indentation of the second background image.

.sprite
  background-image url('/assets/static/sprite.png')
  background-repeat no-repeat
  background-size 960px 480px;

  @media only screen and (-webkit-min-device-pixel-ratio 1.3),
    only screen and (-o-min-device-pixel-ratio 13/10),
    only screen and (min--moz-device-pixel-ratio 1.3),
    only screen and (min-device-pixel-ratio 1.3),
    only screen and (min-resolution 120dpi)
    background-image url('/assets/static/sprite_x2.png')
+4
source

.

div
  box-shadow \
    0 0 0 black \
    1 0 0 black \
    0 0 1 black
+1

Source: https://habr.com/ru/post/1529612/


All Articles