diff --git a/extensions/tags/js/src/forum/components/TagsPage.js b/extensions/tags/js/src/forum/components/TagsPage.js index 66b6ab70b..940e2ee41 100755 --- a/extensions/tags/js/src/forum/components/TagsPage.js +++ b/extensions/tags/js/src/forum/components/TagsPage.js @@ -4,6 +4,7 @@ import Link from 'flarum/common/components/Link'; import LoadingIndicator from 'flarum/common/components/LoadingIndicator'; import listItems from 'flarum/common/helpers/listItems'; import humanTime from 'flarum/common/helpers/humanTime'; +import getContrast from 'flarum/common/utils/getContrast'; import tagIcon from '../../common/helpers/tagIcon'; import tagLabel from '../../common/helpers/tagLabel'; @@ -58,7 +59,7 @@ export default class TagsPage extends Page { const children = sortTags(tag.children() || []); return ( -
  • +
  • = 128 ? 'tag-light' : 'tag-dark')} style={{ '--tag-bg': tag.color() }}> {tag.icon() && tagIcon(tag, {}, { useColor: false })}

    {tag.name()}

    diff --git a/extensions/tags/less/forum/TagTiles.less b/extensions/tags/less/forum/TagTiles.less index 9075cc270..31192ca1b 100755 --- a/extensions/tags/less/forum/TagTiles.less +++ b/extensions/tags/less/forum/TagTiles.less @@ -63,8 +63,25 @@ color: @control-color; } &.colored { - &, a { - color: @body-bg; + &.tag-light { + &, a { + color: @text-color; + } + & when (@config-dark-mode = true) { + &, a { + color: @body-bg; + } + } + } + &.tag-dark { + &, a { + color: @body-bg; + } + & when (@config-dark-mode = true) { + &, a { + color: @text-color; + } + } } } }