-
-
Notifications
You must be signed in to change notification settings - Fork 872
fix(tags): tag text color contrast #3653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
806e0ad
add yiq calculator util
ornanovitch 8221242
use the new contast util to differentiate light/dark tags
ornanovitch 2119779
fix: invert logic
ornanovitch 9bee208
feat: add tag-dark and tag-light less config
ornanovitch 48b3c07
fix: convert 3 chars hex to 6 chars hex
ornanovitch 733eda0
Merge branch 'contrast-util' into tag-contrast
ornanovitch abf7bf2
fix: rename import
ornanovitch bd0e663
fix: clarify util name
ornanovitch d3506ef
Merge branch 'contrast-util' into tag-contrast
ornanovitch bf53cda
fix: rename function
ornanovitch 3de6afa
fix: invert less variables when dark mode is enabled
ornanovitch acae7f7
fix: TagTiles contrast
ornanovitch 948dd34
refactor: simplify logic with a unique variable
ornanovitch 8a62250
refactor: simplify logic with a unique variable
ornanovitch 0c888f6
feat: add text color variables not depending on the dark/light mode
ornanovitch 6596ea9
Merge branch 'contrast-util' into tag-contrast
ornanovitch 04e2555
refactor: use isDark rather than getContrast
ornanovitch 928a151
refactor: change getContrast to isDark with for a more direct approach
ornanovitch ebcad43
fix: adjust snippet description
ornanovitch 99b5036
refactor: change getContrast to isDark with for a more direct approach
ornanovitch ad06247
fix: adjust snippet description
ornanovitch 311764c
Merge branch 'contrast-util' into tag-contrast
ornanovitch 6903b84
fix: TagHero contrast
ornanovitch bb0f3ea
fix: DiscussionHero contrast
ornanovitch 76b625a
fix: newDiscussion contrast
ornanovitch f35ad09
fix(newDiscussion): restore less rule when tag is not colored
ornanovitch b22515f
fix: TagTiles description
ornanovitch 8e62e24
fix: TagTiles last posted
ornanovitch 4966bde
chore: change `var` to `let`
davwheat d67b2ec
Merge branch 'contrast-util' into tag-contrast
ornanovitch e4cb2c9
refactor: keep it for backwards compatibility
ornanovitch 1898108
refactor: keep it for backwards compatibility
ornanovitch 6753dfc
Apply suggestions from code review
ornanovitch c7f0d14
Resolved merge conflict
ornanovitch 66db7f1
fix: missed this when I was resolving
ornanovitch 542d964
fix: remove dist files from pull request
ornanovitch c97ab15
Revert "Resolved merge conflict"
ornanovitch 27a6503
fix: missed this when I was resolving
ornanovitch 5d87fa3
fix
ornanovitch f802034
Merge branch 'main' into tag-contrast
ornanovitch ca01b4c
Update isDark.ts
ornanovitch c930f1a
Merge branch 'main' into tag-contrast
SychO9 18557b3
chore: flexible contrast color fixing
SychO9 b6009a2
refactor(isDark): clarify the doc block
ornanovitch d82b959
fix(isDark): increase the yiq threshold
ornanovitch ad5ac9d
typo
ornanovitch 1cafcfe
fix: preserve design coloring through light and dark modes
SychO9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| .TagHero { | ||
| &--colored { | ||
| --hero-color: #fff; | ||
| --hero-color: var(--body-bg); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import isDark from '../utils/isDark'; | ||
|
|
||
| export default function textContrastClass(hexcolor: string): string { | ||
| return isDark(hexcolor) ? 'text-contrast--light' : 'text-contrast--dark'; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.