mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:04:03 +08:00
UX: category hashtag colors order fix (#22758)
* UX: revert gradient of category hashtag colours * tests
This commit is contained in:
parent
d8a87792af
commit
5a36abd073
|
@ -24,7 +24,7 @@ export default class CategoryHashtagType extends HashtagTypeBase {
|
|||
}
|
||||
|
||||
generatedCssClasses.push(`.hashtag-color--category-${category.id} {
|
||||
background: linear-gradient(90deg, ${backgroundGradient.join(", ")});
|
||||
background: linear-gradient(-90deg, ${backgroundGradient.join(", ")});
|
||||
}`);
|
||||
|
||||
return generatedCssClasses;
|
||||
|
|
|
@ -27,7 +27,7 @@ acceptance("CSS Generator", function (needs) {
|
|||
const cssTag = document.querySelector("style#hashtag-css-generator");
|
||||
assert.equal(
|
||||
cssTag.innerHTML,
|
||||
".hashtag-color--category-1 {\n background: linear-gradient(90deg, var(--category-1-color) 50%, var(--category-1-color) 50%);\n}\n.hashtag-color--category-2 {\n background: linear-gradient(90deg, var(--category-2-color) 50%, var(--category-2-color) 50%);\n}\n.hashtag-color--category-4 {\n background: linear-gradient(90deg, var(--category-4-color) 50%, var(--category-1-color) 50%);\n}"
|
||||
".hashtag-color--category-1 {\n background: linear-gradient(-90deg, var(--category-1-color) 50%, var(--category-1-color) 50%);\n}\n.hashtag-color--category-2 {\n background: linear-gradient(-90deg, var(--category-2-color) 50%, var(--category-2-color) 50%);\n}\n.hashtag-color--category-4 {\n background: linear-gradient(-90deg, var(--category-4-color) 50%, var(--category-1-color) 50%);\n}"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ acceptance("Chat | Hashtag CSS Generator", function (needs) {
|
|||
assert.equal(
|
||||
cssTag.innerHTML,
|
||||
|
||||
".hashtag-color--category-1 {\n background: linear-gradient(90deg, var(--category-1-color) 50%, var(--category-1-color) 50%);\n}\n.hashtag-color--category-2 {\n background: linear-gradient(90deg, var(--category-2-color) 50%, var(--category-2-color) 50%);\n}\n.hashtag-color--category-4 {\n background: linear-gradient(90deg, var(--category-4-color) 50%, var(--category-1-color) 50%);\n}\n.d-icon.hashtag-color--channel-44 { color: var(--category-1-color); }\n.d-icon.hashtag-color--channel-74 { color: var(--category-2-color); }\n.d-icon.hashtag-color--channel-88 { color: var(--category-4-color); }"
|
||||
".hashtag-color--category-1 {\n background: linear-gradient(-90deg, var(--category-1-color) 50%, var(--category-1-color) 50%);\n}\n.hashtag-color--category-2 {\n background: linear-gradient(-90deg, var(--category-2-color) 50%, var(--category-2-color) 50%);\n}\n.hashtag-color--category-4 {\n background: linear-gradient(-90deg, var(--category-4-color) 50%, var(--category-1-color) 50%);\n}\n.d-icon.hashtag-color--channel-44 { color: var(--category-1-color); }\n.d-icon.hashtag-color--channel-74 { color: var(--category-2-color); }\n.d-icon.hashtag-color--channel-88 { color: var(--category-4-color); }"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user