Modify nodebb-plugin-ws-dice
-
Hmm... Now that I'm thinking about it again, I think NodeBB could make it easy for a plugin to modify whole topic event styles, without waiting for browsers to implement some way to select elements by their children (
:has
is one of few useful things Safari has that other browsers haven't yet enabled by default)Currently, the event is a
<li component="topic/event" class="timeline-event" data-topic-event-id="${event.id}">
element. It has adata-topic-event-id
already, so there is precedent for adding some information about the event there, but it's not useful for styling. However, if it also had adata-topic-event-type
attribute, it'd be trivial to select that element and its children.I'll make a PR then I guess
-
@oplik0 said in Modify nodebb-plugin-ws-dice:
Hmm... Now that I'm thinking about it again, I think NodeBB could make it easy for a plugin to modify whole topic event styles, without waiting for browsers to implement some way to select elements by their children (:has is one of few useful things Safari has that other browsers haven't yet enabled by default)
Currently, the event is a <li component="topic/event" class="timeline-event" data-topic-event-id="${event.id}"> element. It has a data-topic-event-id already, so there is precedent for adding some information about the event there, but it's not useful for styling. However, if it also had a data-topic-event-type attribute, it'd be trivial to select that element and its children.
I'll make a PR then I guessHello @oplik0
Glad to see you here. Your plugin is already great and it deserves to be in the official nodeBB community
-
@DownPW So now that it's merged into develop I'll wait until next feature release (v2.5.0) and change the styling in the plugin
-
@oplik0 said in Modify nodebb-plugin-ws-dice:
@DownPW So now that it's merged into develop I'll wait until next feature release (v2.5.0) and change the styling in the plugin
Wouhhooooooo NodeBB V 2.5.0 is here
Can not wait to see the result !!!
-
@DownPW I'll hopefully work on this tomorrow then
-
-
-
@oplik0 said in Modify nodebb-plugin-ws-dice:
@DownPW v2.4.0 inlines the text now, making it work fine with multiple lines:
Wooooo Very very good job @oplik0
@oplik0 said in Modify nodebb-plugin-ws-dice:
Unfortunately I'm not sure how to go about putting the icon in the middle of the event, so it's just aligned to the first line instead.
I tried some css without success.
Maybe @phenomlab knows how to do this ?It's a detail because it's already great and much better as a result!!