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

css: custom style #70

Closed
wants to merge 1 commit into from
Closed

css: custom style #70

wants to merge 1 commit into from

Conversation

casperdcl
Copy link
Contributor

@casperdcl casperdcl commented Oct 4, 2023

this seems to work fine for me.

p {
  font-family: Georgia, 'Times New Roman', Times, serif;
}
before after
before after

this PR's build artefact can be downloaded if you want to check locally: github-pages.zip

tips

  • inspect page elements in your browser console to find out their classes so you can target them in CSS
    image
  • vis https://jupyterbook.org/en/stable/advanced/html.html#custom-css-or-javascript
  • you could always upload more woff fonts if you want...
    @font-face{
      font-family: "SomeKewlFont";
      src:
        local("SomeKewlFont"),
        url("/_static/SomeKewlFont.woff2") format("woff2"),
        Arial, Helvetica;
    }
    
    p {
      font-family: "SomeKewlFont", sans-serif;
    }

@casperdcl casperdcl added the framework & docs meta-content label Oct 4, 2023
@casperdcl casperdcl mentioned this pull request Oct 4, 2023
41 tasks
@Janaka-Steph
Copy link
Contributor

It is not clear. You want Georgia, 'Times New Roman', Times, serif on all paragraphs? But then why do you say inspect page elements in your browser console to find out their classes so you can target them in CSS. I don't need classes in this case.

@casperdcl
Copy link
Contributor Author

casperdcl commented Oct 5, 2023

No I don't want Georgia on all paras 😅

Context:

  • aim: style site to look more like premai.io (mostly fonts & colours IMO, lemme know if you think differently)
  • @johnsBeharry mentioned he struggled to get css working in this repo, so I opened this PR as a PoC to demonstrate it working

In practice I guess we need something like

.some-sidebar-class {
  font-family: "someCustomFont";
}

etc...

@Janaka-Steph
Copy link
Contributor

Ha ok. Prem App uses a font called Pretendard on both titles and paragraphs. We can do the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework & docs meta-content
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants