diff --git a/src/components/Dropdown/styles.module.scss b/src/components/Dropdown/styles.module.scss index b2a1612608..51845a263e 100644 --- a/src/components/Dropdown/styles.module.scss +++ b/src/components/Dropdown/styles.module.scss @@ -113,7 +113,15 @@ button.chevron { .option > button > span { text-align: left; padding-left: 44px; - padding-right: 10px; + // 38px padding-right holds the chevron icon on mobile for better touch targets + padding-right: 38px; display: inline-block; width: 100%; + // 0.75rem font-size for mobile to fit content in smaller screens + font-size: 0.75rem; + + @media (min-width: $breakpoint-tablet) { + font-size: 1rem; + padding-right: 10px; + } } diff --git a/src/components/PageHeader/HomePage.astro b/src/components/PageHeader/HomePage.astro index cd81ec7883..80784886ee 100644 --- a/src/components/PageHeader/HomePage.astro +++ b/src/components/PageHeader/HomePage.astro @@ -12,13 +12,13 @@ const { config } = Astro.props;
{config.data.heroText}
(.*?)<\/p>/; - let [oneLineDescription] = description.replace(/\n/g, " ").trim() - .match(firstParagraphRegex) ?? []; + let [oneLineDescription] = + description.replace(/\n/g, " ").trim().match(firstParagraphRegex) ?? []; if (!oneLineDescription && description) { oneLineDescription = description; } - if(oneLineDescription){ + if (oneLineDescription) { oneLineDescription = oneLineDescription .replace(/^
|<\/p>$/g, "")
.replace(/<\/?code>/g, "")
@@ -80,11 +80,13 @@ export const ReferenceDirectoryWithFilter = ({
);
if (
subcat.entry &&
- subcat.entry.data.title.toLowerCase().includes(searchKeyword.toLowerCase())
+ subcat.entry.data.title
+ .toLowerCase()
+ .includes(searchKeyword.toLowerCase())
) {
filteredEntries.push(subcat.entry);
}
-
+
if (filteredEntries.length > 0) {
subAcc.push({ ...subcat, entries: filteredEntries });
}
@@ -111,18 +113,16 @@ export const ReferenceDirectoryWithFilter = ({
aria-label={entry.data.title}
aria-describedby={`${entry.data.title}-description`}
>
-
+
{entry.data.beta && (
)}
{entry.data.deprecated && (
)}
@@ -143,7 +143,7 @@ export const ReferenceDirectoryWithFilter = ({
category: { name: string },
) => {
return !(!subcat.name || !category.name);
- }
+ };
const getSubcatHeading = (
subcat: { name: string; entry?: any },
@@ -207,7 +207,7 @@ export const ReferenceDirectoryWithFilter = ({
return (