ijprest / keyboard-layout-editor

Web application to enable the design & editing of keyboard layouts
http://www.keyboard-layout-editor.com/
Other
1.32k stars 246 forks source link

Suggestion: Add CSS classes to style keylabels by row #323

Open WandersFar opened 1 year ago

WandersFar commented 1 year ago

Keylabel classes are very useful. But how can you style keylabels by row?

There are no classes for row 1, row 2, row 3, etc.

And pseudo-selectors like :nth-child are evidently not supported. For example, if your keyboard was 10x3 and you wanted to select the second row, this wouldn’t work:

#keyboard-bg>.key:nth-child(n+11):nth-child(-n+20) .keylabel1

So I’m asking for some row classes, please. :)

Then we could style keylabels by row as simply as:

.row1 .keylabel1

Or whatever. Thanks for reading!