Rotonde / rotonde-client

Rotonde Base Client
https://client-neauoire.hashbase.io/
MIT License
227 stars 49 forks source link

Change runes definition to css classes #43

Closed afk-mario closed 6 years ago

afk-mario commented 7 years ago

Currently the runes are added by java script to the feed and portal, if it was changed to a css classes system, it would be easier to customize.

For example:

<t class="portal">
    <a href="dat://"><i class="rune-self"></i>afk_mcz</a>
</t>
<t class="portal">
    <a href="dat://"><i class="rune-both"></i>user_who_follows_you</a>
</t>
<t class="portal">
    <a href="dat://"><i class="rune-follow"></i>user_who_doesn't</a>
</t>
:root {
    --rune-self: "▲";
    --rune-both: "@";
    --rune-follow: "~";
}

.rune-self {
    content: var(--rune-self);
}

.rune-both {
    content: var(--rune-both);

}

.rune-follow {
    content: var(--rune-follow);
}

:custom-css {
    --rune-self: "▲";
    --rune-both: "◢";
    --rune-follow: "◣";
}
neauoire commented 7 years ago

Good call, I'll get on this.

0x0ade commented 7 years ago

Note that you can't set content of something directly - AFAIK you can only set the content of pseudo elements such as before and after. Setting content of the element directly didn't work in my testing.

neauoire commented 6 years ago

Implemented