LoginSignup
0

More than 5 years have passed since last update.

CSSカスタムプロパティ(変数)などをstylusで使う

Posted at

hsl()とかもそうですが、
literal CSS 頼るしかなさそう。

css
@css {
    .test {
        --hue: 50;
        background: hsl(var(--hue), 100%, 50%);  
    }
}

.test
    width 100px
    height 100px

See the Pen CSS Custom Properties on Stylus by pokkur (@pokkur) on CodePen.

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0