Skip to content
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

Move color issues to main section #223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/lib/components/ratio/ColorIssues.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@

import ExternalLink from '$lib/components/util/ExternalLink.svelte';

interface Props {
pass: boolean;
}

let { pass }: Props = $props();

let startOpen = $state(false);
onMount(() => {
startOpen = window.matchMedia('(min-width: 80em)').matches;
});
</script>

<details class="known-issues" open={startOpen} data-pass={pass}>
<details class="known-issues" open={startOpen}>
<summary>Known Color Issues</summary>
<dl class="issues-list">
<dt>Gamut Mapping Implementation</dt>
Expand Down
2 changes: 0 additions & 2 deletions src/lib/components/ratio/index.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import { contrast } from 'colorjs.io/fn';

import ColorIssues from '$lib/components/ratio/ColorIssues.svelte';
import Result from '$lib/components/ratio/Result.svelte';
import ExternalLink from '$lib/components/util/ExternalLink.svelte';
import { RATIOS } from '$lib/constants';
Expand Down Expand Up @@ -66,7 +65,6 @@
<dd>Bold Weight</dd>
</dl>
</div>
<ColorIssues {pass} />
</aside>

<style lang="scss">
Expand Down
2 changes: 2 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import Header from '$lib/components/Header.svelte';
import Ratio from '$lib/components/ratio/index.svelte';
import { bg, fg, format } from '$lib/stores';
import ColorIssues from '$src/lib/components/ratio/ColorIssues.svelte';
import { hashToStoreValues, storeValuesToHash } from '$src/lib/utils';

let bg_fallback = $derived(display($bg));
Expand Down Expand Up @@ -49,6 +50,7 @@
<Ratio />
<main data-layout="main">
<Colors />
<ColorIssues />
</main>
<Footer />
</div>
9 changes: 5 additions & 4 deletions src/sass/patterns/_disclosure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
// ------------------------------

details {
--link: var(--fgcolor);
--link-focus: var(--fgcolor);
// --link: var(--fgcolor);
// --link-focus: var(--fgcolor);

background-color: var(--status-result-bg, var(--bgcolor));
// background-color: var(--status-result-bg, var(--bgcolor));
border-radius: var(--border-radius);
color: var(--status-result-fg, var(--fgcolor));

// color: var(--status-result-fg, var(--fgcolor));
}

summary {
Expand Down
Loading