mirror of
https://github.com/flarum/core.git
synced 2025-08-16 13:24:11 +02:00
fix: TagHero contrast
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import Component from 'flarum/common/Component';
|
import Component from 'flarum/common/Component';
|
||||||
|
import isDark from 'flarum/common/utils/isDark';
|
||||||
import tagIcon from '../../common/helpers/tagIcon';
|
import tagIcon from '../../common/helpers/tagIcon';
|
||||||
|
|
||||||
export default class TagHero extends Component {
|
export default class TagHero extends Component {
|
||||||
@@ -7,7 +8,7 @@ export default class TagHero extends Component {
|
|||||||
const color = tag.color();
|
const color = tag.color();
|
||||||
|
|
||||||
return (
|
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="container">
|
||||||
<div className="containerNarrow">
|
<div className="containerNarrow">
|
||||||
<h2 className="Hero-title">
|
<h2 className="Hero-title">
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
.TagHero {
|
.TagHero {
|
||||||
&--colored {
|
&--light {
|
||||||
--hero-color: #fff;
|
--hero-color: @text-on-light;
|
||||||
|
}
|
||||||
|
&--dark {
|
||||||
|
--hero-color: @text-on-dark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user