Skip to content

Commit

Permalink
Fix alt text contrast in code boxes (#2089)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Aug 2, 2023
1 parent dca01e6 commit c36cb9d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/components/repo/pipeline/PipelineLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<a
:id="`L${line.number}`"
:href="`#L${line.number}`"
class="text-wp-text-alt-100 whitespace-nowrap select-none text-right pl-2 pr-6"
class="text-wp-code-text-alt-100 whitespace-nowrap select-none text-right pl-2 pr-6"
:class="{
'bg-opacity-40 dark:bg-opacity-50 bg-red-600 dark:bg-red-800': line.type === 'error',
'bg-opacity-40 dark:bg-opacity-50 bg-yellow-600 dark:bg-yellow-800': line.type === 'warning',
Expand All @@ -61,7 +61,7 @@
/>
<!-- eslint-enable vue/no-v-html -->
<span
class="text-wp-text-alt-100 whitespace-nowrap select-none text-right pr-1"
class="text-wp-code-text-alt-100 whitespace-nowrap select-none text-right pr-1"
:class="{
'bg-opacity-40 dark:bg-opacity-50 bg-red-600 dark:bg-red-800': line.type === 'error',
'bg-opacity-40 dark:bg-opacity-50 bg-yellow-600 dark:bg-yellow-800': line.type === 'warning',
Expand All @@ -81,7 +81,7 @@

<div
v-if="step?.end_time !== undefined"
class="flex items-center w-full bg-wp-code-100 text-md text-wp-text-alt-100 p-4 font-bold"
class="flex items-center w-full bg-wp-code-100 text-md text-wp-code-text-alt-100 p-4 font-bold"
>
<PipelineStatusIcon :status="step.state" class="!h-4 !w-4" />
<span class="px-2">{{ $t('repo.pipeline.exit_code', { exitCode: step.exit_code }) }}</span>
Expand Down
2 changes: 2 additions & 0 deletions web/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
--wp-code-100: theme('colors.int-wp-secondary.300');
--wp-code-200: theme('colors.int-wp-secondary.600');
--wp-code-text-100: theme('colors.gray.200');
--wp-code-text-alt-100: theme('colors.gray.300');

--wp-link-100: theme('colors.blue.600');
--wp-link-200: theme('colors.blue.700');
Expand Down Expand Up @@ -90,6 +91,7 @@
--wp-code-100: theme('colors.int-wp-secondary.700');
--wp-code-200: theme('colors.int-wp-secondary.800');
--wp-code-text-100: theme('colors.gray.300');
--wp-code-text-alt-100: theme('colors.gray.400');

--wp-link-100: theme('colors.blue.400');
--wp-link-200: theme('colors.blue.500');
Expand Down
3 changes: 3 additions & 0 deletions web/windi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ export default defineConfig({
'wp-code-text': {
100: 'var(--wp-code-text-100)',
},
'wp-code-text-alt': {
100: 'var(--wp-code-text-alt-100)',
},

'wp-link': {
100: 'var(--wp-link-100)',
Expand Down

0 comments on commit c36cb9d

Please sign in to comment.