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

feat: use primary color for highlighted items in table of contents #1628

Merged
merged 1 commit into from
Jul 3, 2019

Conversation

parkas2018
Copy link
Contributor

Currently the items in table of contents are highlighted as bold based on items being
viewed on the screen or as the user scrolls up/down on a page. Added the primaryColor
of the site's configuration to make the current section being viewed standout more
in the table of content.

closes #1608

Motivation

I can easily apply necessary changes so that items in table of contents are highlighted using the primary colour, but I think this is something others may find useful also.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Before the css change:

image

After the css change:

image

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

Currently the items in table of contents are highlighted as bold based on items being
viewed on the screen or as the user scrolls up/down on a page. Added the `primaryColor`
of the site's configuration to make the current section being viewed standout more
in the table of content.

closes facebook#1608
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 26, 2019
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit d2bf7cf

https://deploy-preview-1628--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit d2bf7cf

https://deploy-preview-1628--docusaurus-preview.netlify.com

@yangshun yangshun changed the title Set colour in highlighted items in table of content feat: use primary color for highlighted items in table of contents Jul 3, 2019
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yangshun yangshun merged commit 7252197 into facebook:master Jul 3, 2019
jamesgeorge007 pushed a commit to jamesgeorge007/Docusaurus that referenced this pull request Jul 3, 2019
…acebook#1628)

Currently the items in table of contents are highlighted as bold based on items being
viewed on the screen or as the user scrolls up/down on a page. Added the `primaryColor`
of the site's configuration to make the current section being viewed standout more
in the table of content.

closes facebook#1608
@parkas2018 parkas2018 deleted the color-in-toc-highlight branch October 24, 2019 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use primary colour for highlighting items in table of content
4 participants