diff --git a/examples/github-repositories-custom-plugin/createGitHubReposPlugin.tsx b/examples/github-repositories-custom-plugin/createGitHubReposPlugin.tsx index 703cb2055..993e2c09f 100644 --- a/examples/github-repositories-custom-plugin/createGitHubReposPlugin.tsx +++ b/examples/github-repositories-custom-plugin/createGitHubReposPlugin.tsx @@ -70,55 +70,57 @@ export function createGitHubReposPlugin( return ( -
- {item.full_name} -
-
-
-
{item.full_name}
-
- - - {' '} -
+
+
+
+
{item.full_name}
+
- {stars} - + + + {' '} + +
-
-
- {item.description} +
+ {item.description} +
diff --git a/packages/autocomplete-theme-classic/src/theme.scss b/packages/autocomplete-theme-classic/src/theme.scss index c62c7c3a1..82e05af8a 100644 --- a/packages/autocomplete-theme-classic/src/theme.scss +++ b/packages/autocomplete-theme-classic/src/theme.scss @@ -171,7 +171,6 @@ body { display: flex; line-height: 1em; margin: 0; - padding: 0 calc(var(--aa-spacing) - 2px) 0 calc(var(--aa-spacing) - 1px); position: relative; width: 100%; &:focus-within { @@ -189,22 +188,16 @@ body { align-items: center; display: flex; flex-shrink: 0; + height: var(--aa-search-input-height); order: 1; // Container for search and loading icons @at-root .aa-Label, .aa-LoadingIndicator { cursor: initial; flex-shrink: 0; + height: 100%; padding: 0; text-align: left; - width: calc(var(--aa-icon-size) + var(--aa-spacing)); - button { - appearance: none; - background: none; - border: 0; - margin: 0; - padding: 2px; - } svg { color: rgba(var(--aa-primary-color-rgb), 1); height: auto; @@ -213,6 +206,31 @@ body { width: var(--aa-input-icon-size); } } + @at-root .aa-SubmitButton, + .aa-LoadingIndicator { + height: 100%; + padding-left: calc(var(--aa-spacing) * 0.75 - 1px); + padding-right: var(--aa-spacing-half); + width: calc(var(--aa-spacing) * 1.75 + var(--aa-icon-size) - 1px); + @media (hover: none) and (pointer: coarse) { + padding-left: calc(var(--aa-spacing-half) / 2 - 1px); + width: calc(var(--aa-icon-size) + (var(--aa-spacing) * 1.25) - 1px); + } + } + @at-root .aa-SubmitButton { + appearance: none; + background: none; + border: 0; + margin: 0; + } + @at-root .aa-LoadingIndicator { + align-items: center; + display: flex; + justify-content: center; + &[hidden] { + display: none; + } + } } @at-root .aa-InputWrapper { order: 3; @@ -226,6 +244,7 @@ body { color: rgba(var(--aa-text-color-rgb), var(--aa-text-color-alpha)); font: inherit; height: var(--aa-search-input-height); + padding: 0; width: 100%; &::placeholder { color: rgba(var(--aa-muted-color-rgb), var(--aa-muted-color-alpha)); @@ -249,6 +268,7 @@ body { @at-root .aa-InputWrapperSuffix { align-items: center; display: flex; + height: var(--aa-search-input-height); order: 4; // Accelerator to clear the query @at-root .aa-ClearButton { @@ -258,8 +278,12 @@ body { color: rgba(var(--aa-muted-color-rgb), var(--aa-muted-color-alpha)); cursor: pointer; display: flex; + height: 100%; margin: 0; - padding: 2px; + padding: 0 calc(var(--aa-spacing) * (5 / 6) - 0.5px); + @media (hover: none) and (pointer: coarse) { + padding: 0 calc(var(--aa-spacing) * (2 / 3) - 0.5px); + } &:hover, &:focus { color: rgba(var(--aa-text-color-rgb), var(--aa-text-color-alpha));