Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Made reference filter bar sticky and added some styles #365

Merged

Conversation

vidhihattar
Copy link
Contributor

The reference filter bar is sticky and I added some styles to it as well.
Screenshot 2024-05-23 at 1 22 36 AM
This is how it looks like.

@jcubic
Copy link
Collaborator

jcubic commented May 22, 2024

It looks good, but this is how it looks in Dark Mode:

Przechwycenie obrazu ekranu_2024-05-23_00-34-36

@jcubic
Copy link
Collaborator

jcubic commented May 22, 2024

You can use html[data-theme=dark] selector to change color only for dark mode.

@vidhihattar
Copy link
Contributor Author

vidhihattar commented May 23, 2024 via email

@vidhihattar
Copy link
Contributor Author

This is how it looks now:
Screenshot 2024-05-24 at 9 45 54 AM
Let me know if you'd like any changes.

@jcubic
Copy link
Collaborator

jcubic commented May 24, 2024

I think that you can use one color from CSS variable added by Docusaurus:

background-color: var(--ifm-background-color);

@vidhihattar
Copy link
Contributor Author

do you mean that i should remove this whole:
html[data-theme=dark] .input{
background-color: #1b1b1d;
}
and add the variable to .input class?
if so then for light mode the search area becomes transparent like this :
Screenshot 2024-05-24 at 2 47 55 PM
or should I just add the variable to this html[data-theme=dark] .input?

@jcubic
Copy link
Collaborator

jcubic commented May 24, 2024

Yeah, you're right, then use:

.input {
  /* ... */
  background-color: #fff;
}

html[data-theme=dark] .input {
  background-color: var(--ifm-background-color);
} 

@vidhihattar
Copy link
Contributor Author

Made the changes, please check.

@jcubic
Copy link
Collaborator

jcubic commented May 25, 2024

One more thing, when you click on the anchor (h2 tag) the header is not visible behind the search bar.

You need to overwrite this CSS

.anchorWithStickyNavbar_node_modules-\@docusaurus-theme-classic-lib-theme-Heading-styles-module {
    scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem);
}

To increase the offset. So the header is visible below the search bar. You can also save the height of input in variable same:

:root {
    --lips-search-height: 80px;
}

And use in both places.

@vidhihattar
Copy link
Contributor Author

vidhihattar commented May 25, 2024 via email

@vidhihattar
Copy link
Contributor Author

Made the changes, please check.

@jcubic
Copy link
Collaborator

jcubic commented May 27, 2024

Looks good. Thanks for your contribution.

@jcubic jcubic merged commit 594cfdd into LIPS-scheme:master May 27, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants