Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Searchbar not showing input text #17

Closed
francescocretti opened this issue Dec 10, 2024 · 8 comments
Closed

Searchbar not showing input text #17

francescocretti opened this issue Dec 10, 2024 · 8 comments

Comments

@francescocretti
Copy link

Hi.

The top searchbar does not show input text, even if it works (it shows correct results).
Is not a theming issue (I thought the text may have the name color of the background), it looks like the text is not rendered at all.

Here's a screenshot.

Screenshot 2024-12-10 at 12 04 05

BTW - I find this theme to be the best one out there! Thanks for doing this!

@dmnsgn
Copy link
Owner

dmnsgn commented Dec 13, 2024

Thanks!

Do you have an online example or can you share more details (typedoc-material-theme, OS and browser versions)?
I am not able to reproduce it one the example: https://dmnsgn.github.io/typedoc-material-theme/

@francescocretti
Copy link
Author

Hi @dmnsgn, thanks for the reply.

Here are my configurations:

typedoc.base.json

{
  "plugin": [
    "typedoc-plugin-merge-modules",
    "typedoc-material-theme"
  ],
  "themeColor": "#f2efeb",
  "favicon": "./assets/favicon.png",
  "mergeModulesRenameDefaults": true,
  "mergeModulesMergeMode": "module",
  "exclude": [
    "**/*.d.ts",
    "**/*.test.ts",
    "**/*.test.tsx",
    "**/__tests__/*",
    "**/.rollup.cache/*",
    "**/dist/*",
    "**/node_modules/*"
  ]
}

typedoc.json

{
  "extends": [
    "./typedoc.base.json"
  ],
  "tsconfig": "tsconfig.json",
  "name": "GeoXp Docs",
  "out": "public",
  "entryPoints": [
    "packages/*"
  ],
  "entryPointStrategy": "packages",
  "exclude": [
    "packages/eslint-config",
  ]
}

I'm working with Typescript (v5.4.5) on a Lerna Monorepo (lerna v8.1.8).

Mac OS 13.2.1 (Ventura) with Firefox 133 or Chrome 131 (same result).

Here's a published work in progress version of the docs I'm building -> https://geoxp.netlify.app/

Let me know if I can help debugging this ;)

@francescocretti
Copy link
Author

Hi @dmnsgn . Did you have the chance to take a look at this?
Can I do something to help debugging?

@dmnsgn
Copy link
Owner

dmnsgn commented Dec 21, 2024

Looks like your material-style.css...

#tsd-search .field input {
  // ...
  top: calc(-100% - var(--top-app-bar-padding-vertical) - var(--safe-area-inset-top));
}

...is overwriting the correct styles that you have in a layer:

#tsd-search.has-focus .field input {
  top: 0;
  // ...
}

So you'd need to change your css selector with a :not or add your own styles with .has-focus.

@dmnsgn dmnsgn closed this as completed Dec 21, 2024
@francescocretti
Copy link
Author

francescocretti commented Dec 23, 2024

@dmnsgn thanks!
That style is automatically generated by typedoc though.
I'll find a way to inject custom CSS rules

@francescocretti
Copy link
Author

If anyone had the same issue, I was able to fix it injecting a custom CSS file and forcing top: 0 with !important keyword.

Dunno why this conflict happens in the first place though, since I did not touch any style.

Anyways:

typedoc.base.json:

{
  "plugin": [
    "typedoc-material-theme"
  ],
  "themeColor": "#f2efeb",
  "customCss": "./typedoc.style.css"
}

typedoc.style.css:

#tsd-search.has-focus .field input {
  top: 0 !important;
}

@dmnsgn
Copy link
Owner

dmnsgn commented Dec 26, 2024

@dmnsgn thanks! That style is automatically generated by typedoc though. I'll find a way to inject custom CSS rules

Looks like a change in their v0.27 indeed.

@dmnsgn
Copy link
Owner

dmnsgn commented Jan 21, 2025

@francescocretti typedoc-material-theme@1.3.0 should fix this and remove the need for you to inject a custom CSS file.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants