1
0
mirror of https://github.com/flarum/core.git synced 2025-08-15 12:54:47 +02:00

fix: TagHero contrast

This commit is contained in:
protoclown
2022-09-29 16:01:01 +02:00
parent 311764ca31
commit 6903b84605
2 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import Component from 'flarum/common/Component';
import isDark from 'flarum/common/utils/isDark';
import tagIcon from '../../common/helpers/tagIcon';
export default class TagHero extends Component {
@@ -7,7 +8,7 @@ export default class TagHero extends Component {
const color = tag.color();
return (
<header className={'Hero TagHero' + (color ? ' TagHero--colored' : '')} style={color ? { '--hero-bg': color } : ''}>
<header className={'Hero TagHero' + (color ? ' TagHero--colored' : '') + (isDark(color) ? ' TagHero--dark' : ' TagHero--light')} style={color ? { '--hero-bg': color } : ''}>
<div className="container">
<div className="containerNarrow">
<h2 className="Hero-title">

View File

@@ -1,5 +1,8 @@
.TagHero {
&--colored {
--hero-color: #fff;
&--light {
--hero-color: @text-on-light;
}
&--dark {
--hero-color: @text-on-dark;
}
}