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

Find a way around icon - text misalignment issue in codex buttons #837

Merged
merged 3 commits into from
Jan 22, 2024
Merged
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
4 changes: 2 additions & 2 deletions resources/js/Pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@click="faqDialog = true"
>
<cdx-icon :icon="cdxIconInfo" />
{{ $i18n('faq-button') }}
<span class="text-with-icon-button">{{ $i18n('faq-button') }}</span>
</cdx-button>
</header>
<cdx-dialog id="faq-dialog"
Expand Down Expand Up @@ -74,7 +74,7 @@
:disabled="loading"
>
<cdx-icon :icon="cdxIconDie" />
{{ $i18n('random-mismatches') }}
<span class="text-with-icon-button">{{ $i18n('random-mismatches') }}</span>
</cdx-button>
</div>
<form id="items-form" @submit.prevent="send">
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<LanguageSelectorButton :aria-label="$i18n('toggle-language-selector-button')"
@click="onToggleLanguageSelector">
<cdx-icon :icon="cdxIconLanguage" />
{{ currentLanguageAutonym }}
<span class="text-with-icon-button">{{ currentLanguageAutonym }}</span>
</LanguageSelectorButton>
<LanguageSelector v-show="showLanguageSelector" ref="languageSelector"
@close="onCloseLanguageSelector" @select="onChangeLanguage">
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<inertia-head title="Mismatch Finder - Results" />
<cdx-button class="back-button" @click="() => $inertia.get('/', {})">
<cdx-icon :icon="cdxIconArrowPrevious" />
{{ $i18n('results-back-button') }}
<span class="text-with-icon-button">{{ $i18n('results-back-button') }}</span>
</cdx-button>
<section id="description-section">
<header class="description-header">
Expand All @@ -16,7 +16,7 @@
@click="instructionsDialog = true"
>
<cdx-icon :icon="cdxIconInfo" />
{{$i18n('results-instructions-button')}}
<span class="text-with-icon-button">{{$i18n('results-instructions-button')}}</span>
</cdx-button>
</header>

Expand Down
8 changes: 8 additions & 0 deletions resources/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,14 @@ dl.import-meta .download-csv {
// is marked as resolved.
.cdx-button {
@include ui-text-M($font-weight-bold);

.text-with-icon-button {
vertical-align: text-top;
padding-left: 5px;
.cdx-icon {
vertical-align: text-top;
}
chukarave marked this conversation as resolved.
Show resolved Hide resolved
}
}

.svg {
Expand Down