Template contains mkdoclingo.css.

Open Beginner friendly
#56 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
css
Domain
documentation

Research direction

Start by inspecting docs/_custom/css/mkdoclingo.css and compare it with the styling provided by mkdoclingo. Remove the template CSS file, then verify that projects generated from the template no longer override mkdoclingo's predicate labels or colors.

Written by the indexing model from the issue text.

Description

Issue

The template currently contains the file:

https://github.com/potassco/python-project-template/blob/master/docs/_custom/css/mkdoclingo.css

This means that every project that starts with the template overrides the css provided by mkdoclingo.

One such example is:

code.doc-clingo-symbol-predicate::after {
    content: "predicate";
    color: #ca91bf
}

which creates a label predicate. This label is used to show that something is a predicate and currently occurs in front of every link to a predicate in the table of contents (TOC).

Having the entire word predicate in front of every link is very verbose and takes up much of the space reserved for the TOC, resulting in unnecessary line breaks.

Additionally, this forces a very specific color.

For this reason the same css in mkdoclingo looks like this

code.doc-clingo-symbol-predicate::after {
    content: "P";
    color: var(--doc-symbol-predicate-fg-color);
}

Here, the content is only P and the color is applied dynamically from a variable.

Solution

I think the file should be removed entirely. In most cases, mkdoclingo should be responsible for the styling of the sections it provides. Only if custom styling is absolutely necessary/wanted should parts of mkdoclingo be overridden.

Dominant language
Python
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from potassco/python-project-template

All issues in potassco/python-project-template

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.