-
-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Please fill out these Check-boxes
- I checked for existing similar feature requests
- I have read the docs and checked that the feature I am requesting is not already implemented
- My feature request consists of only one feature
Is your Feature Request related to a Problem or Annoyance?
I would like to modify some styles depending on a user selected value while still having the value available for calculations. Here it would be helpfull if the suggester would set a data-attribute containing the current selection on itself, which could be use inside a css selector.
Describe the Feature you'd like
The current value of a selector should be available as for example the attribute data-selected, which would make it selectable via css.
The html would look something like this:
<div class="mb-input-wrapper my-custom-class mb-input-type-suggester" data-selected="1">
<div class="mb-suggest-input">
<div class="mb-suggest-text">
<span>1</span>
</div>
<button class="mb-button-inner mod-plain" aria-label="">
<div class="mb-icon-wrapper"></div>
</button>
</div>
</div>which would allow you to write this css selector:
.my-custom-class[data-selected="1"] {...}Alternatives
No response
Additional Context
full context of what I am working on, in case I am overlooking things:
I am trying to create a Ability-table for DnD 5e, which should display different proficiency-levels with different styling:
The first column "prof" is a INPUT[selector] which has for options 0, 0.5, 1, 2 which correspond to the for icons shown. The selected values are used to calculate the last column "bonus". Currently I can't select the styling depending on the made selection but have to hard-code a classname. I would like to change that.
