Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Add prettier-plugin-tailwindcss and formatted tailwind classes order using it. (#1577)

Sahilf3f03b403903
diff --git a/package.json b/package.json
index 062c2e272..9e156b478 100644
--- a/package.json
+++ b/package.json
@@ -147,6 +147,7 @@
"pinia": "^2.0.11",
"postcss": "^8.4.12",
"prettier": "^2.2.1",
+ "prettier-plugin-tailwindcss": "^0.1.12",
"rimraf": "^3.0.2",
"tailwind-config-viewer": "^1.6.3",
"tailwindcss": "^3.0.23",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4c2908a68..31d873109 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -80,6 +80,7 @@ specifiers:
postcss: ^8.4.12
postcss-focus-visible: ^6.0.4
prettier: ^2.2.1
+ prettier-plugin-tailwindcss: ^0.1.12
prom-client: ^14.0.1
reakit-utils: ^0.15.2
rfdc: ^1.3.0
@@ -191,6 +192,7 @@ devDependencies:
npm-run-all: 4.1.5
postcss: 8.4.12
prettier: 2.6.0
+ prettier-plugin-tailwindcss: [email protected]
rimraf: 3.0.2
tailwind-config-viewer: [email protected]
tailwindcss: 3.0.23_z4yclaatiobtrs75ftybxflkiu
@@ -15932,6 +15934,15 @@ packages:
fast-diff: 1.2.0
dev: true
+ /prettier-plugin-tailwindcss/[email protected]:
+ resolution: {integrity: sha512-pEZ6tppwknCeq3ObR9g8t61AhWtVRRR3I0EQNeiRrrJ3D42FJGeUDxiFc/LJRYEeAx5JOxagsF0MICwuWOJa+w==}
+ engines: {node: '>=12.17.0'}
+ peerDependencies:
+ prettier: '>=2.2.0'
+ dependencies:
+ prettier: 2.6.0
+ dev: true
+
/prettier/2.3.0:
resolution: {integrity: sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==}
engines: {node: '>=10.13.0'}
diff --git a/prettier.config.js b/prettier.config.js
index 3b7bc476b..359e05627 100644
--- a/prettier.config.js
+++ b/prettier.config.js
@@ -12,4 +12,6 @@ module.exports = {
},
},
],
+ plugins: [require('prettier-plugin-tailwindcss')],
+ tailwindConfig: 'tailwind.config.js',
}
diff --git a/src/components/ExtensionBrowsers.vue b/src/components/ExtensionBrowsers.vue
index 5a31cea82..a61bb08f1 100644
--- a/src/components/ExtensionBrowsers.vue
+++ b/src/components/ExtensionBrowsers.vue
@@ -1,5 +1,5 @@
<template>
- <ul class="flex flex-wrap justify-center items-center">
+ <ul class="flex flex-wrap items-center justify-center">
<li v-for="(browser, key) in browsers" :key="key">
<VButton
as="VLink"
@@ -9,7 +9,7 @@
>
{{ $t(`browsers.${key}`) }}
<img
- class="ms-2 w-6 h-6"
+ class="h-6 w-6 ms-2"
:src="browser.logo"
:alt="$t(`browsers.${key}`).toString()"
/>
diff --git a/src/components/TableSortIcon.vue b/src/components/TableSortIcon.vue
index 2cb682dc2..cce5dbb74 100644
--- a/src/components/TableSortIcon.vue
+++ b/src/components/TableSortIcon.vue
@@ -6,7 +6,7 @@
viewBox="0 0 12 6"
fill="none"
xmlns="http://www.w3.org/2000/svg"
- class="stroke-current mb-2"
+ class="mb-2 stroke-current"
>
<path d="M11 5L6 0.999999L1 5" stroke-width="1.5" />
</svg>
diff --git a/src/components/VAllResultsGrid/VAllResultsGrid.vue b/src/components/VAllResultsGrid/VAllResultsGrid.vue
index d02ffaecd..9213f25d5 100644
--- a/src/components/VAllResultsGrid/VAllResultsGrid.vue
+++ b/src/components/VAllResultsGrid/VAllResultsGrid.vue
@@ -2,7 +2,7 @@
<div>
<div
v-if="!noResults"
- class="results-grid grid grid-cols-2 lg:grid-cols-5 2xl:grid-cols-6 gap-4 mb-4"
+ class="results-grid mb-4 grid grid-cols-2 gap-4 lg:grid-cols-5 2xl:grid-cols-6"
>
<VContentLink
v-for="([mediaType, count], i) in resultCounts"
@@ -20,7 +20,7 @@
/>
<div
v-else
- class="results-grid grid grid-cols-2 lg:grid-cols-5 2xl:grid-cols-6 gap-4"
+ class="results-grid grid grid-cols-2 gap-4 lg:grid-cols-5 2xl:grid-cols-6"
>
<div v-for="item in allMedia" :key="item.id">
<VImageCellSquare
diff --git a/src/components/VAllResultsGrid/VImageCellSquare.vue b/src/components/VAllResultsGrid/VImageCellSquare.vue
index f85da78f9..7354e5535 100644
--- a/src/components/VAllResultsGrid/VImageCellSquare.vue
+++ b/src/components/VAllResultsGrid/VImageCellSquare.vue
@@ -3,17 +3,17 @@
itemprop="contentUrl"
:title="image.title"
:href="'/image/' + image.id"
- class="group block focus:ring-[3px] focus:ring-pink focus:ring-offset-[3px] focus:outline-none rounded-sm"
+ class="group block rounded-sm focus:outline-none focus:ring-[3px] focus:ring-pink focus:ring-offset-[3px]"
>
<figure
itemprop="image"
itemscope
itemtype="https://schema.org/ImageObject"
- class="aspect-square relative rounded-sm"
+ class="relative aspect-square rounded-sm"
>
<img
ref="img"
- class="w-full h-full object-cover rounded-sm bg-dark-charcoal-10 text-dark-charcoal-10"
+ class="h-full w-full rounded-sm bg-dark-charcoal-10 object-cover text-dark-charcoal-10"
loading="lazy"
:alt="image.title"
:src="getImageUrl()"
@@ -23,7 +23,7 @@
@error="onImageLoadError($event)"
/>
<figcaption
- class="absolute left-0 bottom-0 invisible group-hover:visible group-focus:visible bg-white p-1 text-dark-charcoal"
+ class="invisible absolute left-0 bottom-0 bg-white p-1 text-dark-charcoal group-hover:visible group-focus:visible"
>
<span class="sr-only">{{ image.title }}</span>
<VLicense :license="image.license" :hide-name="true" />
diff --git a/src/components/VAudioDetails/VAudioDetails.vue b/src/components/VAudioDetails/VAudioDetails.vue
index 35598cdbf..806569862 100644
--- a/src/components/VAudioDetails/VAudioDetails.vue
+++ b/src/components/VAudioDetails/VAudioDetails.vue
@@ -1,17 +1,17 @@
<template>
<section class="audio-info">
- <header class="flex flex-row justify-between items-center mb-6">
+ <header class="mb-6 flex flex-row items-center justify-between">
<h4 class="text-2xl lg:text-3xl">
{{ $t('audio-details.information') }}
</h4>
<VContentReportPopover :media="audio" />
</header>
- <div class="flex flex-col md:flex-row items-start gap-6">
- <div class="w-[75px] h-[75px] lg:w-30 lg:h-30 rounded-sm overflow-hidden">
+ <div class="flex flex-col items-start gap-6 md:flex-row">
+ <div class="h-[75px] w-[75px] overflow-hidden rounded-sm lg:h-30 lg:w-30">
<VAudioThumbnail :audio="audio" />
</div>
- <div class="flex flex-col gap-4 lg:gap-6 flex-grow">
+ <div class="flex flex-grow flex-col gap-4 lg:gap-6">
<p v-if="audio.description" class="mb-6">{{ audio.description }}</p>
<ul class="flex flex-wrap gap-2">
<VMediaTag
diff --git a/src/components/VAudioDetails/VRelatedAudio.vue b/src/components/VAudioDetails/VRelatedAudio.vue
index 400b756fa..75d5170f9 100644
--- a/src/components/VAudioDetails/VRelatedAudio.vue
+++ b/src/components/VAudioDetails/VRelatedAudio.vue
@@ -1,9 +1,9 @@
<template>
<aside :aria-label="$t('audio-details.related-audios')">
- <h4 class="text-2xl lg:text-3xl mb-6">
+ <h4 class="mb-6 text-2xl lg:text-3xl">
{{ $t('audio-details.related-audios') }}
</h4>
- <div v-if="!fetchState.isError" class="flex flex-col gap-8 lg:gap-12 mb-12">
+ <div v-if="!fetchState.isError" class="mb-12 flex flex-col gap-8 lg:gap-12">
<VAudioTrack
v-for="audio in media"
:key="audio.id"
diff --git a/src/components/VAudioThumbnail/VAudioThumbnail.vue b/src/components/VAudioThumbnail/VAudioThumbnail.vue
index fbe4157bd..3d6f2fba0 100644
--- a/src/components/VAudioThumbnail/VAudioThumbnail.vue
+++ b/src/components/VAudioThumbnail/VAudioThumbnail.vue
@@ -1,6 +1,6 @@
<template>
<!-- Should be wrapped by a fixed-width parent -->
- <div class="relative h-0 w-full pt-full bg-yellow" :title="helpText">
+ <div class="relative h-0 w-full bg-yellow pt-full" :title="helpText">
<!-- Programmatic thumbnail -->
<svg class="absolute inset-0" :viewBox="`0 0 ${canvasSize} ${canvasSize}`">
<template v-for="i in dotCount">
@@ -18,7 +18,7 @@
<div v-show="audio.thumbnail && isOk" class="thumbnail absolute inset-0">
<img
ref="imgEl"
- class="h-full w-full object-cover object-center overflow-clip"
+ class="h-full w-full overflow-clip object-cover object-center"
:src="audio.thumbnail"
:alt="helpText"
@load="handleLoad"
diff --git a/src/components/VAudioTrack/VPlayPause.vue b/src/components/VAudioTrack/VPlayPause.vue
index 00e2d4b8c..c953a1efe 100644
--- a/src/components/VAudioTrack/VPlayPause.vue
+++ b/src/components/VAudioTrack/VPlayPause.vue
@@ -2,7 +2,7 @@
<VIconButton
v-bind="$attrs"
:tabindex="layout === 'box' ? -1 : 0"
- class="play-pause flex-shrink-0 bg-dark-charcoal border-dark-charcoal text-white disabled:opacity-70 focus-visible:border-pink focus-visible:outline-none focus-visible:shadow-ring"
+ class="play-pause flex-shrink-0 border-dark-charcoal bg-dark-charcoal text-white focus-visible:border-pink focus-visible:shadow-ring focus-visible:outline-none disabled:opacity-70"
:icon-props="icon === undefined ? undefined : { iconPath: icon }"
:aria-label="$t(label)"
:button-props="buttonProps"
diff --git a/src/components/VAudioTrack/VWaveform.vue b/src/components/VAudioTrack/VWaveform.vue
index 38630c3f8..aefd8c289 100644
--- a/src/components/VAudioTrack/VWaveform.vue
+++ b/src/components/VAudioTrack/VWaveform.vue
@@ -1,7 +1,7 @@
<template>
<div
ref="el"
- class="waveform group relative bg-background-var focus:outline-none overflow-hidden"
+ class="waveform bg-background-var group relative overflow-hidden focus:outline-none"
:style="heightProperties"
:tabIndex="isInteractive ? 0 : -1"
:role="isInteractive ? 'slider' : undefined"
@@ -17,7 +17,7 @@
<!-- Focus ring -->
<svg
v-if="isInteractive"
- class="hidden group-focus:block absolute inset-0 w-full h-full z-20 shadow-ring-1"
+ class="shadow-ring-1 absolute inset-0 z-20 hidden h-full w-full group-focus:block"
xmlns="http://www.w3.org/2000/svg"
:viewBox="viewBox"
preserveAspectRatio="none"
@@ -49,7 +49,7 @@
<!-- Progress bar -->
<svg
- class="absolute inset-0 w-full h-full"
+ class="absolute inset-0 h-full w-full"
xmlns="http://www.w3.org/2000/svg"
:viewBox="viewBox"
preserveAspectRatio="none"
@@ -75,7 +75,7 @@
<rect
v-for="(peak, index) in normalizedPeaks"
:key="index"
- class="transform origin-bottom transition-transform duration-500"
+ class="origin-bottom transform transition-transform duration-500"
:class="[
isReady ? 'scale-y-100' : 'scale-y-0',
index <= seekIndex ? 'fill-black' : 'fill-dark-charcoal-20-alpha',
@@ -90,7 +90,7 @@
<!-- Focus bar -->
<div
v-if="isInteractive"
- class="focus-indicator hidden absolute z-20 top-0 flex flex-col items-center justify-between bg-black h-full"
+ class="focus-indicator absolute top-0 z-20 flex hidden h-full flex-col items-center justify-between bg-black"
:style="{ width: `${barWidth}px`, left: `${progressBarWidth}px` }"
>
<div
@@ -99,7 +99,7 @@
bottom: ['translate-y-1/2'],
}"
:key="name"
- class="rounded-full bg-black h-2 w-2 transform"
+ class="h-2 w-2 transform rounded-full bg-black"
:class="classes"
>
&nbsp;
@@ -133,7 +133,7 @@
</template>
<div
v-if="showDuration"
- class="duration timestamp right-0 bg-background-var"
+ class="duration timestamp bg-background-var right-0"
>
{{ timeFmt(duration) }}
</div>
@@ -142,7 +142,7 @@
<!-- Message overlay -->
<div
v-else
- class="absolute inset-0 flex items-center justify-center loading font-bold text-xs"
+ class="loading absolute inset-0 flex items-center justify-center text-xs font-bold"
>
{{ message }}
</div>
@@ -150,7 +150,7 @@
<!-- Seek disabled message overlay -->
<div
v-if="seekDisabledNotice"
- class="invisible group-hover:visible group-focus:visible absolute w-full inset-0 flex items-center justify-center font-bold text-xsm bg-yellow/75 z-40"
+ class="text-xsm invisible absolute inset-0 z-40 flex w-full items-center justify-center bg-yellow/75 font-bold group-hover:visible group-focus:visible"
>
{{ seekDisabledNotice }}
</div>
@@ -656,7 +656,7 @@ export default defineComponent({
}
.timestamp {
- @apply absolute font-bold text-xs px-1 pointer-events-none;
+ @apply pointer-events-none absolute px-1 text-xs font-bold;
top: calc(var(--unusable-height) + theme('spacing[0.5]'));
}
diff --git a/src/components/VAudioTrack/layouts/VBoxLayout.vue b/src/components/VAudioTrack/layouts/VBoxLayout.vue
index 349182369..54f95a031 100644
--- a/src/components/VAudioTrack/layouts/VBoxLayout.vue
+++ b/src/components/VAudioTrack/layouts/VBoxLayout.vue
@@ -2,12 +2,12 @@
<div :style="{ width }">
<!-- The width is determined by the parent element if the 'size' property is not specified. -->
<div
- class="box-track group relative bg-yellow h-0 w-full pt-full rounded-sm text-dark-blue"
+ class="box-track group relative h-0 w-full rounded-sm bg-yellow pt-full text-dark-blue"
>
<div class="absolute inset-0 flex flex-col">
- <div class="info flex-grow flex flex-col justify-between p-4">
+ <div class="info flex flex-grow flex-col justify-between p-4">
<h2
- class="font-heading font-semibold leading-snug line-clamp-3 text-base"
+ class="font-heading text-base font-semibold leading-snug line-clamp-3"
>
{{ audio.title }}
</h2>
@@ -23,7 +23,7 @@
</div>
</div>
- <div class="hidden player md:flex flex-row">
+ <div class="player hidden flex-row md:flex">
<slot name="play-pause" size="small" layout="box" />
<slot name="controller" :features="[]" />
</div>
@@ -90,7 +90,7 @@ export default defineComponent({
}
.box-track .play-pause {
- @apply text-dark-charcoal bg-yellow border-yellow focus:border-pink;
+ @apply border-yellow bg-yellow text-dark-charcoal focus:border-pink;
}
.box-track .waveform {
diff --git a/src/components/VAudioTrack/layouts/VFullLayout.vue b/src/components/VAudioTrack/layouts/VFullLayout.vue
index 64be84c93..812df991f 100644
--- a/src/components/VAudioTrack/layouts/VFullLayout.vue
+++ b/src/components/VAudioTrack/layouts/VFullLayout.vue
@@ -1,14 +1,14 @@
<template>
<div class="full-track w-full">
- <div class="bg-dark-charcoal-06 relative">
+ <div class="relative bg-dark-charcoal-06">
<span
v-if="currentTime > 0"
- class="pointer-events-none absolute h-full hidden md:block w-4 lg:w-10 left-0 bg-yellow"
+ class="pointer-events-none absolute left-0 hidden h-full w-4 bg-yellow md:block lg:w-10"
aria-hidden
/>
<span
v-if="status === 'played'"
- class="pointer-events-none absolute h-full hidden md:block w-4 lg:w-10 right-0 bg-yellow"
+ class="pointer-events-none absolute right-0 hidden h-full w-4 bg-yellow md:block lg:w-10"
aria-hidden
/>
<div class="md:mx-4 lg:mx-10">
@@ -16,25 +16,25 @@
</div>
</div>
<div
- class="flex flex-row flex-wrap lg:flex-nowrap items-top px-6 lg:max-w-5xl mx-auto gap-6 mt-6"
+ class="items-top mx-auto mt-6 flex flex-row flex-wrap gap-6 px-6 lg:max-w-5xl lg:flex-nowrap"
>
<slot name="play-pause" :size="isSmall ? 'small' : 'medium'" />
<div
- class="audio-info order-2 lg:order-1 w-full lg:w-auto flex flex-col justify-center"
+ class="audio-info order-2 flex w-full flex-col justify-center lg:order-1 lg:w-auto"
>
<h1
- class="text-base lg:text-3xl font-heading font-semibold lg:line-clamp-2 leading-[1.3]"
+ class="font-heading text-base font-semibold leading-[1.3] lg:text-3xl lg:line-clamp-2"
>
{{ audio.title }}
</h1>
<div
- class="subtitle mt-1 flex flex-col lg:flex-row lg:items-center gap-2 text-base leading-[1.3]"
+ class="subtitle mt-1 flex flex-col gap-2 text-base leading-[1.3] lg:flex-row lg:items-center"
>
<i18n as="span" path="audio-track.creator" class="font-semibold">
<template #creator>
<VLink
- class="p-px rounded-sm focus:outline-none focus:ring focus:ring-pink"
+ class="rounded-sm p-px focus:outline-none focus:ring focus:ring-pink"
:href="audio.creator_url"
>
{{ audio.creator }}
@@ -42,7 +42,7 @@
</template>
</i18n>
- <span class="hidden lg:block text-dark-charcoal-70">{{
+ <span class="hidden text-dark-charcoal-70 lg:block">{{
$t('interpunct')
}}</span>
@@ -54,7 +54,7 @@
as="VLink"
:href="audio.foreign_landing_url"
:size="isSmall ? 'small' : 'medium'"
- class="ms-auto order-1 lg:order-2 text-sr lg:text-2xl font-semibold"
+ class="order-1 text-sr font-semibold ms-auto lg:order-2 lg:text-2xl"
>
{{ $t('download-button.download') }}
</VButton>
diff --git a/src/components/VAudioTrack/layouts/VGlobalLayout.vue b/src/components/VAudioTrack/layouts/VGlobalLayout.vue
index 7c631bcc1..c592c6a49 100644
--- a/src/components/VAudioTrack/layouts/VGlobalLayout.vue
+++ b/src/components/VAudioTrack/layouts/VGlobalLayout.vue
@@ -1,5 +1,5 @@
<template>
- <div class="global-track flex flex-row w-full">
+ <div class="global-track flex w-full flex-row">
<div class="flex-shrink-0">
<VAudioThumbnail :audio="audio" />
<slot name="play-pause" :size="size" :layout="layout" />
@@ -8,7 +8,7 @@
<div class="relative flex-grow">
<VLink
:href="`/audio/${audio.id}`"
- class="absolute inset-x-0 z-10 top-[10.5px] px-4 flex flex-row items-center justify-between line-clamp-2 pe-12 text-sr font-semibold text-dark-charcoal hover-underline"
+ class="hover-underline absolute inset-x-0 top-[10.5px] z-10 flex flex-row items-center justify-between px-4 text-sr font-semibold text-dark-charcoal pe-12 line-clamp-2"
>
{{ audio.title }}
</VLink>
diff --git a/src/components/VAudioTrack/layouts/VRowLayout.vue b/src/components/VAudioTrack/layouts/VRowLayout.vue
index d512ef555..ea777ad78 100644
--- a/src/components/VAudioTrack/layouts/VRowLayout.vue
+++ b/src/components/VAudioTrack/layouts/VRowLayout.vue
@@ -4,11 +4,11 @@
:class="[`size-${size}`, { 'items-start': isSmall }]"
>
<div
- class="relative flex-shrink-0 rounded-sm overflow-hidden"
+ class="relative flex-shrink-0 overflow-hidden rounded-sm"
:class="isLarge ? 'w-30 me-6' : 'w-20 me-4'"
>
<VAudioThumbnail :audio="audio" />
- <div v-show="isSmall" class="absolute bottom-0 rtl:left-0 ltr:right-0">
+ <div v-show="isSmall" class="absolute bottom-0 ltr:right-0 rtl:left-0">
<slot name="play-pause" size="tiny" layout="row" />
</div>
</div>
@@ -23,7 +23,7 @@
<div class="flex-shrink-0" :class="{ 'w-70': isMedium }">
<VLink
:href="`/audio/${audio.id}`"
- class="block font-heading font-semibold line-clamp-2 md:line-clamp-1 text-dark-charcoal hover:text-dark-charcoal p-px rounded-sm focus:outline-none focus:ring focus:ring-pink"
+ class="block rounded-sm p-px font-heading font-semibold text-dark-charcoal line-clamp-2 hover:text-dark-charcoal focus:outline-none focus:ring focus:ring-pink md:line-clamp-1"
:class="{
'text-2xl': isMedium || isLarge,
'leading-snug': isSmall,
@@ -32,7 +32,7 @@
>
<div
- class="flex text-dark-charcoal-70 mt-2"
+ class="mt-2 flex text-dark-charcoal-70"
:class="{
'text-sr': isSmall,
'leading-snug': isMedium || isLarge,
@@ -49,7 +49,7 @@
<div class="part-b inline-flex flex-row items-center">
<span v-show="isSmall">
<span
- class="inline-block text-dark-charcoal font-semibold bg-dark-charcoal-06 p-1 rounded-sm"
+ class="inline-block rounded-sm bg-dark-charcoal-06 p-1 font-semibold text-dark-charcoal"
>{{ timeFmt(audio.duration || 0) }}</span
><span class="mx-2">{{ $t('interpunct') }}</span>
</span>
@@ -167,7 +167,7 @@ export default defineComponent({
<style>
.row-track .play-pause {
- @apply rounded-ts-sm rounded-bs-sm flex-shrink-0;
+ @apply flex-shrink-0 rounded-ts-sm rounded-bs-sm;
}
.row-track .waveform {
diff --git a/src/components/VBackToSearchResultsLink.vue b/src/components/VBackToSearchResultsLink.vue
index 7d5b4333d..28ada6f56 100644
--- a/src/components/VBackToSearchResultsLink.vue
+++ b/src/components/VBackToSearchResultsLink.vue
@@ -1,7 +1,7 @@
<template>
<!-- @todo: Separate the absolute container from the link itself. -->
<VLink
- class="px-2 py-3 md:px-6 md:pt-4 md:pb-2 flex flex-row items-center font-semibold text-dark-charcoal text-xs md:text-sr"
+ class="flex flex-row items-center px-2 py-3 text-xs font-semibold text-dark-charcoal md:px-6 md:pt-4 md:pb-2 md:text-sr"
:href="path"
>
<VIcon :icon-path="chevronIcon" class="-ms-2" />
diff --git a/src/components/VButton.vue b/src/components/VButton.vue
index 570237463..b859c7094 100644
--- a/src/components/VButton.vue
+++ b/src/components/VButton.vue
@@ -2,7 +2,7 @@
<Component
:is="as"
:type="typeRef"
- class="flex items-center rounded-sm justify-center transition-shadow duration-100 ease-linear disabled:opacity-70 no-underline appearance-none ring-offset-1 focus:outline-none"
+ class="flex appearance-none items-center justify-center rounded-sm no-underline ring-offset-1 transition-shadow duration-100 ease-linear focus:outline-none disabled:opacity-70"
:class="[
$style.button,
$style[variant],
@@ -291,34 +291,34 @@ a.button {
}
.secondary {
- @apply bg-dark-charcoal text-white font-bold hover:bg-dark-charcoal-80 hover:text-white;
+ @apply bg-dark-charcoal font-bold text-white hover:bg-dark-charcoal-80 hover:text-white;
}
.secondary-pressed {
- @apply bg-dark-charcoal-80 border border-tx hover:border-tx;
+ @apply border border-tx bg-dark-charcoal-80 hover:border-tx;
}
.tertiary {
- @apply bg-white text-dark-charcoal border border-dark-charcoal-20 focus-visible:border-tx ring-offset-0;
+ @apply border border-dark-charcoal-20 bg-white text-dark-charcoal ring-offset-0 focus-visible:border-tx;
}
.tertiary[disabled='disabled'],
.tertiary[aria-disabled='true'],
.action-menu[disabled='disabled'],
.action-menu[aria-disabled='true'] {
- @apply bg-dark-charcoal-10 border-dark-charcoal-10;
+ @apply border-dark-charcoal-10 bg-dark-charcoal-10;
}
.tertiary-pressed {
- @apply bg-dark-charcoal text-white border-tx;
+ @apply border-tx bg-dark-charcoal text-white;
}
.action-menu {
- @apply bg-tx text-dark-charcoal border border-tx hover:border-dark-charcoal-20;
+ @apply border border-tx bg-tx text-dark-charcoal hover:border-dark-charcoal-20;
}
.action-menu-secondary {
- @apply bg-white text-dark-charcoal border border-tx hover:border-dark-charcoal-20;
+ @apply border border-tx bg-white text-dark-charcoal hover:border-dark-charcoal-20;
}
.action-menu-secondary-pressed {
@@ -326,11 +326,11 @@ a.button {
}
.action-menu-pressed {
- @apply border-tx hover:border-tx bg-dark-charcoal text-white;
+ @apply border-tx bg-dark-charcoal text-white hover:border-tx;
}
.action-menu-muted {
- @apply bg-dark-charcoal-10 text-dark-charcoal border border-tx hover:border-dark-charcoal-20;
+ @apply border border-tx bg-dark-charcoal-10 text-dark-charcoal hover:border-dark-charcoal-20;
}
.action-menu-muted-pressed {
@@ -338,11 +338,11 @@ a.button {
}
.full {
- @apply w-full font-semibold bg-dark-charcoal-06 hover:bg-dark-charcoal-40 hover:text-white;
+ @apply w-full bg-dark-charcoal-06 font-semibold hover:bg-dark-charcoal-40 hover:text-white;
}
.full-pressed {
- @apply w-full font-semibold bg-dark-charcoal-06 text-dark-charcoal;
+ @apply w-full bg-dark-charcoal-06 font-semibold text-dark-charcoal;
}
.connection-start {
diff --git a/src/components/VCheckbox/VCheckbox.vue b/src/components/VCheckbox/VCheckbox.vue
index 71af2ed9b..a7779552e 100644
--- a/src/components/VCheckbox/VCheckbox.vue
+++ b/src/components/VCheckbox/VCheckbox.vue
@@ -9,7 +9,7 @@
/>
<VIcon
v-show="localCheckedState"
- class="absolute start-0 text-white"
+ class="absolute text-white start-0"
:icon-path="checkmark"
view-box="0 0 20 20"
:size="5"
@@ -150,9 +150,9 @@ export default defineComponent({
@apply relative flex text-sm leading-5;
}
.checkbox {
- @apply appearance-none w-5 h-5 border-dark-charcoal border rounded-sm me-3 flex-shrink-0 relative;
- @apply focus:outline-none focus:ring focus:ring-offset-2 focus:ring-pink;
- @apply disabled:bg-dark-charcoal-10 disabled:border-dark-charcoal-40;
+ @apply relative h-5 w-5 flex-shrink-0 appearance-none rounded-sm border border-dark-charcoal me-3;
+ @apply focus:outline-none focus:ring focus:ring-pink focus:ring-offset-2;
+ @apply disabled:border-dark-charcoal-40 disabled:bg-dark-charcoal-10;
@apply checked:bg-dark-charcoal;
@apply checked:disabled:bg-dark-charcoal-40;
}
diff --git a/src/components/VContentLink/VContentLink.vue b/src/components/VContentLink/VContentLink.vue
index ed383c41c..183be9b57 100644
--- a/src/components/VContentLink/VContentLink.vue
+++ b/src/components/VContentLink/VContentLink.vue
@@ -1,15 +1,15 @@
<template>
<VLink
:href="to"
- class="text-dark-charcoal bg-white border border-dark-charcoal/20 rounded-sm flex flex-col md:flex-row md:justify-between items-start md:items-center hover:bg-dark-charcoal hover:text-white hover:no-underline focus:border-tx overflow-hidden py-4 ps-4 pe-12 w-full md:p-6 focus:outline-none focus-visible:ring focus-visible:ring-pink"
+ class="flex w-full flex-col items-start overflow-hidden rounded-sm border border-dark-charcoal/20 bg-white py-4 text-dark-charcoal ps-4 pe-12 hover:bg-dark-charcoal hover:text-white hover:no-underline focus:border-tx focus:outline-none focus-visible:ring focus-visible:ring-pink md:flex-row md:items-center md:justify-between md:p-6"
@keydown.native.shift.tab.exact="$emit('shift-tab', $event)"
>
<div class="flex flex-col items-start md:flex-row md:items-center">
<VIcon :icon-path="iconPath" />
- <p class="hidden md:block font-semibold pt-1 md:pt-0 md:ps-2 md:text-2xl">
+ <p class="hidden pt-1 font-semibold md:block md:pt-0 md:text-2xl md:ps-2">
{{ $t(`search-type.see-${mediaType}`) }}
</p>
- <p class="block md:hidden font-semibold pt-1 md:pt-0 md:ps-2 md:text-2xl">
+ <p class="block pt-1 font-semibold md:hidden md:pt-0 md:text-2xl md:ps-2">
{{ $t(`search-type.${mediaType}`) }}
</p>
</div>
diff --git a/src/components/VContentPage.vue b/src/components/VContentPage.vue
index 00477ed79..5d7894272 100644
--- a/src/components/VContentPage.vue
+++ b/src/components/VContentPage.vue
@@ -1,7 +1,7 @@
<template>
<div class="pt-5 md:pt-10" dir="ltr">
<div
- class="px-6 lg:px-0 mb-10 lg:mb-30 md:max-w-4xl xl:max-w-5xl prose prose-sm md:prose-base mx-auto max-w-none prose-headings:font-bold lg:prose-headings:text-3xl prose-h1:text-4xl prose-h1:text-bold lg:prose-h1:text-6xl md:prose-h1:mb-10 prose-h3:text-2xl prose-h3:font-semibold md:prose-h3:mt-10"
+ class="prose-h1:text-bold prose prose-sm mx-auto mb-10 max-w-none px-6 prose-headings:font-bold prose-h1:text-4xl prose-h3:text-2xl prose-h3:font-semibold md:prose-base md:max-w-4xl md:prose-h1:mb-10 md:prose-h3:mt-10 lg:mb-30 lg:px-0 lg:prose-headings:text-3xl lg:prose-h1:text-6xl xl:max-w-5xl"
>
<slot default />
</div>
diff --git a/src/components/VContentReport/VContentReportButton.vue b/src/components/VContentReport/VContentReportButton.vue
index a5a6430a3..3c486c136 100644
--- a/src/components/VContentReport/VContentReportButton.vue
+++ b/src/components/VContentReport/VContentReportButton.vue
@@ -3,10 +3,10 @@
variant="plain"
class="report-button font-semibold text-dark-charcoal-70"
>
- <span class="text-sr md:text-base md:hidden">{{
+ <span class="text-sr md:hidden md:text-base">{{
$t('media-details.content-report.short')
}}</span>
- <span class="text-sr md:text-base hidden md:inline">{{
+ <span class="hidden text-sr md:inline md:text-base">{{
$t('media-details.content-report.long')
}}</span>
<VIcon :icon-path="icons.flag" class="ms-2" />
diff --git a/src/components/VContentReport/VContentReportForm.vue b/src/components/VContentReport/VContentReportForm.vue
index 8d4ffd615..ba2aef79d 100644
--- a/src/components/VContentReport/VContentReportForm.vue
+++ b/src/components/VContentReport/VContentReportForm.vue
@@ -1,7 +1,7 @@
<template>
<div id="content-report-form" class="w-80 p-6">
<div v-if="status === SENT">
- <p class="font-semibold text-2xl mb-4">
+ <p class="mb-4 text-2xl font-semibold">
{{ $t('media-details.content-report.success.title') }}
</p>
<i18n
@@ -18,7 +18,7 @@
</div>
<div v-else-if="status === FAILED">
- <p class="font-semibold text-2xl mb-4">
+ <p class="mb-4 text-2xl font-semibold">
{{ $t('media-details.content-report.failure.title') }}
</p>
<p class="text-sm">
@@ -28,11 +28,11 @@
<!-- Main form -->
<div v-else>
- <div class="font-semibold text-2xl mb-4">
+ <div class="mb-4 text-2xl font-semibold">
{{ $t('media-details.content-report.long') }}
</div>
- <p class="text-sm mb-4">
+ <p class="mb-4 text-sm">
{{
$t('media-details.content-report.form.disclaimer', {
openverse: 'Openverse',
@@ -42,7 +42,7 @@
<form class="text-sm" @submit="handleSubmit">
<fieldset class="flex flex-col">
- <legend class="font-semibold mb-4">
+ <legend class="mb-4 font-semibold">
{{ $t('media-details.content-report.form.question') }}
</legend>
<VRadio
diff --git a/src/components/VContentReport/VContentReportPopover.vue b/src/components/VContentReport/VContentReportPopover.vue
index 9f61dc3ab..6c5cc8071 100644
--- a/src/components/VContentReport/VContentReportPopover.vue
+++ b/src/components/VContentReport/VContentReportPopover.vue
@@ -11,7 +11,7 @@
<template #default="{ close }">
<div class="relative" data-testid="content-report-popover">
<VIconButton
- class="absolute top-0 end-0 border-none text-dark-charcoal-70"
+ class="absolute top-0 border-none text-dark-charcoal-70 end-0"
size="search-medium"
:icon-props="{ iconPath: icons.closeSmall }"
:button-props="{
diff --git a/src/components/VContentReport/VReportDescForm.vue b/src/components/VContentReport/VReportDescForm.vue
index 8d30e61a5..3616fedd5 100644
--- a/src/components/VContentReport/VReportDescForm.vue
+++ b/src/components/VContentReport/VReportDescForm.vue
@@ -1,6 +1,6 @@
<template>
<label class="other-form block" for="description">
- <span class="flex flex-row justify-between items-center">
+ <span class="flex flex-row items-center justify-between">
<span>{{ $t('media-details.content-report.form.other.note') }}</span>
<span>{{
$t(`media-details.content-report.form.${reason}.sub-label`)
@@ -9,7 +9,7 @@
<textarea
id="description"
v-model="text"
- class="h-20 w-full border border-dark-charcoal-20 placeholder-dark-charcoal-70 mt-2 p-2"
+ class="mt-2 h-20 w-full border border-dark-charcoal-20 p-2 placeholder-dark-charcoal-70"
:placeholder="
$t(`media-details.content-report.form.${reason}.placeholder`).toString()
"
diff --git a/src/components/VContentSwitcher/VSearchTypeButton.vue b/src/components/VContentSwitcher/VSearchTypeButton.vue
index eb2fdcee6..607adc4b6 100644
--- a/src/components/VContentSwitcher/VSearchTypeButton.vue
+++ b/src/components/VContentSwitcher/VSearchTypeButton.vue
@@ -1,6 +1,6 @@
<template>
<VButton
- class="flex flex-row font-semibold py-2 text-sr md:text-base"
+ class="flex flex-row py-2 text-sr font-semibold md:text-base"
:class="[
sizeClasses,
isHeaderScrolled ? 'max-w-[10rem] sm:max-w-[20rem] md:max-w-[16rem]' : '',
@@ -13,12 +13,12 @@
>
<VIcon :icon-path="icon" />
<span
- class="md:block md:ms-2 md:truncate md:text-left"
- :class="isHeaderScrolled ? 'hidden' : 'block ms-2 truncate text-left'"
+ class="md:block md:truncate md:text-left md:ms-2"
+ :class="isHeaderScrolled ? 'hidden' : 'ms-2 block truncate text-left'"
>{{ buttonLabel }}</span
>
<VIcon
- class="hidden md:block text-dark-charcoal-40 md:ms-2"
+ class="hidden text-dark-charcoal-40 md:block md:ms-2"
:icon-path="caretDownIcon"
/>
</VButton>
diff --git a/src/components/VContentSwitcher/VSearchTypeItem.vue b/src/components/VContentSwitcher/VSearchTypeItem.vue
index a40f02a31..5c0f9cdde 100644
--- a/src/components/VContentSwitcher/VSearchTypeItem.vue
+++ b/src/components/VContentSwitcher/VSearchTypeItem.vue
@@ -6,7 +6,7 @@
v-bind="component"
@click.native="$emit('click', item)"
>
- <div class="flex flex-row items-center text-base gap-2 py-2 w-full">
+ <div class="flex w-full flex-row items-center gap-2 py-2 text-base">
<VIcon :icon-path="icon" />
<span class="font-semibold">{{ $t(`search-type.${item}`) }}</span>
<VPill v-if="status === 'beta'" class="ms-auto">{{
diff --git a/src/components/VContentSwitcher/VSearchTypeRadio.vue b/src/components/VContentSwitcher/VSearchTypeRadio.vue
index 74aec5cfe..31a05df97 100644
--- a/src/components/VContentSwitcher/VSearchTypeRadio.vue
+++ b/src/components/VContentSwitcher/VSearchTypeRadio.vue
@@ -1,16 +1,16 @@
<template>
<button
type="button"
- class="flex flex-row items-center p-2 pe-3 rounded-sm text-sr font-semibold border border-dark-charcoal hover:text-white hover:bg-dark-charcoal focus:outline-none focus-visible:ring focus-visible:ring-pink focus-visible:hover:border-white"
+ class="flex flex-row items-center rounded-sm border border-dark-charcoal p-2 text-sr font-semibold pe-3 hover:bg-dark-charcoal hover:text-white focus:outline-none focus-visible:ring focus-visible:ring-pink focus-visible:hover:border-white"
:class="[
selected
- ? 'text-white bg-dark-charcoal focus-visible:border focus-visible:border-white'
+ ? 'bg-dark-charcoal text-white focus-visible:border focus-visible:border-white'
: 'bg-tx focus-visible:border-tx',
]"
:aria-pressed="selected"
@click="handleClick"
>
- <VIcon :icon-path="iconPath" class="me-1 flex-shrink-0" />
+ <VIcon :icon-path="iconPath" class="flex-shrink-0 me-1" />
<span>{{ $t(`search-type.${searchType}`) }}</span>
</button>
</template>
diff --git a/src/components/VContentSwitcher/VSearchTypes.vue b/src/components/VContentSwitcher/VSearchTypes.vue
index c8bae6bdf..3e85d79f4 100644
--- a/src/components/VContentSwitcher/VSearchTypes.vue
+++ b/src/components/VContentSwitcher/VSearchTypes.vue
@@ -4,20 +4,20 @@
:size="size"
:bordered="bordered"
type="radiogroup"
- class="z-10 md:w-[260px] max-w-full"
+ class="z-10 max-w-full md:w-[260px]"
>
<div
v-for="(category, index) in contentTypeGroups"
:key="index"
:class="{
'mt-2': index > 0,
- 'bg-dark-charcoal-06 border-t border-dark-charcoal-20':
+ 'border-t border-dark-charcoal-20 bg-dark-charcoal-06':
index > 0 && !bordered,
}"
>
<h4
:class="bordered ? 'ps-0' : 'ps-6'"
- class="text-sr pt-6 pe-6 pb-4 uppercase font-semibold"
+ class="pt-6 pb-4 text-sr font-semibold uppercase pe-6"
>
{{ $t(`search-type.${category.heading}`) }}
</h4>
diff --git a/src/components/VErrorSection/VErrorSection.vue b/src/components/VErrorSection/VErrorSection.vue
index 0d736aec9..0fd2dc8d3 100644
--- a/src/components/VErrorSection/VErrorSection.vue
+++ b/src/components/VErrorSection/VErrorSection.vue
@@ -1,6 +1,6 @@
<template>
- <div class="error-section flex flex-row items-center max-w-screen-xl mx-auto">
- <div class="image-pane hidden md:block flex-grow max-w-[432px]">
+ <div class="error-section mx-auto flex max-w-screen-xl flex-row items-center">
+ <div class="image-pane hidden max-w-[432px] flex-grow md:block">
<!-- @slot Error image goes here -->
<slot name="image" />
</div>
diff --git a/src/components/VErrorSection/VNoResults.vue b/src/components/VErrorSection/VNoResults.vue
index f4c2443ee..9c764d5ab 100644
--- a/src/components/VErrorSection/VNoResults.vue
+++ b/src/components/VErrorSection/VNoResults.vue
@@ -1,9 +1,9 @@
<template>
<div class="no-results text-center md:text-left">
- <h5 class="text-5xl break-words">
+ <h5 class="break-words text-5xl">
{{ $t('no-results.heading', { query: query.q }) }}
</h5>
- <h6 class="text-3xl font-normal md:font-bold mt-10 md:mt-16">
+ <h6 class="mt-10 text-3xl font-normal md:mt-16 md:font-bold">
{{ $t('no-results.alternatives') }}
</h6>
<VMetaSourceList class="mt-4 md:mt-6" :type="type" :query="query" />
diff --git a/src/components/VFilters/VFilterChecklist.vue b/src/components/VFilters/VFilterChecklist.vue
index f4f600a12..5e0c7ea57 100644
--- a/src/components/VFilters/VFilterChecklist.vue
+++ b/src/components/VFilters/VFilterChecklist.vue
@@ -6,7 +6,7 @@
<div
v-for="(item, index) in options"
:key="index"
- class="flex justify-between items-center mt-4"
+ class="mt-4 flex items-center justify-between"
>
<VCheckbox
:id="item.code"
@@ -43,7 +43,7 @@
<div class="relative">
<VIconButton
:aria-label="getLicenseExplanationCloseAria(item.code)"
- class="absolute top-0 end-0 border-none text-dark-charcoal-70"
+ class="absolute top-0 border-none text-dark-charcoal-70 end-0"
size="small"
:icon-props="{ iconPath: icons.closeSmall }"
@click="close"
diff --git a/src/components/VFilters/VSearchGridFilter.vue b/src/components/VFilters/VSearchGridFilter.vue
index 34fd14f69..580e24d19 100644
--- a/src/components/VFilters/VSearchGridFilter.vue
+++ b/src/components/VFilters/VSearchGridFilter.vue
@@ -4,10 +4,10 @@
aria-labelledby="filters-heading"
class="filters py-8 px-10"
>
- <div class="flex items-center justify-between mt-2 mb-6">
+ <div class="mt-2 mb-6 flex items-center justify-between">
<h4
id="filters-heading"
- class="text-sr font-semibold py-2 uppercase leading-8"
+ class="py-2 text-sr font-semibold uppercase leading-8"
>
{{ $t('filter-list.filter-by') }}
</h4>
@@ -15,7 +15,7 @@
v-if="isAnyFilterApplied"
id="clear-filter-button"
variant="plain"
- class="text-sm font-semibold py-1 px-4 text-pink hover:ring hover:ring-pink"
+ class="py-1 px-4 text-sm font-semibold text-pink hover:ring hover:ring-pink"
@click="clearFilters"
@keydown.shift.tab.exact="focusFilterButton"
>
@@ -37,7 +37,7 @@
@toggle-filter="toggleFilter"
/>
</form>
- <footer v-if="isAnyFilterApplied" class="md:hidden flex justify-between">
+ <footer v-if="isAnyFilterApplied" class="flex justify-between md:hidden">
<VButton variant="primary" @click="$emit('close')">
{{ $t('filter-list.show') }}
</VButton>
diff --git a/src/components/VFourOhFour.vue b/src/components/VFourOhFour.vue
index 490633f14..050250faa 100644
--- a/src/components/VFourOhFour.vue
+++ b/src/components/VFourOhFour.vue
@@ -1,9 +1,9 @@
<template>
- <main class="bg-yellow h-screen relative page-404 overflow-x-hidden">
+ <main class="page-404 relative h-screen overflow-x-hidden bg-yellow">
<VLink href="/" class="relative z-10 text-dark-charcoal">
<span class="sr-only">Openverse</span>
<span
- class="flex flex-row pt-6 lg:pt-8 ms-6 lg:ms-10 h-auto w-30 text-dark-charcoal"
+ class="flex h-auto w-30 flex-row pt-6 text-dark-charcoal ms-6 lg:pt-8 lg:ms-10"
aria-hidden="true"
>
<OpenverseLogo />
@@ -12,19 +12,19 @@
</VLink>
<Oops
aria-hidden="true"
- class="absolute opacity-5 fill-dark-charcoal -mt-[10%] -ml-[20%] lg:mx-auto w-[140%] lg:w-full px-6 lg:px-16 z-0 pointer-events-none"
+ class="pointer-events-none absolute z-0 -mt-[10%] -ml-[20%] w-[140%] fill-dark-charcoal px-6 opacity-5 lg:mx-auto lg:w-full lg:px-16"
/>
<header
- class="absolute lg:max-w-2xl space-y-4 lg:space-y-6 top-1/4 z-10 left-0 right-0 mx-auto px-6 lg:px-0"
+ class="absolute top-1/4 left-0 right-0 z-10 mx-auto space-y-4 px-6 lg:max-w-2xl lg:space-y-6 lg:px-0"
>
- <h1 class="mb-6 lg:mb-10 lg:leading-tight text-3xl lg:text-6xl">
+ <h1 class="mb-6 text-3xl lg:mb-10 lg:text-6xl lg:leading-tight">
{{ $t('404.title') }}
</h1>
<p class="font-semibold">
<i18n path="404.main">
<template #link>
<VLink
- class="underline text-current hover:text-current active:text-current"
+ class="text-current underline hover:text-current active:text-current"
href="/"
>Openverse</VLink
>
diff --git a/src/components/VGlobalAudioSection/VGlobalAudioSection.vue b/src/components/VGlobalAudioSection/VGlobalAudioSection.vue
index 5759ccdad..9cd0958f7 100644
--- a/src/components/VGlobalAudioSection/VGlobalAudioSection.vue
+++ b/src/components/VGlobalAudioSection/VGlobalAudioSection.vue
@@ -1,9 +1,9 @@
<template>
- <div class="global-audio sticky sm:hidden bottom-0">
+ <div class="global-audio sticky bottom-0 sm:hidden">
<VGlobalAudioTrack v-if="audio" :audio="audio" />
<VIconButton
v-if="audio"
- class="absolute top-0 rtl:left-0 ltr:right-0 border-none z-20"
+ class="absolute top-0 z-20 border-none ltr:right-0 rtl:left-0"
:icon-props="{ iconPath: icons.closeIcon }"
@click="handleClose"
/>
diff --git a/src/components/VHeader/VFilterButton.vue b/src/components/VHeader/VFilterButton.vue
index 9c91f20fa..31df8b6b5 100644
--- a/src/components/VHeader/VFilterButton.vue
+++ b/src/components/VHeader/VFilterButton.vue
@@ -3,11 +3,11 @@
id="filter-button"
:variant="variant"
size="disabled"
- class="self-center gap-2 align-center font-semibold py-2 flex-shrink-0 focus-visible:border-tx focus-visible:ring focus-visible:ring-pink"
+ class="align-center flex-shrink-0 gap-2 self-center py-2 font-semibold focus-visible:border-tx focus-visible:ring focus-visible:ring-pink"
:class="
filtersAreApplied
- ? 'px-3 flex-shrink-0'
- : 'w-10 md:w-auto h-10 md:h-auto px-0 md:px-3'
+ ? 'flex-shrink-0 px-3'
+ : 'h-10 w-10 px-0 md:h-auto md:w-auto md:px-3'
"
:pressed="pressed"
:disabled="disabled"
diff --git a/src/components/VHeader/VHeader.vue b/src/components/VHeader/VHeader.vue
index 23347212f..394d94596 100644
--- a/src/components/VHeader/VHeader.vue
+++ b/src/components/VHeader/VHeader.vue
@@ -1,6 +1,6 @@
<template>
<header
- class="main-header flex px-4 py-3 md:py-4 md:px-7 items-center md:items-stretch z-30 w-full bg-white justify-between gap-x-2 gap-y-4"
+ class="main-header z-30 flex w-full items-center justify-between gap-x-2 gap-y-4 bg-white px-4 py-3 md:items-stretch md:py-4 md:px-7"
:class="{
'flex-wrap md:flex-nowrap': !isHeaderScrolled,
'border-b border-white': !isHeaderScrolled && !isMenuOpen,
@@ -18,16 +18,16 @@
<VSearchBar
v-model.trim="searchTerm"
- class="flex-grow lg:flex-grow-0 lg:w-1/2 2xl:w-1/3"
+ class="flex-grow lg:w-1/2 lg:flex-grow-0 2xl:w-1/3"
:size="isMinScreenMd ? 'medium' : isHeaderScrolled ? 'small' : 'large'"
:class="{
- 'order-4 md:order-none w-full md:w-auto': !isHeaderScrolled,
+ 'order-4 w-full md:order-none md:w-auto': !isHeaderScrolled,
}"
@submit="handleSearch"
>
<span
v-show="searchStatus"
- class="hidden lg:block info font-semibold text-xs text-dark-charcoal-70 group-hover:text-dark-charcoal group-focus:text-dark-charcoal mx-4 whitespace-nowrap"
+ class="info mx-4 hidden whitespace-nowrap text-xs font-semibold text-dark-charcoal-70 group-hover:text-dark-charcoal group-focus:text-dark-charcoal lg:block"
>
{{ searchStatus }}
</span>
diff --git a/src/components/VHeader/VHeaderFilter.vue b/src/components/VHeader/VHeaderFilter.vue
index c3d0ade83..dcc055c27 100644
--- a/src/components/VHeader/VHeaderFilter.vue
+++ b/src/components/VHeader/VHeaderFilter.vue
@@ -1,7 +1,7 @@
<template>
<div
ref="nodeRef"
- class="flex justify-end items-stretch text-sr md:text-base"
+ class="flex items-stretch justify-end text-sr md:text-base"
>
<VFilterButton
ref="buttonRef"
diff --git a/src/components/VHeader/VLogoButton.vue b/src/components/VHeader/VLogoButton.vue
index 3f8457b4b..97f02a6ee 100644
--- a/src/components/VHeader/VLogoButton.vue
+++ b/src/components/VHeader/VLogoButton.vue
@@ -4,7 +4,7 @@
href="/"
variant="plain"
size="disabled"
- class="max-w-min hover:bg-yellow text-dark-charcoal"
+ class="max-w-min text-dark-charcoal hover:bg-yellow"
>
<VLogoLoader
:status="isFetching ? 'loading' : 'idle'"
diff --git a/src/components/VHeader/VPageMenu/VMobilePageMenu.vue b/src/components/VHeader/VPageMenu/VMobilePageMenu.vue
index 43cb1d27c..9c6df8a23 100644
--- a/src/components/VHeader/VPageMenu/VMobilePageMenu.vue
+++ b/src/components/VHeader/VPageMenu/VMobilePageMenu.vue
@@ -3,7 +3,7 @@
<!-- eslint-disable vuejs-accessibility/click-events-have-key-events -->
<div
ref="triggerContainerRef"
- class="flex items-stretch flex-shrink-0"
+ class="flex flex-shrink-0 items-stretch"
@click="onTriggerClick"
>
<!-- eslint-enable vuejs-accessibility/click-events-have-key-events -->
diff --git a/src/components/VHeader/VPageMenu/VPageList.vue b/src/components/VHeader/VPageMenu/VPageList.vue
index 344bc2311..55fd912c6 100644
--- a/src/components/VHeader/VPageMenu/VPageList.vue
+++ b/src/components/VHeader/VPageMenu/VPageList.vue
@@ -1,13 +1,13 @@
<template>
<VItemGroup
:direction="layout"
- class="mt-10 md:mt-2 min-w-[200px] text-base"
+ class="mt-10 min-w-[200px] text-base md:mt-2"
:bordered="false"
>
<VItem
v-for="(page, idx) in pages.all"
:key="page.id"
- class="md:w-full w-1/2"
+ class="w-1/2 md:w-full"
:selected="page.id === pages.current.value"
:is-first="idx === 0"
v-bind="getLinkProps(page)"
@@ -19,7 +19,7 @@
v-if="isLinkExternal(page)"
:icon-path="externalLinkIcon"
:size="5"
- class="self-center mb-0.5"
+ class="mb-0.5 self-center"
/>
</div>
</VItem>
diff --git a/src/components/VHeader/VPageMenu/VPageMenuButton.vue b/src/components/VHeader/VPageMenu/VPageMenuButton.vue
index 860a71eb9..d064483a1 100644
--- a/src/components/VHeader/VPageMenu/VPageMenuButton.vue
+++ b/src/components/VHeader/VPageMenu/VPageMenuButton.vue
@@ -2,7 +2,7 @@
<VButton
variant="action-menu"
size="disabled"
- class="font-semibold p-2 w-12 leading-7 focus-visible:border-tx"
+ class="w-12 p-2 font-semibold leading-7 focus-visible:border-tx"
:aria-label="$t('header.aria.menu')"
v-bind="a11yProps"
@click="$emit('click')"
diff --git a/src/components/VHeader/VSearchBar/VSearchBar.vue b/src/components/VHeader/VSearchBar/VSearchBar.vue
index bac130d56..7f2d2b07d 100644
--- a/src/components/VHeader/VSearchBar/VSearchBar.vue
+++ b/src/components/VHeader/VSearchBar/VSearchBar.vue
@@ -1,13 +1,13 @@
<template>
<form
- class="search-bar group flex flex-row items-center bg-white rounded-sm"
+ class="search-bar group flex flex-row items-center rounded-sm bg-white"
:class="{ 'h-[57px] md:h-[69px]': size === 'standalone' }"
@submit.prevent="handleSearch"
>
<VInputField
:placeholder="placeholder || $t('hero.search.placeholder')"
v-bind="$attrs"
- class="flex-grow search-field"
+ class="search-field flex-grow"
:class="{ 'border-transparent': isHomeRoute }"
:label-text="
$t('search.search-bar-label', { openverse: 'Openverse' }).toString()
diff --git a/src/components/VHeader/VSearchBar/VSearchButton.vue b/src/components/VHeader/VSearchBar/VSearchButton.vue
index e49a636fb..fefb5db79 100644
--- a/src/components/VHeader/VSearchBar/VSearchButton.vue
+++ b/src/components/VHeader/VSearchBar/VSearchButton.vue
@@ -4,14 +4,14 @@
:aria-label="$t('search.search')"
size="disabled"
:variant="isIcon ? 'plain' : 'primary'"
- class="transition-none flex-shrink-0 rounded-s-none font-semibold text-2xl hover:text-white group-hover:text-white group-hover:border-pink hover:bg-pink group-hover:bg-pink focus-visible:ring focus-visible:ring-pink"
+ class="flex-shrink-0 text-2xl font-semibold transition-none rounded-s-none hover:bg-pink hover:text-white focus-visible:ring focus-visible:ring-pink group-hover:border-pink group-hover:bg-pink group-hover:text-white"
:class="[
isIcon
- ? 'search-button focus-visible:bg-pink focus-visible:text-white p-[0.5px] ps-[1.5px]'
- : 'py-6 px-10 whitespace-nowrap h-full',
+ ? 'search-button ps-[1.5px] p-[0.5px] focus-visible:bg-pink focus-visible:text-white'
+ : 'h-full whitespace-nowrap py-6 px-10',
sizeClasses,
isHomeRoute
- ? 'bg-pink border-b border-b-pink text-white border-tx'
+ ? 'border-b border-tx border-b-pink bg-pink text-white'
: 'border-dark-charcoal-20',
]"
v-on="$listeners"
diff --git a/src/components/VIcon/VIcon.vue b/src/components/VIcon/VIcon.vue
index 8bef6bf6c..50b1815b1 100644
--- a/src/components/VIcon/VIcon.vue
+++ b/src/components/VIcon/VIcon.vue
@@ -82,6 +82,6 @@ export default defineComponent({
<style scoped>
[dir='rtl'] .v-icon.rtl-flip {
- @apply transform -scale-x-100;
+ @apply -scale-x-100 transform;
}
</style>
diff --git a/src/components/VIconButton/VIconButton.vue b/src/components/VIconButton/VIconButton.vue
index cbda52b4f..d51b21caf 100644
--- a/src/components/VIconButton/VIconButton.vue
+++ b/src/components/VIconButton/VIconButton.vue
@@ -2,7 +2,7 @@
<VButton
v-bind="buttonProps"
size="disabled"
- class="icon-button flex flex-shrink-0 items-center justify-center active:shadow-ring border-1.5"
+ class="icon-button flex flex-shrink-0 items-center justify-center border-1.5 active:shadow-ring"
:class="buttonSizeClasses"
:type="type"
v-on="$listeners"
diff --git a/src/components/VImageDetails/VImageDetails.vue b/src/components/VImageDetails/VImageDetails.vue
index a77af8cd7..e4a55e8c9 100644
--- a/src/components/VImageDetails/VImageDetails.vue
+++ b/src/components/VImageDetails/VImageDetails.vue
@@ -1,12 +1,12 @@
<template>
<section class="w-full">
- <div class="flex flex-row justify-between items-center mb-6">
+ <div class="mb-6 flex flex-row items-center justify-between">
<h3 class="text-2xl md:text-3xl">
{{ $t('image-details.information.title') }}
</h3>
<VContentReportPopover :media="image" />
</div>
- <ul v-if="image && image.tags" class="flex flex-wrap gap-2 mb-6">
+ <ul v-if="image && image.tags" class="mb-6 flex flex-wrap gap-2">
<VMediaTag
v-for="(tag, index) in image.tags.filter((i) => !!i)"
:key="index"
@@ -101,6 +101,6 @@ dd {
}
dd {
- @apply font-bold mt-2;
+ @apply mt-2 font-bold;
}
</style>
diff --git a/src/components/VImageDetails/VRelatedImages.vue b/src/components/VImageDetails/VRelatedImages.vue
index 7bdb302a9..54c2fffc5 100644
--- a/src/components/VImageDetails/VRelatedImages.vue
+++ b/src/components/VImageDetails/VRelatedImages.vue
@@ -1,6 +1,6 @@
<template>
<aside>
- <h3 class="text-2xl md:text-3xl mb-6">
+ <h3 class="mb-6 text-2xl md:text-3xl">
{{ $t('image-details.related-images') }}
</h3>
<VLoadingIcon v-if="fetchState.isFetching" />
diff --git a/src/components/VImageGrid/VImageCell.vue b/src/components/VImageGrid/VImageCell.vue
index bfade0a96..91bcbb5ad 100644
--- a/src/components/VImageGrid/VImageCell.vue
+++ b/src/components/VImageGrid/VImageCell.vue
@@ -1,7 +1,7 @@
<template>
<VLink
:href="'/image/' + image.id"
- class="w-full block group relative overflow-hidden rounded-sm focus:ring-[3px] focus:ring-pink focus:ring-offset-[3px] focus:outline-none bg-dark-charcoal-10 text-dark-charcoal-10"
+ class="group relative block w-full overflow-hidden rounded-sm bg-dark-charcoal-10 text-dark-charcoal-10 focus:outline-none focus:ring-[3px] focus:ring-pink focus:ring-offset-[3px]"
:aria-label="image.title"
:style="containerStyle"
@keydown.native.shift.tab.exact="$emit('shift-tab', $event)"
@@ -19,7 +19,7 @@
@error="onImageLoadError($event)"
/>
<figcaption
- class="absolute left-0 bottom-0 invisible group-hover:visible group-focus:visible bg-white p-1 text-dark-charcoal"
+ class="invisible absolute left-0 bottom-0 bg-white p-1 text-dark-charcoal group-hover:visible group-focus:visible"
>
<span class="sr-only">{{ image.title }}</span>
<VLicense :license="image.license" :hide-name="true" />
diff --git a/src/components/VInputField/VInputField.vue b/src/components/VInputField/VInputField.vue
index d9f560542..11a8e15b3 100644
--- a/src/components/VInputField/VInputField.vue
+++ b/src/components/VInputField/VInputField.vue
@@ -1,11 +1,11 @@
<template>
<div
- class="input-field group flex flex-row items-center focus-within:bg-dark-charcoal-06 group-hover:bg-dark-charcoal-06 p-0.5px focus-within:p-0 border focus-within:border-1.5 border-dark-charcoal-20 rounded-sm overflow-hidden focus-within:border-pink"
+ class="input-field group flex flex-row items-center overflow-hidden rounded-sm border border-dark-charcoal-20 p-0.5px focus-within:border-1.5 focus-within:border-pink focus-within:bg-dark-charcoal-06 focus-within:p-0 group-hover:bg-dark-charcoal-06"
:class="[
{
// Padding is set to 1.5px to accommodate the border that will appear later.
- 'border-s-0 ps-1.5px rounded-s-none': connectionSides.includes('start'),
- 'border-e-0 pe-1.5px rounded-e-none': connectionSides.includes('end'),
+ 'ps-1.5px rounded-s-none border-s-0': connectionSides.includes('start'),
+ 'pe-1.5px rounded-e-none border-e-0': connectionSides.includes('end'),
},
sizeClass,
]"
@@ -14,7 +14,7 @@
:id="fieldId"
v-bind="$attrs"
:type="type"
- class="w-full leading-none font-semibold bg-tx placeholder-dark-charcoal-70 ms-4 h-full appearance-none rounded-none focus:outline-none text-2xl md:text-base"
+ class="h-full w-full appearance-none rounded-none bg-tx text-2xl font-semibold leading-none placeholder-dark-charcoal-70 ms-4 focus:outline-none md:text-base"
:value="modelValue"
:aria-label="labelText"
@input="updateModelValue"
diff --git a/src/components/VItemGroup/VItem.vue b/src/components/VItemGroup/VItem.vue
index ad6ed52c1..a5da1c607 100644
--- a/src/components/VItemGroup/VItem.vue
+++ b/src/components/VItemGroup/VItem.vue
@@ -14,7 +14,7 @@
<VButton
data-item-group-item
:as="as"
- class="flex justify-between min-w-full group relative hover:bg-dark-charcoal-10 px-2 py-2 focus:z-10"
+ class="group relative flex min-w-full justify-between px-2 py-2 hover:bg-dark-charcoal-10 focus:z-10"
:class="[
$style[`${contextProps.direction}-button`],
selected && 'bg-dark-charcoal-10 ring-offset-dark-charcoal-10',
@@ -35,7 +35,7 @@
@click.native="$emit('click')"
>
<div
- class="flex-grow whitespace-nowrap my-0 rounded-sm px-2"
+ class="my-0 flex-grow whitespace-nowrap rounded-sm px-2"
:class="[$style[`${contextProps.direction}-content`]]"
>
<slot name="default" />
@@ -205,7 +205,7 @@ export default defineComponent({
}
.horizontal-bordered {
- @apply border-s-0 border-e border-dark-charcoal-20;
+ @apply border-dark-charcoal-20 border-s-0 border-e;
}
.horizontal:first-of-type {
diff --git a/src/components/VItemGroup/VItemGroup.vue b/src/components/VItemGroup/VItemGroup.vue
index 00e5a3e41..d4bd0f036 100644
--- a/src/components/VItemGroup/VItemGroup.vue
+++ b/src/components/VItemGroup/VItemGroup.vue
@@ -1,7 +1,7 @@
<template>
<div
ref="nodeRef"
- class="w-full flex"
+ class="flex w-full"
:role="type"
:class="{
'flex-col': direction === 'vertical',
diff --git a/src/components/VLicense/VLicenseElements.vue b/src/components/VLicense/VLicenseElements.vue
index 54ea7622c..e07cfdbd6 100644
--- a/src/components/VLicense/VLicenseElements.vue
+++ b/src/components/VLicense/VLicenseElements.vue
@@ -3,7 +3,7 @@
<li
v-for="element in elementNames"
:key="element"
- class="flex items-center gap-3 mb-2 text-sm md:text-base"
+ class="mb-2 flex items-center gap-3 text-sm md:text-base"
>
<VIcon
view-box="0 0 30 30"
diff --git a/src/components/VLogoLoader/VLogoLoader.vue b/src/components/VLogoLoader/VLogoLoader.vue
index e9571ab54..423e4f59b 100644
--- a/src/components/VLogoLoader/VLogoLoader.vue
+++ b/src/components/VLogoLoader/VLogoLoader.vue
@@ -4,12 +4,12 @@
xmlns="http://www.w3.org/2000/svg"
:class="{
[$style.loading]: status === 'loading' && !prefersReducedMotion,
- 'w-10 h-10': autoResize,
+ 'h-10 w-10': autoResize,
}"
aria-hidden="true"
:data-prefers-reduced-motion="prefersReducedMotion"
data-testid="logo-loader"
- class="w-12 h-12 md:w-12 md:h-12 p-3 rounded inline-flex justify-center items-center"
+ class="inline-flex h-12 w-12 items-center justify-center rounded p-3 md:h-12 md:w-12"
fill="currentColor"
>
<path
diff --git a/src/components/VMediaInfo/VCopyLicense.vue b/src/components/VMediaInfo/VCopyLicense.vue
index 1b2328eee..ff5f14de1 100644
--- a/src/components/VMediaInfo/VCopyLicense.vue
+++ b/src/components/VMediaInfo/VCopyLicense.vue
@@ -2,7 +2,7 @@
<div>
<h5
id="copy-license-title"
- class="mb-4 text-base md:text-2xl font-semibold"
+ class="mb-4 text-base font-semibold md:text-2xl"
>
{{ $t('media-details.reuse.copy-license.title') }}
</h5>
@@ -20,7 +20,7 @@
<!-- eslint-enable vue/no-v-html -->
</VLicenseTabPanel>
<VLicenseTabPanel :tab="tabs[1]">
- <p id="attribution-html" class="font-mono break-all" dir="ltr">
+ <p id="attribution-html" class="break-all font-mono" dir="ltr">
{{ getAttributionMarkup() }}
</p>
</VLicenseTabPanel>
diff --git a/src/components/VMediaInfo/VLicenseTabPanel.vue b/src/components/VMediaInfo/VLicenseTabPanel.vue
index b590e4235..a77446556 100644
--- a/src/components/VMediaInfo/VLicenseTabPanel.vue
+++ b/src/components/VMediaInfo/VLicenseTabPanel.vue
@@ -1,7 +1,7 @@
<template>
<VTabPanel
:id="tab"
- class="h-[190px] flex flex-col justify-between items-start text-sm md:text-base"
+ class="flex h-[190px] flex-col items-start justify-between text-sm md:text-base"
>
<div :id="`panel-slot-${tab}`" class="overflow-y-auto">
<slot />
diff --git a/src/components/VMediaInfo/VMediaLicense.vue b/src/components/VMediaInfo/VMediaLicense.vue
index cf159e650..34a4e2c90 100644
--- a/src/components/VMediaInfo/VMediaLicense.vue
+++ b/src/components/VMediaInfo/VMediaLicense.vue
@@ -1,6 +1,6 @@
<template>
<div class="media-attribution">
- <h5 class="mb-4 text-base md:text-2xl font-semibold">
+ <h5 class="mb-4 text-base font-semibold md:text-2xl">
{{ headerText }}
</h5>
@@ -8,7 +8,7 @@
<i18n
path="media-details.reuse.attribution"
tag="span"
- class="block text-sm md:text-base mb-2"
+ class="mb-2 block text-sm md:text-base"
>
<template #link>
<VLink class="uppercase" :href="licenseUrl">
diff --git a/src/components/VMediaInfo/VMediaReuse.vue b/src/components/VMediaInfo/VMediaReuse.vue
index cdee94c89..92eb68c4d 100644
--- a/src/components/VMediaInfo/VMediaReuse.vue
+++ b/src/components/VMediaInfo/VMediaReuse.vue
@@ -3,10 +3,10 @@
:aria-label="$t('media-details.reuse.title').toString()"
class="media-reuse"
>
- <h3 class="text-2xl md:text-3xl mb-6">
+ <h3 class="mb-6 text-2xl md:text-3xl">
{{ $t('media-details.reuse.title') }}
</h3>
- <div v-if="media.license_url" class="grid md:grid-cols-2 gap-6">
+ <div v-if="media.license_url" class="grid gap-6 md:grid-cols-2">
<VMediaLicense
:license="media.license"
:license-url="media.license_url"
diff --git a/src/components/VMediaTag/VMediaTag.vue b/src/components/VMediaTag/VMediaTag.vue
index 1bb066982..b563c4aef 100644
--- a/src/components/VMediaTag/VMediaTag.vue
+++ b/src/components/VMediaTag/VMediaTag.vue
@@ -2,7 +2,7 @@
<Component
:is="tag"
v-bind="$attrs"
- class="text-dark-blue text-sr md:text-base font-semibold px-3 md:px-4 py-1 md:py-2 bg-dark-charcoal-10 rounded-full leading-[130%] md:leading-[130%] inline-flex"
+ class="inline-flex rounded-full bg-dark-charcoal-10 px-3 py-1 text-sr font-semibold leading-[130%] text-dark-blue md:px-4 md:py-2 md:text-base md:leading-[130%]"
>
<!-- @slot Content goes here -->
<slot />
diff --git a/src/components/VMetaSearch/VMetaSearchForm.vue b/src/components/VMetaSearch/VMetaSearchForm.vue
index 538fe45b0..0cc8f2d94 100644
--- a/src/components/VMetaSearch/VMetaSearchForm.vue
+++ b/src/components/VMetaSearch/VMetaSearchForm.vue
@@ -2,7 +2,7 @@
<section
:key="type"
ref="sectionRef"
- class="p-6 meta-search text-center mt-12"
+ class="meta-search mt-12 p-6 text-center"
data-testid="meta-search-form"
@keydown.tab.exact="handleTab"
>
@@ -15,7 +15,7 @@
: 'meta-search.form.unsupported-title'
"
tag="h4"
- class="text-4xl mb-2"
+ class="mb-2 text-4xl"
>
<template #openverse>Openverse</template>
<template #type>{{ $t(`meta-search.form.types.${type}`) }}</template>
@@ -24,7 +24,7 @@
v-else
path="meta-search.form.no-results-title"
tag="h4"
- class="text-4xl mb-2"
+ class="mb-2 text-4xl"
>
<template #type>{{ $t(`meta-search.form.types.${type}`) }}</template>
<template #query>{{ query.q }}</template>
@@ -40,12 +40,12 @@
</header>
<VMetaSourceList
- class="md:justify-center mt-6 mb-10"
+ class="mt-6 mb-10 md:justify-center"
:type="type"
:query="query"
/>
- <p class="text-sm font-semibold max-w-3xl my-0 mx-auto">
+ <p class="my-0 mx-auto max-w-3xl text-sm font-semibold">
{{ $t('meta-search.caption', { openverse: 'Openverse' }) }}
</p>
</section>
diff --git a/src/components/VMetaSearch/VMetaSourceList.vue b/src/components/VMetaSearch/VMetaSourceList.vue
index f3e9a7d8d..6384cc2ce 100644
--- a/src/components/VMetaSearch/VMetaSourceList.vue
+++ b/src/components/VMetaSearch/VMetaSourceList.vue
@@ -1,6 +1,6 @@
<template>
<ul
- class="meta-sources flex flex-col md:flex-row flex-wrap items-stretch gap-4 w-full"
+ class="meta-sources flex w-full flex-col flex-wrap items-stretch gap-4 md:flex-row"
>
<li v-for="source in sources" :key="source.name">
<VButton
@@ -8,7 +8,7 @@
variant="tertiary"
size="disabled"
:href="source.url"
- class="w-full md:w-auto text-sr font-bold p-4 md:py-2 md:px-3"
+ class="w-full p-4 text-sr font-bold md:w-auto md:py-2 md:px-3"
>
{{ source.name }}
<sup class="top-0">
diff --git a/src/components/VMigrationNotice.vue b/src/components/VMigrationNotice.vue
index d95cd901c..75e29b9a1 100644
--- a/src/components/VMigrationNotice.vue
+++ b/src/components/VMigrationNotice.vue
@@ -14,7 +14,7 @@
<i18n tag="span" path="migration-notice.more">
<template #read-more>
<VLink
- class="text-white font-bold underline"
+ class="font-bold text-white underline"
href="https://wordpress.org/news/2021/05/welcome-to-openverse/"
>
{{ $t('migration-notice.read') }}
diff --git a/src/components/VModal/VModalContent.vue b/src/components/VModal/VModalContent.vue
index a9a943ac7..7e8099236 100644
--- a/src/components/VModal/VModalContent.vue
+++ b/src/components/VModal/VModalContent.vue
@@ -3,12 +3,12 @@
<!-- Prevent FocusTrap from trying to focus the first element. We already do that in a more flexible, adaptive way in our Dialog composables. -->
<FocusTrap :initial-focus="() => false">
<div
- class="flex justify-center z-40 fixed inset-0 bg-dark-charcoal bg-opacity-75 min-h-screen overflow-y-auto"
+ class="fixed inset-0 z-40 flex min-h-screen justify-center overflow-y-auto bg-dark-charcoal bg-opacity-75"
>
<div
ref="dialogRef"
v-bind="$attrs"
- class="w-full md:max-w-[768px] lg:w-[768px] xl:max-w-[1024px] xl:w-[1024px] flex flex-col"
+ class="flex w-full flex-col md:max-w-[768px] lg:w-[768px] xl:w-[1024px] xl:max-w-[1024px]"
role="dialog"
aria-modal="true"
v-on="$listeners"
@@ -23,7 +23,7 @@
jarring "shifting" effect when opening the mobile modal.
-->
<div
- class="w-full flex justify-between md:justify-end bg-white md:bg-tx ps-4 pe-3 md:px-0 py-4 md:py-3 shrink-0"
+ class="flex w-full shrink-0 justify-between bg-white py-4 pe-3 ps-4 md:justify-end md:bg-tx md:px-0 md:py-3"
>
<VLogoButton
class="md:hidden"
@@ -35,7 +35,7 @@
ref="closeButton"
size="disabled"
variant="plain"
- class="md:text-white text-sr md:text-base"
+ class="text-sr md:text-base md:text-white"
@click="hide()"
>
{{ $t('modal.close') }}
@@ -45,7 +45,7 @@
</slot>
<div
- class="w-full flex-grow align-bottom bg-white md:rounded-t-md text-left"
+ class="w-full flex-grow bg-white text-left align-bottom md:rounded-t-md"
>
<slot />
</div>
diff --git a/src/components/VNotificationBanner.vue b/src/components/VNotificationBanner.vue
index 81c529807..373ca9595 100644
--- a/src/components/VNotificationBanner.vue
+++ b/src/components/VNotificationBanner.vue
@@ -1,11 +1,11 @@
<template>
<div
v-show="enabled && shouldShow"
- class="px-4 md:px-7 py-2 flex items-center justify-between"
+ class="flex items-center justify-between px-4 py-2 md:px-7"
:class="$style[variant]"
:data-testid="`banner-${id}`"
>
- <p class="leading-tight md:leading-normal text-sr md:text-base text-left">
+ <p class="text-left text-sr leading-tight md:text-base md:leading-normal">
<slot name="default" />
</p>
<div class="flex">
diff --git a/src/components/VPill.vue b/src/components/VPill.vue
index df5e716b1..163792894 100644
--- a/src/components/VPill.vue
+++ b/src/components/VPill.vue
@@ -1,6 +1,6 @@
<template>
<div
- class="bg-yellow uppercase w-min px-2 py-1 text-sm font-semibold rounded-sm"
+ class="w-min rounded-sm bg-yellow px-2 py-1 text-sm font-semibold uppercase"
>
<slot />
</div>
diff --git a/src/components/VPopover/VPopover.vue b/src/components/VPopover/VPopover.vue
index a71d9ffe4..c14a31732 100644
--- a/src/components/VPopover/VPopover.vue
+++ b/src/components/VPopover/VPopover.vue
@@ -3,7 +3,7 @@
<!-- eslint-disable vuejs-accessibility/click-events-have-key-events -->
<div
ref="triggerContainerRef"
- class="w-min whitespace-nowrap flex items-stretch"
+ class="flex w-min items-stretch whitespace-nowrap"
@click="onTriggerClick"
>
<!-- eslint-enable vuejs-accessibility/click-events-have-key-events -->
diff --git a/src/components/VPopover/VPopoverContent.vue b/src/components/VPopover/VPopoverContent.vue
index b581f8265..197b1a0e6 100644
--- a/src/components/VPopover/VPopoverContent.vue
+++ b/src/components/VPopover/VPopoverContent.vue
@@ -1,14 +1,14 @@
<template>
<div
v-show="visible"
- class="w-0 h-0"
+ class="h-0 w-0"
:aria-hidden="!visible"
v-on="$listeners"
@keydown="onKeyDown"
>
<div
ref="popoverRef"
- class="bg-white border border-light-gray rounded-sm shadow max-w-max"
+ class="max-w-max rounded-sm border border-light-gray bg-white shadow"
:style="{ zIndex }"
:tabindex="-1"
@blur="onBlur"
diff --git a/src/components/VRadio/VRadio.vue b/src/components/VRadio/VRadio.vue
index ba8fa9989..69288086d 100644
--- a/src/components/VRadio/VRadio.vue
+++ b/src/components/VRadio/VRadio.vue
@@ -4,13 +4,13 @@
:id="id"
v-bind="$attrs"
:value="value"
- class="radio appearance-none relative flex-shrink-0 bg-white w-5 h-5 border border-dark-charcoal rounded-full me-3 focus:outline-none focus:ring focus:ring-offset-2 focus:ring-pink disabled:bg-dark-charcoal-10 disabled:border-dark-charcoal-40"
+ class="radio relative h-5 w-5 flex-shrink-0 appearance-none rounded-full border border-dark-charcoal bg-white me-3 focus:outline-none focus:ring focus:ring-pink focus:ring-offset-2 disabled:border-dark-charcoal-40 disabled:bg-dark-charcoal-10"
type="radio"
:checked="isChecked"
@input="handleInput"
/>
<Radiomark
- class="radiomark absolute start-0 w-5 h-5 text-dark-charcoal opacity-0 transition-opacity"
+ class="radiomark absolute h-5 w-5 text-dark-charcoal opacity-0 transition-opacity start-0"
focusable="false"
width="20"
height="20"
diff --git a/src/components/VScrollButton.vue b/src/components/VScrollButton.vue
index b1fc5ca92..41dd551e8 100644
--- a/src/components/VScrollButton.vue
+++ b/src/components/VScrollButton.vue
@@ -2,7 +2,7 @@
<button
:aria-label="$t('browse-page.aria.scroll')"
type="button"
- class="scroll text-white bg-pink hover:bg-dark-pink transition-all duration-100 ease-linear fixed bottom-4 w-14 h-14 hover:shadow-md rounded-full text-center"
+ class="scroll fixed bottom-4 h-14 w-14 rounded-full bg-pink text-center text-white transition-all duration-100 ease-linear hover:bg-dark-pink hover:shadow-md"
:class="hClass"
@click="scrollToTop"
@keydown.tab.exact="$emit('tab', $event)"
@@ -12,7 +12,7 @@
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
focusable="false"
- class="w-full h-full fill-curr"
+ class="h-full w-full fill-curr"
>
<path d="M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" />
</svg>
diff --git a/src/components/VSearchResultsTitle.vue b/src/components/VSearchResultsTitle.vue
index b05b2aa05..a20fdbcde 100644
--- a/src/components/VSearchResultsTitle.vue
+++ b/src/components/VSearchResultsTitle.vue
@@ -1,6 +1,6 @@
<template>
<h1
- class="leading-tight sr-only md:not-sr-only break-words"
+ class="sr-only break-words leading-tight md:not-sr-only"
:class="[size === 'large' ? 'text-[90px]' : 'text-6xl']"
>
<slot default />
diff --git a/src/components/VSkeleton/VAudioTrackSkeleton.vue b/src/components/VSkeleton/VAudioTrackSkeleton.vue
index 2513015dc..e8a9fd09e 100644
--- a/src/components/VSkeleton/VAudioTrackSkeleton.vue
+++ b/src/components/VSkeleton/VAudioTrackSkeleton.vue
@@ -1,31 +1,31 @@
<template>
- <article class="flex flex-row w-full mb-14">
+ <article class="mb-14 flex w-full flex-row">
<!-- Thumbnail skeleton -->
<div
- class="flex-shrink-0 h-20 w-20 mr-4 bg-dark-charcoal-10 rounded shimmering"
+ class="shimmering mr-4 h-20 w-20 flex-shrink-0 rounded bg-dark-charcoal-10"
/>
- <div class="flex flex-row gap-6 h-20 w-full">
+ <div class="flex h-20 w-full flex-row gap-6">
<!-- Track info skeleton -->
- <div class="flex-shrink-0 w-70">
- <div class="flex flex-col h-full justify-around">
+ <div class="w-70 flex-shrink-0">
+ <div class="flex h-full flex-col justify-around">
<div
v-for="idx in 2"
:key="idx"
- class="row-line bg-dark-charcoal-10 h-3 rounded shimmering"
+ class="row-line shimmering h-3 rounded bg-dark-charcoal-10"
:style="{ width: `${getRandomSize()}px` }"
/>
- <div class="inline-flex space-x-1 gap-2">
- <div class="h-3 w-14 bg-dark-charcoal-10 rounded shimmering" />
- <div class="rounded-full h-3 w-3 bg-dark-charcoal-10 shimmering" />
+ <div class="inline-flex gap-2 space-x-1">
+ <div class="shimmering h-3 w-14 rounded bg-dark-charcoal-10" />
+ <div class="shimmering h-3 w-3 rounded-full bg-dark-charcoal-10" />
<div
- class="row-line h-3 w-30 bg-dark-charcoal-10 rounded shimmering"
+ class="row-line shimmering h-3 w-30 rounded bg-dark-charcoal-10"
/>
</div>
</div>
</div>
<!-- Waveform skeleton -->
- <div class="w-full bg-dark-charcoal-10 rounded shimmering" />
+ <div class="shimmering w-full rounded bg-dark-charcoal-10" />
</div>
</article>
</template>
diff --git a/src/components/VSkeleton/VGridSkeleton.vue b/src/components/VSkeleton/VGridSkeleton.vue
index 103de65c3..2de6261a7 100644
--- a/src/components/VSkeleton/VGridSkeleton.vue
+++ b/src/components/VSkeleton/VGridSkeleton.vue
@@ -2,7 +2,7 @@
<section>
<div
v-if="isForTab === 'all'"
- class="grid gap-4 grid-cols-2 lg:grid-cols-5"
+ class="grid grid-cols-2 gap-4 lg:grid-cols-5"
>
<VBone v-for="idx in numElems" :key="idx" class="square" />
</div>
diff --git a/src/components/VSketchFabViewer.vue b/src/components/VSketchFabViewer.vue
index 2aa37dcb5..ffab4a9c8 100644
--- a/src/components/VSketchFabViewer.vue
+++ b/src/components/VSketchFabViewer.vue
@@ -1,5 +1,5 @@
<template>
- <div class="block max-w-[1000px] max-h-[500px] aspect-[2/1]">
+ <div class="block aspect-[2/1] max-h-[500px] max-w-[1000px]">
<iframe
id="sketchfab-iframe"
ref="node"
diff --git a/src/components/VSkipToContentContainer.vue b/src/components/VSkipToContentContainer.vue
index 747e1b803..049490b65 100644
--- a/src/components/VSkipToContentContainer.vue
+++ b/src/components/VSkipToContentContainer.vue
@@ -3,7 +3,7 @@
<slot />
<VTeleport to="skip-to-content">
<VButton
- class="focus:fixed focus:absolute ms-2 mt-2 z-50"
+ class="ms-2 z-50 mt-2 focus:fixed focus:absolute"
:class="$style.skipButton"
@click="skipToContent"
>{{ $t('skip-to-content') }}</VButton
diff --git a/src/components/VSourcesTable.vue b/src/components/VSourcesTable.vue
index 0ade2fe9c..3459c2460 100644
--- a/src/components/VSourcesTable.vue
+++ b/src/components/VSourcesTable.vue
@@ -2,7 +2,7 @@
<table
:aria-label="$t('sources.aria.table').toString()"
role="region"
- class="table table-fixed w-full mt-4 mb-10 not-prose text-base"
+ class="not-prose mt-4 mb-10 table w-full table-fixed text-base"
>
<thead>
<tr>
@@ -11,7 +11,7 @@
@click="sortTable('display_name')"
@keypress.enter="sortTable('display_name')"
>
- <span class="w-full flex flex-row items-center justify-between">
+ <span class="flex w-full flex-row items-center justify-between">
{{ $t('sources.providers.source') }}
<TableSortIcon :active="sorting.field === 'display_name'" />
</span>
@@ -21,7 +21,7 @@
@click="sortTable('source_url')"
@keypress.enter="sortTable('source_url')"
>
- <span class="w-full flex flex-row items-center justify-between">
+ <span class="flex w-full flex-row items-center justify-between">
{{ $t('sources.providers.domain') }}
<TableSortIcon :active="sorting.field === 'source_url'" />
</span>
@@ -31,7 +31,7 @@
@click="sortTable('media_count')"
@keypress.enter="sortTable('media_count')"
>
- <span class="w-full flex flex-row items-center justify-between">
+ <span class="flex w-full flex-row items-center justify-between">
{{ $t('sources.providers.item') }}
<TableSortIcon :active="sorting.field === 'media_count'" />
</span>
@@ -43,7 +43,7 @@
<td>
{{ provider.display_name }}
</td>
- <td class="font-semibold truncate">
+ <td class="truncate font-semibold">
<VLink :href="provider.source_url">
{{ cleanSourceUrlForPresentation(provider.source_url) }}
</VLink>
@@ -152,7 +152,7 @@ export default defineComponent({
@layer components {
.table {
- @apply border-0 rounded-sm border-dark-charcoal-20;
+ @apply rounded-sm border-0 border-dark-charcoal-20;
}
.table th,
.table td {
@@ -162,11 +162,11 @@ export default defineComponent({
@apply text-pink hover:underline;
}
.table th {
- @apply bg-dark-charcoal-10 border-t cursor-pointer;
+ @apply cursor-pointer border-t bg-dark-charcoal-10;
}
.table th,
.table td {
- @apply p-4 border-r first:border-l;
+ @apply border-r p-4 first:border-l;
}
.table td {
@apply break-normal border-y-0;
@@ -181,7 +181,7 @@ export default defineComponent({
}
.table tr:last-child td {
- @apply first:rounded-bl-sm last:rounded-br-sm border-b;
+ @apply border-b first:rounded-bl-sm last:rounded-br-sm;
}
}
</style>
diff --git a/src/components/VTabs/VTab.vue b/src/components/VTabs/VTab.vue
index b62f95b8f..9ddfdd079 100644
--- a/src/components/VTabs/VTab.vue
+++ b/src/components/VTabs/VTab.vue
@@ -7,7 +7,7 @@
size="disabled"
variant="plain-dangerous"
v-bind="tabProps"
- class="py-3 px-4 md:px-6 bg-white text-base font-semibold focus-visible:shadow-[0_0_0_1.5px_#c52b9b_inset] border-0 rounded-none"
+ class="rounded-none border-0 bg-white py-3 px-4 text-base font-semibold focus-visible:shadow-[0_0_0_1.5px_#c52b9b_inset] md:px-6"
:class="[$style[variant], isSelected && $style[`${variant}-selected`]]"
@click="handleSelection"
@focus="handleFocus"
@@ -188,15 +188,15 @@ export default defineComponent({
<style module>
.bordered {
- @apply border-t border-x border-tx rounded-t-sm;
+ @apply rounded-t-sm border-x border-t border-tx;
}
.plain {
- @apply border-tx border-b-3;
+ @apply border-b-3 border-tx;
}
.bordered-selected {
- @apply border border-x-dark-charcoal-20 border-t-dark-charcoal-20 border-b-white -mb-[1px] bg-white;
+ @apply -mb-[1px] border border-x-dark-charcoal-20 border-t-dark-charcoal-20 border-b-white bg-white;
}
.plain-selected {
- @apply border-dark-charcoal rounded-none;
+ @apply rounded-none border-dark-charcoal;
}
</style>
diff --git a/src/components/VTabs/VTabPanel.vue b/src/components/VTabs/VTabPanel.vue
index 0a4949ae4..cbc99a1df 100644
--- a/src/components/VTabs/VTabPanel.vue
+++ b/src/components/VTabs/VTabPanel.vue
@@ -5,7 +5,7 @@
:aria-labelledby="`tab-${id}`"
role="tabpanel"
:tabindex="isSelected ? 0 : -1"
- class="p-6 border-dark-charcoal-20"
+ class="border-dark-charcoal-20 p-6"
:class="[panelVariantStyle, { hidden: !isSelected }]"
>
<slot />
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index f5a3badbd..887a90925 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -1,6 +1,6 @@
<template>
- <div class="app grid relative">
- <div class="sticky top-0 block z-40">
+ <div class="app relative grid">
+ <div class="sticky top-0 z-40 block">
<VTeleportTarget name="skip-to-content" :force-destroy="true" />
<VMigrationNotice />
<VTranslationStatusBanner />
@@ -10,10 +10,10 @@
class="main embedded w-screen md:w-full"
:class="{ 'has-sidebar': isSidebarVisible }"
>
- <Nuxt class="min-w-0 main-page" />
+ <Nuxt class="main-page min-w-0" />
<VSidebarTarget
- class="sidebar fixed end-0 bg-dark-charcoal-06 overflow-y-auto"
- :class="{ 'border-s border-dark-charcoal-20': isSidebarVisible }"
+ class="sidebar fixed overflow-y-auto bg-dark-charcoal-06 end-0"
+ :class="{ 'border-dark-charcoal-20 border-s': isSidebarVisible }"
/>
</main>
<VModalTarget class="modal" />
diff --git a/src/pages/audio/_id.vue b/src/pages/audio/_id.vue
index 9300a5466..88a9b4095 100644
--- a/src/pages/audio/_id.vue
+++ b/src/pages/audio/_id.vue
@@ -5,7 +5,7 @@
</div>
<VAudioTrack layout="full" :audio="audio" class="main-track" />
<div
- class="mt-10 lg:mt-16 flex flex-col gap-10 lg:gap-16 px-6 lg:max-w-5xl mx-auto"
+ class="mx-auto mt-10 flex flex-col gap-10 px-6 lg:mt-16 lg:max-w-5xl lg:gap-16"
>
<VMediaReuse data-testid="audio-attribution" :media="audio" />
<VAudioDetails data-testid="audio-info" :audio="audio" />
diff --git a/src/pages/extension.vue b/src/pages/extension.vue
index af9bf6e84..79db073c3 100644
--- a/src/pages/extension.vue
+++ b/src/pages/extension.vue
@@ -2,13 +2,13 @@
<section dir="ltr">
<div class="border-b border-dark-charcoal-30 bg-dark-charcoal-06">
<div class="flex flex-col items-center pt-20">
- <h2 class="text-5xl text-center mb-10 max-w-[700px]">
+ <h2 class="mb-10 max-w-[700px] text-center text-5xl">
{{ $t('extension.description.intro') }}
</h2>
<ExtensionBrowsers class="mb-16" />
<video
ref="heroVid"
- class="max-w-7xl block w-full"
+ class="block w-full max-w-7xl"
autoplay
loop
muted
@@ -23,17 +23,17 @@
</div>
</div>
<div
- class="features md:max-w-3xl lg:max-w-6xl grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-30 py-30 md:px-6 mx-auto"
+ class="features mx-auto grid grid-cols-1 gap-x-12 gap-y-30 py-30 md:max-w-3xl md:grid-cols-2 md:px-6 lg:max-w-6xl"
>
<template v-for="(feature, index) in features">
<figure
:key="`figure-${index}`"
:data-index="index"
- class="flex flex-col justify-center items-center"
+ class="flex flex-col items-center justify-center"
:style="{ '--cell-idx': index * 2 }"
>
<img
- class="max-w-7xl w-full rounded border"
+ class="w-full max-w-7xl rounded border"
:src="feature.image"
:alt="$t(`extension.features.${feature.key}.heading`).toString()"
/>
@@ -41,10 +41,10 @@
<div
:key="`description-${index}`"
:data-index="index"
- class="description flex flex-col justify-center items-center text-left"
+ class="description flex flex-col items-center justify-center text-left"
:style="{ '--cell-idx': index * 2 + 1 }"
>
- <h2 class="text-5xl mb-4 max-w=[30rem]">
+ <h2 class="max-w=[30rem] mb-4 text-5xl">
{{ $t(`extension.features.${feature.key}.heading`) }}
</h2>
<p class="max-w=[30rem]">
@@ -53,8 +53,8 @@
</div>
</template>
</div>
- <div class="flex flex-col items-center mb-30">
- <h2 class="text-6xl text-center max-w-[40rem]">
+ <div class="mb-30 flex flex-col items-center">
+ <h2 class="max-w-[40rem] text-center text-6xl">
{{ $t('extension.conclusion') }}
</h2>
<ExtensionBrowsers class="mt-6" />
@@ -111,12 +111,12 @@ export default defineComponent({
@screen md {
.features figure:nth-of-type(odd),
.features .description:nth-of-type(odd) {
- @apply text-left items-start;
+ @apply items-start text-left;
}
.features figure:nth-of-type(even),
.features .description:nth-of-type(even) {
- @apply text-right items-end;
+ @apply items-end text-right;
}
}
diff --git a/src/pages/feedback.vue b/src/pages/feedback.vue
index 4c0074879..43bdb584b 100644
--- a/src/pages/feedback.vue
+++ b/src/pages/feedback.vue
@@ -25,7 +25,7 @@
</template>
<VTabPanel v-for="tab in tabs" :id="tab" :key="tab">
<iframe
- class="w-full h-[1200px] border-0"
+ class="h-[1200px] w-full border-0"
:src="forms[tab]"
:aria-label="$t(`feedback.aria.${tab}`).toString()"
:title="$t(`feedback.aria.${tab}`).toString()"
diff --git a/src/pages/image/_id.vue b/src/pages/image/_id.vue
index b33afd0c3..edfa11ba0 100644
--- a/src/pages/image/_id.vue
+++ b/src/pages/image/_id.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <figure class="w-full mb-4 pt-12 px-6 bg-dark-charcoal-06 relative">
+ <figure class="relative mb-4 w-full bg-dark-charcoal-06 px-6 pt-12">
<div
v-if="backToSearchPath"
class="absolute left-0 top-0 right-0 w-full px-2"
@@ -13,7 +13,7 @@
id="main-image"
:src="imageSrc"
:alt="image.title"
- class="h-full w-full max-h-[500px] mx-auto rounded-t-sm object-contain"
+ class="mx-auto h-full max-h-[500px] w-full rounded-t-sm object-contain"
:width="imageWidth"
:height="imageHeight"
@load="onImageLoaded"
@@ -29,19 +29,19 @@
<section
id="title-button"
- class="flex flex-row md:flex-row-reverse flex-wrap justify-between md:mt-6"
+ class="flex flex-row flex-wrap justify-between md:mt-6 md:flex-row-reverse"
>
<VButton
as="VLink"
:href="image.foreign_landing_url"
- class="btn-main flex-initial w-full md:w-max mb-4 md:mb-0 leading-[1.3]"
+ class="btn-main mb-4 w-full flex-initial leading-[1.3] md:mb-0 md:w-max"
size="large"
>{{ $t('image-details.weblink') }}</VButton
>
<div
- class="flex-1 flex flex-col justify-center font-semibold text-base leading-[1.3]"
+ class="flex flex-1 flex-col justify-center text-base font-semibold leading-[1.3]"
>
- <h1 class="md:text-3xl font-semibold">
+ <h1 class="font-semibold md:text-3xl">
{{ image.title }}
</h1>
<i18n v-if="image.creator" path="image-details.creator" tag="span">
@@ -238,10 +238,10 @@ export default defineComponent({
<style scoped>
section,
aside {
- @apply w-full px-6 md:px-16 mb-10 md:mb-16 md:max-w-screen-lg lg:mx-auto;
+ @apply mb-10 w-full px-6 md:mb-16 md:max-w-screen-lg md:px-16 lg:mx-auto;
}
.btn-main {
- @apply py-3 md:py-4 md:px-6 text-sr md:text-2xl font-semibold;
+ @apply py-3 text-sr font-semibold md:py-4 md:px-6 md:text-2xl;
}
</style>
diff --git a/src/pages/index.vue b/src/pages/index.vue
index faa23edbc..4c592271f 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -1,21 +1,21 @@
<template>
<main
- class="flex flex-col lg:flex-row justify-center gap-6 lg:gap-0 bg-yellow h-screen overflow-hidden"
+ class="flex h-screen flex-col justify-center gap-6 overflow-hidden bg-yellow lg:flex-row lg:gap-0"
>
<!-- TODO: Refine min-width for different breakpoints, remove magic numbers -->
<header
- class="flex-grow w-full lg:w-auto lg:min-w-[32rem] xl:min-w-[64rem] box-border flex flex-col justify-between lg:justify-center"
+ class="box-border flex w-full flex-grow flex-col justify-between lg:w-auto lg:min-w-[32rem] lg:justify-center xl:min-w-[64rem]"
>
<VLogoButton
- class="lg:hidden ms-3"
+ class="ms-3 lg:hidden"
:auto-resize-logo="false"
:is-search-route="false"
/>
- <div class="px-6 lg:ps-30 lg:pe-0 xl:px-40 mx-auto w-full lg:w-auto z-10">
+ <div class="z-10 mx-auto w-full px-6 lg:w-auto lg:pe-0 lg:ps-30 xl:px-40">
<VLink
href="/"
- class="relative hidden lg:block -left-[6.25rem] rtl:-right-[6.25rem]"
+ class="relative -left-[6.25rem] hidden rtl:-right-[6.25rem] lg:block"
>
<h1>
<span class="sr-only">Openverse</span>
@@ -24,15 +24,15 @@
aria-hidden="true"
class="flex flex-row items-center text-dark-charcoal"
>
- <OpenverseLogo class="w-[70px] h-[70px] me-6 xl:me-7" />
- <OpenverseBrand class="w-[315px] h-[60px]" />
+ <OpenverseLogo class="h-[70px] w-[70px] me-6 xl:me-7" />
+ <OpenverseBrand class="h-[60px] w-[315px]" />
</span>
</h1>
</VLink>
- <h2 class="text-4xl lg:text-6xl mt-auto lg:mt-6">
+ <h2 class="mt-auto text-4xl lg:mt-6 lg:text-6xl">
{{ $t('hero.subtitle') }}
</h2>
- <div class="flex justify-start gap-4 mt-4 md:hidden">
+ <div class="mt-4 flex justify-start gap-4 md:hidden">
<VSearchTypeRadio
v-for="type in supportedSearchTypes"
:key="type"
@@ -43,7 +43,7 @@
</div>
<VSearchBar
v-model.trim="searchTerm"
- class="max-w-[40rem] mt-4 lg:mt-8 group"
+ class="group mt-4 max-w-[40rem] lg:mt-8"
size="standalone"
@submit="handleSearch"
>
@@ -63,13 +63,13 @@
<i18n
path="hero.disclaimer.content"
tag="p"
- class="hidden lg:block text-sr mt-4"
+ class="mt-4 hidden text-sr lg:block"
>
<template #openverse>Openverse</template>
<template #license>
<VLink
href="https://creativecommons.org/licenses/"
- class="text-dark-charcoal hover:text-dark-charcoal underline"
+ class="text-dark-charcoal underline hover:text-dark-charcoal"
>{{ $t('hero.disclaimer.license') }}</VLink
>
</template>
@@ -79,13 +79,13 @@
<!-- Image carousel -->
<div
- class="flex-grow overflow-hidden w-full lg:w-auto lg:h-full px-6"
+ class="w-full flex-grow overflow-hidden px-6 lg:h-full lg:w-auto"
data-testid="image-carousel"
>
<!-- Height is 114.286vh i.e. 100vh * 8/7 (so that 0.75, 1, 1, 0.75 circles are visible) -->
<!-- Width is 57.143vh i.e. half of height (because grid dimensions are 4 ⨯ 2) -->
<div
- class="homepage-images flex flex-row gap-4 lg:gap-0 items-center lg:grid lg:grid-cols-2 lg:grid-rows-4 lg:w-[57.143vh] lg:h-[114.286vh] min-h-[120px]"
+ class="homepage-images flex min-h-[120px] flex-row items-center gap-4 lg:grid lg:h-[114.286vh] lg:w-[57.143vh] lg:grid-cols-2 lg:grid-rows-4 lg:gap-0"
aria-hidden
>
<ClientOnly>
@@ -98,11 +98,11 @@
>
<VLink
:href="image.url"
- class="homepage-image block aspect-square h-30 w-30 lg:h-auto lg:w-auto lg:m-[2vh] rounded-full"
+ class="homepage-image block aspect-square h-30 w-30 rounded-full lg:m-[2vh] lg:h-auto lg:w-auto"
:style="{ '--transition-index': `${index * 0.05}s` }"
>
<img
- class="object-cover h-full w-full rounded-full aspect-square"
+ class="aspect-square h-full w-full rounded-full object-cover"
:src="image.src"
:alt="image.title"
width="120"
@@ -119,13 +119,13 @@
<i18n
path="hero.disclaimer.content"
tag="p"
- class="lg:hidden text-sr p-6 mt-auto"
+ class="mt-auto p-6 text-sr lg:hidden"
>
<template #openverse>Openverse</template>
<template #license>
<VLink
href="https://creativecommons.org/licenses/"
- class="text-dark-charcoal hover:text-dark-charcoal underline"
+ class="text-dark-charcoal underline hover:text-dark-charcoal"
>{{ $t('hero.disclaimer.license') }}</VLink
>
</template>
diff --git a/src/pages/meta-search.vue b/src/pages/meta-search.vue
index bf6f018d4..cb23d3878 100644
--- a/src/pages/meta-search.vue
+++ b/src/pages/meta-search.vue
@@ -138,6 +138,6 @@ export default defineComponent({
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
figure {
- @apply mx-auto md:w-[800px] max-w-full border border-black;
+ @apply mx-auto max-w-full border border-black md:w-[800px];
}
</style>
diff --git a/src/pages/search.vue b/src/pages/search.vue
index 1a0d99e92..0b75e677e 100644
--- a/src/pages/search.vue
+++ b/src/pages/search.vue
@@ -1,6 +1,6 @@
<template>
<VSkipToContentContainer
- class="browse-page flex flex-col px-4 md:px-10 w-full"
+ class="browse-page flex w-full flex-col px-4 md:px-10"
>
<VSearchGrid
ref="searchGridRef"
diff --git a/src/pages/sources.vue b/src/pages/sources.vue
index c0ebbf80e..3369ded15 100644
--- a/src/pages/sources.vue
+++ b/src/pages/sources.vue
@@ -59,7 +59,7 @@
as="VLink"
variant="primary"
size="disabled"
- class="not-prose font-semibold mt-5 px-6 py-4"
+ class="not-prose mt-5 px-6 py-4 font-semibold"
href="https://github.com/WordPress/openverse-catalog/issues/new?assignees=&labels=%F0%9F%9A%A6+status%3A+awaiting+triage%2C+%F0%9F%A7%B9+status%3A+ticket+work+required%2C+%E2%98%81%EF%B8%8F+provider%3A+any&template=new-source-suggestion.md&title=%5BSource+Suggestion%5D+Insert+source+name+here"
>
{{ $t('sources.issue-button') }}
diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css
index c5dada28f..8870ad684 100644
--- a/src/styles/tailwind.css
+++ b/src/styles/tailwind.css
@@ -8,7 +8,7 @@
}
html {
- @apply text-dark-charcoal m-0 font-normal leading-loose;
+ @apply m-0 font-normal leading-loose text-dark-charcoal;
font-display: swap;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;