Stylus: outdated

Created on 2 Sep 2018  ·  8Comments  ·  Source: openstyles/stylus

outdated

Most helpful comment

It should be trivial to add some keydown handlers to implement the behavior of input[number], but there is no min/max/step attributes to control the increment/decrement.

Also, it won't work with the scroll wheel.

To avoid the unit, you can write something like:

/* ==UserStyle==
...
@var text my-font-size "Font size" 12
==/UserStyle== */

@-moz-document domain(example.com) {
  body {
    font-size: calc(var(--my-font-size) * 1px);
  }
}

All 8 comments

You can customize everything in Stylus editor yourself by writing a style for chrome-extension:// URL-prefix, see the examples.

Then you can easily toggle these custom styles in the popup. You can also upload your style to userstyles.org site and it'll be shown in the popup style search for other users.

You can make a customizable usercss style where users can easily choose the font size.

This is the first time someone suggested an option to change font or the font size so I think this is not really popular. We already have too many options. Those users who need it, can customize it themselves and it'll be just as convenient as a built-in option. Here's how GitHub Dark implements it:

image

@dnknn 他的意思是說,你可以把各個選項合併成同一個 Usercss 樣式檔。我有對 Usercss 寫過簡短的介紹,參考 這裡。詳細的規格文件目前只有英文版本

有疑問可以問我,我能讀繁體/簡體中文。

Usercss specification doesn't have a number input, only a text input, so we can't handle the arrow keys.

It should be trivial to add some keydown handlers to implement the behavior of input[number], but there is no min/max/step attributes to control the increment/decrement.

Also, it won't work with the scroll wheel.

To avoid the unit, you can write something like:

/* ==UserStyle==
...
@var text my-font-size "Font size" 12
==/UserStyle== */

@-moz-document domain(example.com) {
  body {
    font-size: calc(var(--my-font-size) * 1px);
  }
}

I support this. Font size option would be nice

Hi @Kein!

We've added a number and range type to UserCSS variables. These types will only work in Stylus at this time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HoLLy-HaCKeR picture HoLLy-HaCKeR  ·  74Comments

catcat520 picture catcat520  ·  26Comments

Athari picture Athari  ·  25Comments

narcolepticinsomniac picture narcolepticinsomniac  ·  27Comments

schomery picture schomery  ·  35Comments